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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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 | « src/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 DeoptComment(table_entry->deopt_info); 313 DeoptComment(table_entry->deopt_info);
314 __ li(t9, Operand(ExternalReference::ForDeoptEntry(entry))); 314 __ li(t9, Operand(ExternalReference::ForDeoptEntry(entry)));
315 if (table_entry->needs_frame) { 315 if (table_entry->needs_frame) {
316 DCHECK(!info()->saves_caller_doubles()); 316 DCHECK(!info()->saves_caller_doubles());
317 Comment(";;; call deopt with frame"); 317 Comment(";;; call deopt with frame");
318 __ MultiPush(cp.bit() | fp.bit() | ra.bit()); 318 __ MultiPush(cp.bit() | fp.bit() | ra.bit());
319 __ Call(&needs_frame); 319 __ Call(&needs_frame);
320 } else { 320 } else {
321 __ Call(&call_deopt_entry); 321 __ Call(&call_deopt_entry);
322 } 322 }
323 info()->LogDeoptCallPosition(masm()->pc_offset(),
324 table_entry->deopt_info.inlining_id);
323 } 325 }
324 if (needs_frame.is_linked()) { 326 if (needs_frame.is_linked()) {
325 __ bind(&needs_frame); 327 __ bind(&needs_frame);
326 // This variant of deopt can only be used with stubs. Since we don't 328 // This variant of deopt can only be used with stubs. Since we don't
327 // have a function pointer to install in the stack frame that we're 329 // have a function pointer to install in the stack frame that we're
328 // building, install a special marker there instead. 330 // building, install a special marker there instead.
329 DCHECK(info()->IsStub()); 331 DCHECK(info()->IsStub());
330 __ li(at, Operand(Smi::FromInt(StackFrame::STUB))); 332 __ li(at, Operand(Smi::FromInt(StackFrame::STUB)));
331 __ push(at); 333 __ push(at);
332 __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); 334 __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 815
814 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 816 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
815 817
816 DCHECK(info()->IsStub() || frame_is_built_); 818 DCHECK(info()->IsStub() || frame_is_built_);
817 // Go through jump table if we need to handle condition, build frame, or 819 // Go through jump table if we need to handle condition, build frame, or
818 // restore caller doubles. 820 // restore caller doubles.
819 if (condition == al && frame_is_built_ && 821 if (condition == al && frame_is_built_ &&
820 !info()->saves_caller_doubles()) { 822 !info()->saves_caller_doubles()) {
821 DeoptComment(deopt_info); 823 DeoptComment(deopt_info);
822 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); 824 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2);
825 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
823 } else { 826 } else {
824 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, 827 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
825 !frame_is_built_); 828 !frame_is_built_);
826 // We often have several deopts to the same entry, reuse the last 829 // We often have several deopts to the same entry, reuse the last
827 // jump entry if this is the case. 830 // jump entry if this is the case.
828 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 831 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
829 jump_table_.is_empty() || 832 jump_table_.is_empty() ||
830 !table_entry.IsEquivalentTo(jump_table_.last())) { 833 !table_entry.IsEquivalentTo(jump_table_.last())) {
831 jump_table_.Add(table_entry, zone()); 834 jump_table_.Add(table_entry, zone());
832 } 835 }
(...skipping 5225 matching lines...) Expand 10 before | Expand all | Expand 10 after
6058 __ li(at, scope_info); 6061 __ li(at, scope_info);
6059 __ Push(at, ToRegister(instr->function())); 6062 __ Push(at, ToRegister(instr->function()));
6060 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6063 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6061 RecordSafepoint(Safepoint::kNoLazyDeopt); 6064 RecordSafepoint(Safepoint::kNoLazyDeopt);
6062 } 6065 }
6063 6066
6064 6067
6065 #undef __ 6068 #undef __
6066 6069
6067 } } // namespace v8::internal 6070 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698