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

Unified Diff: src/deoptimizer.cc

Issue 2753543006: [profiler] Web UI: add summary of opts/deopts. (Closed)
Patch Set: Address reviewer comments Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-events.h ('k') | src/log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index beb9945c473dbe82f0963eb444739dbc75494cc9..942108007596c8465e21b1a808bf23241af84198 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -445,6 +445,24 @@ const char* Deoptimizer::MessageFor(BailoutType type) {
return NULL;
}
+namespace {
+
+CodeEventListener::DeoptKind DeoptKindOfBailoutType(
+ Deoptimizer::BailoutType bailout_type) {
+ switch (bailout_type) {
+ case Deoptimizer::EAGER:
+ return CodeEventListener::kEager;
+ case Deoptimizer::SOFT:
+ return CodeEventListener::kSoft;
+ case Deoptimizer::LAZY:
+ return CodeEventListener::kLazy;
+ }
+ UNREACHABLE();
+ return CodeEventListener::kEager;
+}
+
+} // namespace
+
Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
BailoutType type, unsigned bailout_id, Address from,
int fp_to_sp_delta)
@@ -509,7 +527,9 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
disallow_heap_allocation_ = new DisallowHeapAllocation();
#endif // DEBUG
if (compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) {
- PROFILE(isolate_, CodeDeoptEvent(compiled_code_, from_, fp_to_sp_delta_));
+ PROFILE(isolate_,
+ CodeDeoptEvent(compiled_code_, DeoptKindOfBailoutType(type), from_,
+ fp_to_sp_delta_));
}
unsigned size = ComputeInputFrameSize();
int parameter_count =
« no previous file with comments | « src/code-events.h ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698