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

Side by Side Diff: src/profiler/profile-generator.cc

Issue 2159793002: [turbofan] Allow deopt reasons without source positions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix for Ignition. Created 4 years, 5 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/profiler/profile-generator.h ('k') | src/profiler/profile-generator-inl.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 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/profiler/profile-generator.h" 5 #include "src/profiler/profile-generator.h"
6 6
7 #include "src/ast/scopeinfo.h" 7 #include "src/ast/scopeinfo.h"
8 #include "src/base/adapters.h" 8 #include "src/base/adapters.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 set_script_id(script->id()); 172 set_script_id(script->id());
173 set_position(shared->start_position()); 173 set_position(shared->start_position());
174 set_bailout_reason(GetBailoutReason(shared->disable_optimization_reason())); 174 set_bailout_reason(GetBailoutReason(shared->disable_optimization_reason()));
175 } 175 }
176 176
177 CpuProfileDeoptInfo CodeEntry::GetDeoptInfo() { 177 CpuProfileDeoptInfo CodeEntry::GetDeoptInfo() {
178 DCHECK(has_deopt_info()); 178 DCHECK(has_deopt_info());
179 179
180 CpuProfileDeoptInfo info; 180 CpuProfileDeoptInfo info;
181 info.deopt_reason = deopt_reason_; 181 info.deopt_reason = deopt_reason_;
182 DCHECK_NE(Deoptimizer::DeoptInfo::kNoDeoptId, deopt_id_); 182 DCHECK_NE(kNoDeoptimizationId, deopt_id_);
183 if (deopt_inlined_frames_.find(deopt_id_) == deopt_inlined_frames_.end()) { 183 if (deopt_inlined_frames_.find(deopt_id_) == deopt_inlined_frames_.end()) {
184 info.stack.push_back(CpuProfileDeoptFrame( 184 info.stack.push_back(CpuProfileDeoptFrame(
185 {script_id_, position_ + deopt_position_.position()})); 185 {script_id_, position_ + deopt_position_.position()}));
186 } else { 186 } else {
187 size_t deopt_position = deopt_position_.raw(); 187 size_t deopt_position = deopt_position_.raw();
188 // Copy stack of inlined frames where the deopt happened. 188 // Copy stack of inlined frames where the deopt happened.
189 std::vector<DeoptInlinedFrame>& frames = deopt_inlined_frames_[deopt_id_]; 189 std::vector<DeoptInlinedFrame>& frames = deopt_inlined_frames_[deopt_id_];
190 for (DeoptInlinedFrame& inlined_frame : base::Reversed(frames)) { 190 for (DeoptInlinedFrame& inlined_frame : base::Reversed(frames)) {
191 info.stack.push_back(CpuProfileDeoptFrame( 191 info.stack.push_back(CpuProfileDeoptFrame(
192 {inlined_frame.script_id, deopt_position + inlined_frame.position})); 192 {inlined_frame.script_id, deopt_position + inlined_frame.position}));
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 case EXTERNAL: 677 case EXTERNAL:
678 return CodeEntry::program_entry(); 678 return CodeEntry::program_entry();
679 case IDLE: 679 case IDLE:
680 return CodeEntry::idle_entry(); 680 return CodeEntry::idle_entry();
681 default: return NULL; 681 default: return NULL;
682 } 682 }
683 } 683 }
684 684
685 } // namespace internal 685 } // namespace internal
686 } // namespace v8 686 } // namespace v8
OLDNEW
« no previous file with comments | « src/profiler/profile-generator.h ('k') | src/profiler/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698