Revision: 11457 Author: [email protected] Date: Thu Apr 26 09:19:14 2012 Log: Print compare-state with --print-code-stubs.
[email protected] Review URL: https://chromiumcodereview.appspot.com/10235006 http://code.google.com/p/v8/source/detail?r=11457 Modified: /branches/bleeding_edge/src/code-stubs.cc /branches/bleeding_edge/src/objects.cc ======================================= --- /branches/bleeding_edge/src/code-stubs.cc Fri Feb 10 04:36:05 2012 +++ /branches/bleeding_edge/src/code-stubs.cc Thu Apr 26 09:19:14 2012 @@ -73,21 +73,12 @@ void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { - code->set_major_key(MajorKey()); - Isolate* isolate = masm->isolate(); SmartArrayPointer<const char> name = GetName(); PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, *name)); GDBJIT(AddCode(GDBJITInterface::STUB, *name, code)); Counters* counters = isolate->counters(); counters->total_stubs_code_size()->Increment(code->instruction_size()); - -#ifdef ENABLE_DISASSEMBLER - if (FLAG_print_code_stubs) { - code->Disassemble(*name); - PrintF("\n"); - } -#endif } @@ -125,8 +116,16 @@ GetICState()); Handle<Code> new_object = factory->NewCode( desc, flags, masm.CodeObject(), NeedsImmovableCode()); - RecordCodeGeneration(*new_object, &masm); + new_object->set_major_key(MajorKey()); FinishCode(new_object); + RecordCodeGeneration(*new_object, &masm); + +#ifdef ENABLE_DISASSEMBLER + if (FLAG_print_code_stubs) { + new_object->Disassemble(*GetName()); + PrintF("\n"); + } +#endif if (UseSpecialCache()) { AddToSpecialCache(new_object); ======================================= --- /branches/bleeding_edge/src/objects.cc Tue Apr 24 07:05:07 2012 +++ /branches/bleeding_edge/src/objects.cc Thu Apr 26 09:19:14 2012 @@ -8375,6 +8375,10 @@ if (is_call_stub() || is_keyed_call_stub()) { PrintF(out, "argc = %d\n", arguments_count()); } + if (is_compare_ic_stub()) { + CompareIC::State state = CompareIC::ComputeState(this); + PrintF(out, "compare_state = %s\n", CompareIC::GetStateName(state)); + } } if ((name != NULL) && (name[0] != '\0')) { PrintF(out, "name = %s\n", name); -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
