Index: src/lithium.cc |
=================================================================== |
--- src/lithium.cc (revision 13276) |
+++ src/lithium.cc (working copy) |
@@ -416,6 +416,12 @@ |
Handle<Code> LChunk::Codegen(Code::Kind kind) { |
MacroAssembler assembler(info()->isolate(), NULL, 0); |
+ if (info()->isolate()->logger()->is_code_event_handler_enabled()) { |
+ JITCodeLineInfo* lineinfo = |
+ assembler.positions_recorder()->InitializeJITLineInfo(); |
+ LOG_CODE_EVENT(info()->isolate(), |
+ CodeStartLinePosInfoRecordEvent(lineinfo)); |
+ } |
LCodeGen generator(this, &assembler, info()); |
MarkEmptyBlocks(); |
@@ -429,6 +435,15 @@ |
Handle<Code> code = |
CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |
generator.FinishCode(code); |
+ |
+ if (info()->isolate()->logger()->is_code_event_handler_enabled()) { |
+ if (!code.is_null()) { |
+ JITCodeLineInfo* lineinfo = |
+ assembler.positions_recorder()->DetachJITLineInfo(); |
+ LOG_CODE_EVENT(info()->isolate(), |
+ CodeEndLinePosInfoRecordEvent(*code, lineinfo)); |
+ } |
+ } |
CodeGenerator::PrintCode(code, info()); |
return code; |
} |