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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/compiler.cc ('k') | src/mips/lithium-codegen-mips.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 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 Address entry = table_entry->address; 388 Address entry = table_entry->address;
389 DeoptComment(table_entry->deopt_info); 389 DeoptComment(table_entry->deopt_info);
390 if (table_entry->needs_frame) { 390 if (table_entry->needs_frame) {
391 DCHECK(!info()->saves_caller_doubles()); 391 DCHECK(!info()->saves_caller_doubles());
392 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); 392 __ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
393 __ call(&needs_frame); 393 __ call(&needs_frame);
394 } else { 394 } else {
395 if (info()->saves_caller_doubles()) RestoreCallerDoubles(); 395 if (info()->saves_caller_doubles()) RestoreCallerDoubles();
396 __ call(entry, RelocInfo::RUNTIME_ENTRY); 396 __ call(entry, RelocInfo::RUNTIME_ENTRY);
397 } 397 }
398 info()->LogDeoptCallPosition(masm()->pc_offset(),
399 table_entry->deopt_info.inlining_id);
398 } 400 }
399 if (needs_frame.is_linked()) { 401 if (needs_frame.is_linked()) {
400 __ bind(&needs_frame); 402 __ bind(&needs_frame);
401 /* stack layout 403 /* stack layout
402 4: entry address 404 4: entry address
403 3: return address <-- esp 405 3: return address <-- esp
404 2: garbage 406 2: garbage
405 1: garbage 407 1: garbage
406 0: garbage 408 0: garbage
407 */ 409 */
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 __ int3(); 883 __ int3();
882 __ bind(&done); 884 __ bind(&done);
883 } 885 }
884 886
885 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 887 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
886 888
887 DCHECK(info()->IsStub() || frame_is_built_); 889 DCHECK(info()->IsStub() || frame_is_built_);
888 if (cc == no_condition && frame_is_built_) { 890 if (cc == no_condition && frame_is_built_) {
889 DeoptComment(deopt_info); 891 DeoptComment(deopt_info);
890 __ call(entry, RelocInfo::RUNTIME_ENTRY); 892 __ call(entry, RelocInfo::RUNTIME_ENTRY);
893 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
891 } else { 894 } else {
892 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, 895 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
893 !frame_is_built_); 896 !frame_is_built_);
894 // We often have several deopts to the same entry, reuse the last 897 // We often have several deopts to the same entry, reuse the last
895 // jump entry if this is the case. 898 // jump entry if this is the case.
896 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 899 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
897 jump_table_.is_empty() || 900 jump_table_.is_empty() ||
898 !table_entry.IsEquivalentTo(jump_table_.last())) { 901 !table_entry.IsEquivalentTo(jump_table_.last())) {
899 jump_table_.Add(table_entry, zone()); 902 jump_table_.Add(table_entry, zone());
900 } 903 }
(...skipping 4900 matching lines...) Expand 10 before | Expand all | Expand 10 after
5801 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5804 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5802 RecordSafepoint(Safepoint::kNoLazyDeopt); 5805 RecordSafepoint(Safepoint::kNoLazyDeopt);
5803 } 5806 }
5804 5807
5805 5808
5806 #undef __ 5809 #undef __
5807 5810
5808 } } // namespace v8::internal 5811 } } // namespace v8::internal
5809 5812
5810 #endif // V8_TARGET_ARCH_IA32 5813 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698