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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.cc ('k') | src/compiler.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.h"
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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 Comment(";;; call deopt with frame"); 869 Comment(";;; call deopt with frame");
870 // Save lr before Bl, fp will be adjusted in the needs_frame code. 870 // Save lr before Bl, fp will be adjusted in the needs_frame code.
871 __ Push(lr, fp); 871 __ Push(lr, fp);
872 // Reuse the existing needs_frame code. 872 // Reuse the existing needs_frame code.
873 __ Bl(&needs_frame); 873 __ Bl(&needs_frame);
874 } else { 874 } else {
875 // There is nothing special to do, so just continue to the second-level 875 // There is nothing special to do, so just continue to the second-level
876 // table. 876 // table.
877 __ Bl(&call_deopt_entry); 877 __ Bl(&call_deopt_entry);
878 } 878 }
879 info()->LogDeoptCallPosition(masm()->pc_offset(),
880 table_entry->deopt_info.inlining_id);
879 881
880 masm()->CheckConstPool(false, false); 882 masm()->CheckConstPool(false, false);
881 } 883 }
882 884
883 if (needs_frame.is_linked()) { 885 if (needs_frame.is_linked()) {
884 // This variant of deopt can only be used with stubs. Since we don't 886 // This variant of deopt can only be used with stubs. Since we don't
885 // have a function pointer to install in the stack frame that we're 887 // have a function pointer to install in the stack frame that we're
886 // building, install a special marker there instead. 888 // building, install a special marker there instead.
887 DCHECK(info()->IsStub()); 889 DCHECK(info()->IsStub());
888 890
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 } 1056 }
1055 1057
1056 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); 1058 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason);
1057 1059
1058 DCHECK(info()->IsStub() || frame_is_built_); 1060 DCHECK(info()->IsStub() || frame_is_built_);
1059 // Go through jump table if we need to build frame, or restore caller doubles. 1061 // Go through jump table if we need to build frame, or restore caller doubles.
1060 if (branch_type == always && 1062 if (branch_type == always &&
1061 frame_is_built_ && !info()->saves_caller_doubles()) { 1063 frame_is_built_ && !info()->saves_caller_doubles()) {
1062 DeoptComment(deopt_info); 1064 DeoptComment(deopt_info);
1063 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 1065 __ Call(entry, RelocInfo::RUNTIME_ENTRY);
1066 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id);
1064 } else { 1067 } else {
1065 Deoptimizer::JumpTableEntry* table_entry = 1068 Deoptimizer::JumpTableEntry* table_entry =
1066 new (zone()) Deoptimizer::JumpTableEntry( 1069 new (zone()) Deoptimizer::JumpTableEntry(
1067 entry, deopt_info, bailout_type, !frame_is_built_); 1070 entry, deopt_info, bailout_type, !frame_is_built_);
1068 // We often have several deopts to the same entry, reuse the last 1071 // We often have several deopts to the same entry, reuse the last
1069 // jump entry if this is the case. 1072 // jump entry if this is the case.
1070 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || 1073 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() ||
1071 jump_table_.is_empty() || 1074 jump_table_.is_empty() ||
1072 !table_entry->IsEquivalentTo(*jump_table_.last())) { 1075 !table_entry->IsEquivalentTo(*jump_table_.last())) {
1073 jump_table_.Add(table_entry, zone()); 1076 jump_table_.Add(table_entry, zone());
(...skipping 5028 matching lines...) Expand 10 before | Expand all | Expand 10 after
6102 Handle<ScopeInfo> scope_info = instr->scope_info(); 6105 Handle<ScopeInfo> scope_info = instr->scope_info();
6103 __ Push(scope_info); 6106 __ Push(scope_info);
6104 __ Push(ToRegister(instr->function())); 6107 __ Push(ToRegister(instr->function()));
6105 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6108 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6106 RecordSafepoint(Safepoint::kNoLazyDeopt); 6109 RecordSafepoint(Safepoint::kNoLazyDeopt);
6107 } 6110 }
6108 6111
6109 6112
6110 6113
6111 } } // namespace v8::internal 6114 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698