Print compare-state with --print-code-stubs.
R=vegorov@chromium.org Review URL: https://chromiumcodereview.appspot.com/10235006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
f7b4a96b84
commit
94e5a8dfcd
@ -73,21 +73,12 @@ SmartArrayPointer<const char> CodeStub::GetName() {
|
||||
|
||||
|
||||
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 @@ Handle<Code> CodeStub::GetCode() {
|
||||
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);
|
||||
|
@ -8375,6 +8375,10 @@ void Code::Disassemble(const char* name, FILE* out) {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user