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

Side by Side Diff: src/profiler/profiler-listener.cc

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly 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/ppc/assembler-ppc.h ('k') | src/s390/assembler-s390.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/profiler-listener.h" 5 #include "src/profiler/profiler-listener.h"
6 6
7 #include "src/deoptimizer.h" 7 #include "src/deoptimizer.h"
8 #include "src/profiler/cpu-profiler.h" 8 #include "src/profiler/cpu-profiler.h"
9 #include "src/profiler/profile-generator-inl.h" 9 #include "src/profiler/profile-generator-inl.h"
10 #include "src/source-position-table.h" 10 #include "src/source-position-table.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 rec->bailout_reason = GetBailoutReason(shared->disable_optimization_reason()); 148 rec->bailout_reason = GetBailoutReason(shared->disable_optimization_reason());
149 DispatchCodeEvent(evt_rec); 149 DispatchCodeEvent(evt_rec);
150 } 150 }
151 151
152 void ProfilerListener::CodeDeoptEvent(Code* code, Address pc, 152 void ProfilerListener::CodeDeoptEvent(Code* code, Address pc,
153 int fp_to_sp_delta) { 153 int fp_to_sp_delta) {
154 CodeEventsContainer evt_rec(CodeEventRecord::CODE_DEOPT); 154 CodeEventsContainer evt_rec(CodeEventRecord::CODE_DEOPT);
155 CodeDeoptEventRecord* rec = &evt_rec.CodeDeoptEventRecord_; 155 CodeDeoptEventRecord* rec = &evt_rec.CodeDeoptEventRecord_;
156 Deoptimizer::DeoptInfo info = Deoptimizer::GetDeoptInfo(code, pc); 156 Deoptimizer::DeoptInfo info = Deoptimizer::GetDeoptInfo(code, pc);
157 rec->start = code->address(); 157 rec->start = code->address();
158 rec->deopt_reason = Deoptimizer::GetDeoptReason(info.deopt_reason); 158 rec->deopt_reason = DeoptimizeReasonToString(info.deopt_reason);
159 rec->position = info.position; 159 rec->position = info.position;
160 rec->deopt_id = info.deopt_id; 160 rec->deopt_id = info.deopt_id;
161 rec->pc = reinterpret_cast<void*>(pc); 161 rec->pc = reinterpret_cast<void*>(pc);
162 rec->fp_to_sp_delta = fp_to_sp_delta; 162 rec->fp_to_sp_delta = fp_to_sp_delta;
163 DispatchCodeEvent(evt_rec); 163 DispatchCodeEvent(evt_rec);
164 } 164 }
165 165
166 void ProfilerListener::GetterCallbackEvent(Name* name, Address entry_point) { 166 void ProfilerListener::GetterCallbackEvent(Name* name, Address entry_point) {
167 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 167 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
168 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 168 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 319
320 void ProfilerListener::RemoveObserver(CodeEventObserver* observer) { 320 void ProfilerListener::RemoveObserver(CodeEventObserver* observer) {
321 auto it = std::find(observers_.begin(), observers_.end(), observer); 321 auto it = std::find(observers_.begin(), observers_.end(), observer);
322 if (it == observers_.end()) return; 322 if (it == observers_.end()) return;
323 observers_.erase(it); 323 observers_.erase(it);
324 } 324 }
325 325
326 } // namespace internal 326 } // namespace internal
327 } // namespace v8 327 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc.h ('k') | src/s390/assembler-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698