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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 1011113004: CpuProfiler: log pc offset for deopts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebaselined Created 5 years, 9 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/arm64/lithium-codegen-arm64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 __ mov(entry_offset, Operand(entry - base)); 345 __ mov(entry_offset, Operand(entry - base));
346 346
347 if (table_entry->needs_frame) { 347 if (table_entry->needs_frame) {
348 DCHECK(!info()->saves_caller_doubles()); 348 DCHECK(!info()->saves_caller_doubles());
349 Comment(";;; call deopt with frame"); 349 Comment(";;; call deopt with frame");
350 __ PushFixedFrame(); 350 __ PushFixedFrame();
351 __ bl(&needs_frame); 351 __ bl(&needs_frame);
352 } else { 352 } else {
353 __ bl(&call_deopt_entry); 353 __ bl(&call_deopt_entry);
354 } 354 }
355 info()->LogDeoptCallPosition(masm()->pc_offset(),
356 table_entry->deopt_info.inlining_id);
355 masm()->CheckConstPool(false, false); 357 masm()->CheckConstPool(false, false);
356 } 358 }
357 359
358 if (needs_frame.is_linked()) { 360 if (needs_frame.is_linked()) {
359 __ bind(&needs_frame); 361 __ bind(&needs_frame);
360 // This variant of deopt can only be used with stubs. Since we don't 362 // This variant of deopt can only be used with stubs. Since we don't
361 // have a function pointer to install in the stack frame that we're 363 // have a function pointer to install in the stack frame that we're
362 // building, install a special marker there instead. 364 // building, install a special marker there instead.
363 DCHECK(info()->IsStub()); 365 DCHECK(info()->IsStub());
364 __ mov(ip, Operand(Smi::FromInt(StackFrame::STUB))); 366 __ mov(ip, Operand(Smi::FromInt(StackFrame::STUB)));
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 882
881 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 883 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
882 884
883 DCHECK(info()->IsStub() || frame_is_built_); 885 DCHECK(info()->IsStub() || frame_is_built_);
884 // Go through jump table if we need to handle condition, build frame, or 886 // Go through jump table if we need to handle condition, build frame, or
885 // restore caller doubles. 887 // restore caller doubles.
886 if (condition == al && frame_is_built_ && 888 if (condition == al && frame_is_built_ &&
887 !info()->saves_caller_doubles()) { 889 !info()->saves_caller_doubles()) {
888 DeoptComment(deopt_info); 890 DeoptComment(deopt_info);
889 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 891 __ Call(entry, RelocInfo::RUNTIME_ENTRY);
892 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
890 } else { 893 } else {
891 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, 894 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
892 !frame_is_built_); 895 !frame_is_built_);
893 // We often have several deopts to the same entry, reuse the last 896 // We often have several deopts to the same entry, reuse the last
894 // jump entry if this is the case. 897 // jump entry if this is the case.
895 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 898 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
896 jump_table_.is_empty() || 899 jump_table_.is_empty() ||
897 !table_entry.IsEquivalentTo(jump_table_.last())) { 900 !table_entry.IsEquivalentTo(jump_table_.last())) {
898 jump_table_.Add(table_entry, zone()); 901 jump_table_.Add(table_entry, zone());
899 } 902 }
(...skipping 5070 matching lines...) Expand 10 before | Expand all | Expand 10 after
5970 __ Push(scope_info); 5973 __ Push(scope_info);
5971 __ push(ToRegister(instr->function())); 5974 __ push(ToRegister(instr->function()));
5972 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5975 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5973 RecordSafepoint(Safepoint::kNoLazyDeopt); 5976 RecordSafepoint(Safepoint::kNoLazyDeopt);
5974 } 5977 }
5975 5978
5976 5979
5977 #undef __ 5980 #undef __
5978 5981
5979 } } // namespace v8::internal 5982 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698