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

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

Issue 1012633002: CpuProfiler: Push inlining data forward to cpu profiler. (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/cpu-profiler-inl.h ('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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // have a function pointer to install in the stack frame that we're 398 // have a function pointer to install in the stack frame that we're
399 // building, install a special marker there instead. 399 // building, install a special marker there instead.
400 DCHECK(info()->IsStub()); 400 DCHECK(info()->IsStub());
401 __ push(Immediate(Smi::FromInt(StackFrame::STUB))); 401 __ push(Immediate(Smi::FromInt(StackFrame::STUB)));
402 // Push a PC inside the function so that the deopt code can find where 402 // Push a PC inside the function so that the deopt code can find where
403 // the deopt comes from. It doesn't have to be the precise return 403 // the deopt comes from. It doesn't have to be the precise return
404 // address of a "calling" LAZY deopt, it only has to be somewhere 404 // address of a "calling" LAZY deopt, it only has to be somewhere
405 // inside the code body. 405 // inside the code body.
406 Label push_approx_pc; 406 Label push_approx_pc;
407 __ call(&push_approx_pc); 407 __ call(&push_approx_pc);
408 info()->LogDeoptCallPosition(masm()->pc_offset(),
409 table_entry->deopt_info.inlining_id);
408 __ bind(&push_approx_pc); 410 __ bind(&push_approx_pc);
409 // Push the continuation which was stashed were the ebp should 411 // Push the continuation which was stashed were the ebp should
410 // be. Replace it with the saved ebp. 412 // be. Replace it with the saved ebp.
411 __ push(MemOperand(esp, 3 * kPointerSize)); 413 __ push(MemOperand(esp, 3 * kPointerSize));
412 __ mov(MemOperand(esp, 4 * kPointerSize), ebp); 414 __ mov(MemOperand(esp, 4 * kPointerSize), ebp);
413 __ lea(ebp, MemOperand(esp, 4 * kPointerSize)); 415 __ lea(ebp, MemOperand(esp, 4 * kPointerSize));
414 __ ret(0); // Call the continuation without clobbering registers. 416 __ ret(0); // Call the continuation without clobbering registers.
415 } 417 }
416 } else { 418 } else {
417 if (info()->saves_caller_doubles()) RestoreCallerDoubles(); 419 if (info()->saves_caller_doubles()) RestoreCallerDoubles();
418 __ call(entry, RelocInfo::RUNTIME_ENTRY); 420 __ call(entry, RelocInfo::RUNTIME_ENTRY);
421 info()->LogDeoptCallPosition(masm()->pc_offset(),
422 table_entry->deopt_info.inlining_id);
419 } 423 }
420 } 424 }
421 return !is_aborted(); 425 return !is_aborted();
422 } 426 }
423 427
424 428
425 bool LCodeGen::GenerateDeferredCode() { 429 bool LCodeGen::GenerateDeferredCode() {
426 DCHECK(is_generating()); 430 DCHECK(is_generating());
427 if (deferred_.length() > 0) { 431 if (deferred_.length() > 0) {
428 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 432 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 __ int3(); 865 __ int3();
862 __ bind(&done); 866 __ bind(&done);
863 } 867 }
864 868
865 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 869 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
866 870
867 DCHECK(info()->IsStub() || frame_is_built_); 871 DCHECK(info()->IsStub() || frame_is_built_);
868 if (cc == no_condition && frame_is_built_) { 872 if (cc == no_condition && frame_is_built_) {
869 DeoptComment(deopt_info); 873 DeoptComment(deopt_info);
870 __ call(entry, RelocInfo::RUNTIME_ENTRY); 874 __ call(entry, RelocInfo::RUNTIME_ENTRY);
875 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
871 } else { 876 } else {
872 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, 877 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
873 !frame_is_built_); 878 !frame_is_built_);
874 // We often have several deopts to the same entry, reuse the last 879 // We often have several deopts to the same entry, reuse the last
875 // jump entry if this is the case. 880 // jump entry if this is the case.
876 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 881 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
877 jump_table_.is_empty() || 882 jump_table_.is_empty() ||
878 !table_entry.IsEquivalentTo(jump_table_.last())) { 883 !table_entry.IsEquivalentTo(jump_table_.last())) {
879 jump_table_.Add(table_entry, zone()); 884 jump_table_.Add(table_entry, zone());
880 } 885 }
(...skipping 4900 matching lines...) Expand 10 before | Expand all | Expand 10 after
5781 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5786 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5782 RecordSafepoint(Safepoint::kNoLazyDeopt); 5787 RecordSafepoint(Safepoint::kNoLazyDeopt);
5783 } 5788 }
5784 5789
5785 5790
5786 #undef __ 5791 #undef __
5787 5792
5788 } } // namespace v8::internal 5793 } } // namespace v8::internal
5789 5794
5790 #endif // V8_TARGET_ARCH_IA32 5795 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/cpu-profiler-inl.h ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698