OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |