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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/perf-jit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/address-map.h" 7 #include "src/address-map.h"
8 #include "src/assembler-inl.h" 8 #include "src/assembler-inl.h"
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compilation-info.h" 10 #include "src/compilation-info.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 // Emit the jump tables. 214 // Emit the jump tables.
215 if (jump_tables_) { 215 if (jump_tables_) {
216 masm()->Align(kPointerSize); 216 masm()->Align(kPointerSize);
217 for (JumpTable* table = jump_tables_; table; table = table->next()) { 217 for (JumpTable* table = jump_tables_; table; table = table->next()) {
218 masm()->bind(table->label()); 218 masm()->bind(table->label());
219 AssembleJumpTable(table->targets(), table->target_count()); 219 AssembleJumpTable(table->targets(), table->target_count());
220 } 220 }
221 } 221 }
222 222
223 // The PerfJitLogger logs code up until here, excluding the safepoint
224 // table. Resolve the unwinding info now so it is aware of the same code size
225 // as reported by perf.
226 unwinding_info_writer_.Finish(masm()->pc_offset());
227
223 safepoints()->Emit(masm(), frame()->GetTotalFrameSlotCount()); 228 safepoints()->Emit(masm(), frame()->GetTotalFrameSlotCount());
224 229
225 unwinding_info_writer_.Finish(masm()->pc_offset());
226
227 Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue( 230 Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue(
228 masm(), unwinding_info_writer_.eh_frame_writer(), info, Handle<Object>()); 231 masm(), unwinding_info_writer_.eh_frame_writer(), info, Handle<Object>());
229 result->set_is_turbofanned(true); 232 result->set_is_turbofanned(true);
230 result->set_stack_slots(frame()->GetTotalFrameSlotCount()); 233 result->set_stack_slots(frame()->GetTotalFrameSlotCount());
231 result->set_safepoint_table_offset(safepoints()->GetCodeOffset()); 234 result->set_safepoint_table_offset(safepoints()->GetCodeOffset());
232 Handle<ByteArray> source_positions = 235 Handle<ByteArray> source_positions =
233 source_position_table_builder_.ToSourcePositionTable( 236 source_position_table_builder_.ToSourcePositionTable(
234 isolate(), Handle<AbstractCode>::cast(result)); 237 isolate(), Handle<AbstractCode>::cast(result));
235 result->set_source_position_table(*source_positions); 238 result->set_source_position_table(*source_positions);
236 239
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { 1001 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) {
999 gen->ools_ = this; 1002 gen->ools_ = this;
1000 } 1003 }
1001 1004
1002 1005
1003 OutOfLineCode::~OutOfLineCode() {} 1006 OutOfLineCode::~OutOfLineCode() {}
1004 1007
1005 } // namespace compiler 1008 } // namespace compiler
1006 } // namespace internal 1009 } // namespace internal
1007 } // namespace v8 1010 } // namespace v8
OLDNEW
« 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