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

Side by Side Diff: src/mips/lithium-codegen-mips.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/ia32/lithium-codegen-ia32.cc ('k') | src/mips64/lithium-codegen-mips64.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 __ li(entry_offset, Operand(entry - base)); 346 __ li(entry_offset, Operand(entry - base));
347 347
348 if (table_entry->needs_frame) { 348 if (table_entry->needs_frame) {
349 DCHECK(!info()->saves_caller_doubles()); 349 DCHECK(!info()->saves_caller_doubles());
350 Comment(";;; call deopt with frame"); 350 Comment(";;; call deopt with frame");
351 __ MultiPush(cp.bit() | fp.bit() | ra.bit()); 351 __ MultiPush(cp.bit() | fp.bit() | ra.bit());
352 __ Call(&needs_frame); 352 __ Call(&needs_frame);
353 } else { 353 } else {
354 __ Call(&call_deopt_entry); 354 __ Call(&call_deopt_entry);
355 } 355 }
356 info()->LogDeoptCallPosition(masm()->pc_offset(),
357 table_entry->deopt_info.inlining_id);
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 __ li(at, Operand(Smi::FromInt(StackFrame::STUB))); 366 __ li(at, Operand(Smi::FromInt(StackFrame::STUB)));
365 __ push(at); 367 __ push(at);
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 848
847 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 849 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
848 850
849 DCHECK(info()->IsStub() || frame_is_built_); 851 DCHECK(info()->IsStub() || frame_is_built_);
850 // Go through jump table if we need to handle condition, build frame, or 852 // Go through jump table if we need to handle condition, build frame, or
851 // restore caller doubles. 853 // restore caller doubles.
852 if (condition == al && frame_is_built_ && 854 if (condition == al && frame_is_built_ &&
853 !info()->saves_caller_doubles()) { 855 !info()->saves_caller_doubles()) {
854 DeoptComment(deopt_info); 856 DeoptComment(deopt_info);
855 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); 857 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2);
858 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
856 } else { 859 } else {
857 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, 860 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
858 !frame_is_built_); 861 !frame_is_built_);
859 // We often have several deopts to the same entry, reuse the last 862 // We often have several deopts to the same entry, reuse the last
860 // jump entry if this is the case. 863 // jump entry if this is the case.
861 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 864 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
862 jump_table_.is_empty() || 865 jump_table_.is_empty() ||
863 !table_entry.IsEquivalentTo(jump_table_.last())) { 866 !table_entry.IsEquivalentTo(jump_table_.last())) {
864 jump_table_.Add(table_entry, zone()); 867 jump_table_.Add(table_entry, zone());
865 } 868 }
(...skipping 5156 matching lines...) Expand 10 before | Expand all | Expand 10 after
6022 __ li(at, scope_info); 6025 __ li(at, scope_info);
6023 __ Push(at, ToRegister(instr->function())); 6026 __ Push(at, ToRegister(instr->function()));
6024 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6027 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6025 RecordSafepoint(Safepoint::kNoLazyDeopt); 6028 RecordSafepoint(Safepoint::kNoLazyDeopt);
6026 } 6029 }
6027 6030
6028 6031
6029 #undef __ 6032 #undef __
6030 6033
6031 } } // namespace v8::internal 6034 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698