Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index 787d8e56352411ca48a2697984e80f7bd7d135e3..3723a98ebe559f587fda0526c8a4470e19c0a88a 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -220,10 +220,13 @@ Handle<Code> CodeGenerator::GenerateCode() { |
} |
} |
- safepoints()->Emit(masm(), frame()->GetTotalFrameSlotCount()); |
- |
+ // The PerfJitLogger logs code up until here, excluding the safepoint |
+ // table. Resolve the unwinding info now so it is aware of the same code size |
+ // as reported by perf. |
unwinding_info_writer_.Finish(masm()->pc_offset()); |
+ safepoints()->Emit(masm(), frame()->GetTotalFrameSlotCount()); |
+ |
Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue( |
masm(), unwinding_info_writer_.eh_frame_writer(), info, Handle<Object>()); |
result->set_is_turbofanned(true); |