Chromium Code Reviews| Index: runtime/vm/code_generator.cc |
| diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc |
| index 725858bc713d7946dc32cfd15bbd7e4fc34e102f..ef724d289ba89b3ff30e7139f0b84e90bfd3f018 100644 |
| --- a/runtime/vm/code_generator.cc |
| +++ b/runtime/vm/code_generator.cc |
| @@ -32,6 +32,7 @@ DECLARE_FLAG(bool, enable_type_checks); |
| DECLARE_FLAG(bool, trace_type_checks); |
| DECLARE_FLAG(bool, report_usage_count); |
| DECLARE_FLAG(int, deoptimization_counter_threshold); |
| +DEFINE_FLAG(charp, optimization_filter, NULL, "Optimize only named function"); |
| bool CodeGenerator::CanOptimize() { |
| @@ -1341,6 +1342,13 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) { |
| function.set_usage_counter(kLowInvocationCount); |
| return; |
| } |
| + if ((FLAG_optimization_filter != NULL) && |
| + (strncmp(function.ToFullyQualifiedCString(), |
| + FLAG_optimization_filter, |
| + strlen(FLAG_optimization_filter)) != 0)) { |
| + function.set_usage_counter(kLowInvocationCount); |
|
srdjan
2012/06/18 16:33:20
Why not doing this in the compiler and "Bailout" f
Vyacheslav Egorov (Google)
2012/06/18 17:51:16
I don't see any profit in bailing out so late in t
|
| + return; |
| + } |
| if (function.is_optimizable()) { |
| ASSERT(!function.HasOptimizedCode()); |
| const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); |