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

Unified Diff: src/runtime-profiler.cc

Issue 23803007: Fix wraparound of deoptimization count in shared function info. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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
« src/objects-inl.h ('K') | « src/objects-inl.h ('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 cfce1dff8b389dcd432c3c5d2852ad57e2125a52..35919a553b67bf5eb33393205c5da0bb73515051 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -301,11 +301,11 @@ void RuntimeProfiler::OptimizeNow() {
continue;
}
- // Do not record non-optimizable functions.
+ // If a function has had optimization disabled, it might be temporary.
if (shared->optimization_disabled()) {
- if (shared->deopt_count() >= FLAG_max_opt_count) {
- // If optimization was disabled due to many deoptimizations,
- // then check if the function is hot and try to reenable optimization.
+ if (shared->too_many_deopts()) {
+ // The optimization was disabled because of too many deopts;
+ // check if the function is hot and try to reenable optimization.
int ticks = shared_code->profiler_ticks();
if (ticks >= kProfilerTicksBeforeReenablingOptimization) {
shared_code->set_profiler_ticks(0);
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698