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

Side by Side Diff: src/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | no next file » | 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_X87 7 #if V8_TARGET_ARCH_X87
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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 __ bind(&table_entry->label); 384 __ bind(&table_entry->label);
385 Address entry = table_entry->address; 385 Address entry = table_entry->address;
386 DeoptComment(table_entry->deopt_info); 386 DeoptComment(table_entry->deopt_info);
387 if (table_entry->needs_frame) { 387 if (table_entry->needs_frame) {
388 DCHECK(!info()->saves_caller_doubles()); 388 DCHECK(!info()->saves_caller_doubles());
389 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); 389 __ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
390 __ call(&needs_frame); 390 __ call(&needs_frame);
391 } else { 391 } else {
392 __ call(entry, RelocInfo::RUNTIME_ENTRY); 392 __ call(entry, RelocInfo::RUNTIME_ENTRY);
393 } 393 }
394 info()->LogDeoptCallPosition(masm()->pc_offset(),
395 table_entry->deopt_info.inlining_id);
394 } 396 }
395 if (needs_frame.is_linked()) { 397 if (needs_frame.is_linked()) {
396 __ bind(&needs_frame); 398 __ bind(&needs_frame);
397 399
398 /* stack layout 400 /* stack layout
399 4: entry address 401 4: entry address
400 3: return address <-- esp 402 3: return address <-- esp
401 2: garbage 403 2: garbage
402 1: garbage 404 1: garbage
403 0: garbage 405 0: garbage
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 __ int3(); 1168 __ int3();
1167 __ bind(&done); 1169 __ bind(&done);
1168 } 1170 }
1169 1171
1170 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 1172 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
1171 1173
1172 DCHECK(info()->IsStub() || frame_is_built_); 1174 DCHECK(info()->IsStub() || frame_is_built_);
1173 if (cc == no_condition && frame_is_built_) { 1175 if (cc == no_condition && frame_is_built_) {
1174 DeoptComment(deopt_info); 1176 DeoptComment(deopt_info);
1175 __ call(entry, RelocInfo::RUNTIME_ENTRY); 1177 __ call(entry, RelocInfo::RUNTIME_ENTRY);
1178 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
1176 } else { 1179 } else {
1177 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, 1180 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
1178 !frame_is_built_); 1181 !frame_is_built_);
1179 // We often have several deopts to the same entry, reuse the last 1182 // We often have several deopts to the same entry, reuse the last
1180 // jump entry if this is the case. 1183 // jump entry if this is the case.
1181 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 1184 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
1182 jump_table_.is_empty() || 1185 jump_table_.is_empty() ||
1183 !table_entry.IsEquivalentTo(jump_table_.last())) { 1186 !table_entry.IsEquivalentTo(jump_table_.last())) {
1184 jump_table_.Add(table_entry, zone()); 1187 jump_table_.Add(table_entry, zone());
1185 } 1188 }
(...skipping 5224 matching lines...) Expand 10 before | Expand all | Expand 10 after
6410 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6413 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6411 RecordSafepoint(Safepoint::kNoLazyDeopt); 6414 RecordSafepoint(Safepoint::kNoLazyDeopt);
6412 } 6415 }
6413 6416
6414 6417
6415 #undef __ 6418 #undef __
6416 6419
6417 } } // namespace v8::internal 6420 } } // namespace v8::internal
6418 6421
6419 #endif // V8_TARGET_ARCH_X87 6422 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698