Index: src/runtime-profiler.cc |
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc |
index 838888aeb1dca635d7903abcfae57d13980e199c..22567d3b90576be19f829e6a55ea33c5b4d68e53 100644 |
--- a/src/runtime-profiler.cc |
+++ b/src/runtime-profiler.cc |
@@ -88,6 +88,8 @@ |
void RuntimeProfiler::Optimize(JSFunction* function, const char* reason) { |
+ DCHECK(function->IsOptimizable()); |
+ |
if (FLAG_trace_opt && function->PassesFilter(FLAG_hydrogen_filter)) { |
PrintF("[marking "); |
function->ShortPrint(); |
@@ -215,7 +217,7 @@ |
} |
continue; |
} |
- if (function->IsOptimized()) continue; |
+ if (!function->IsOptimizable()) continue; |
int ticks = shared_code->profiler_ticks(); |