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

Unified Diff: src/runtime-profiler.cc

Issue 2800623002: [compiler] Make --trace-opt-verbose more useful. (Closed)
Patch Set: Created 3 years, 8 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/ic/ic.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index 20b0dc5753fb76f203298da6f56fa2906b179b4e..77d973ea134ffc0961f5cce599c4e3fbb7e31000 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -402,8 +402,28 @@ OptimizationReason RuntimeProfiler::ShouldOptimizeIgnition(
int typeinfo, generic, total, type_percentage, generic_percentage;
GetICCounts(function, &typeinfo, &generic, &total, &type_percentage,
&generic_percentage);
- if (type_percentage >= FLAG_type_info_threshold) {
- return OptimizationReason::kSmallFunction;
+ if (type_percentage < FLAG_type_info_threshold) {
+ if (FLAG_trace_opt_verbose) {
+ PrintF("[not yet optimizing ");
+ function->PrintName();
+ PrintF(
+ ", not enough type info for small function optimization: %d/%d "
+ "(%d%%)]\n",
+ typeinfo, total, type_percentage);
+ }
+ return OptimizationReason::kDoNotOptimize;
+ }
+ return OptimizationReason::kSmallFunction;
+ } else if (FLAG_trace_opt_verbose) {
+ PrintF("[not yet optimizing ");
+ function->PrintName();
+ PrintF(", not enough ticks: %d/%d and ", ticks,
+ kProfilerTicksBeforeOptimization);
+ if (any_ic_changed_) {
+ PrintF("ICs changed]\n");
+ } else {
+ PrintF(" too large for small function optimization: %d/%d]\n",
+ shared->bytecode_array()->Size(), kMaxSizeEarlyOptIgnition);
}
}
return OptimizationReason::kDoNotOptimize;
« no previous file with comments | « src/ic/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698