From 2db1f598c56fb6e43c5c6f02062bc6793843a34f Mon Sep 17 00:00:00 2001 From: "pierre.langlois" Date: Tue, 4 Apr 2017 08:37:05 -0700 Subject: [PATCH] [perf-prof][arm64] Emit unwinding info to record the saved FP When emitting a frame, we always push the old frame pointer at offset 0 relative to the new frame pointer. However, we didn't emit DWARF opcodes to inform perf of this. BUG= Review-Url: https://codereview.chromium.org/2795253002 Cr-Commit-Position: refs/heads/master@{#44384} --- src/compiler/arm64/unwinding-info-writer-arm64.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/arm64/unwinding-info-writer-arm64.cc b/src/compiler/arm64/unwinding-info-writer-arm64.cc index 3095423854..edf96026e7 100644 --- a/src/compiler/arm64/unwinding-info-writer-arm64.cc +++ b/src/compiler/arm64/unwinding-info-writer-arm64.cc @@ -24,6 +24,7 @@ void UnwindingInfoWriter::BeginInstructionBlock(int pc_offset, eh_frame_writer_.AdvanceLocation(pc_offset); if (initial_state->saved_lr_) { eh_frame_writer_.RecordRegisterSavedToStack(lr, kPointerSize); + eh_frame_writer_.RecordRegisterSavedToStack(fp, 0); } else { eh_frame_writer_.RecordRegisterFollowsInitialRule(lr); } @@ -76,6 +77,7 @@ void UnwindingInfoWriter::MarkFrameConstructed(int at_pc) { // the construction, since the LR itself is not modified in the process. eh_frame_writer_.AdvanceLocation(at_pc); eh_frame_writer_.RecordRegisterSavedToStack(lr, kPointerSize); + eh_frame_writer_.RecordRegisterSavedToStack(fp, 0); saved_lr_ = true; }