Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: src/compiler/code-generator.cc

Issue 2790403002: [perf-prof] Fix erroneous code offsets in unwinding info (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/perf-jit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | src/perf-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698