Chromium Code Reviews| Index: runtime/vm/deopt_instructions.cc |
| diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc |
| index c2baadf9768c7371afca74b2bfb07b8af888944a..d9507d6051ddc86f63cc7af11997901566aae8cf 100644 |
| --- a/runtime/vm/deopt_instructions.cc |
| +++ b/runtime/vm/deopt_instructions.cc |
| @@ -421,6 +421,13 @@ class DeoptPcMarkerInstr : public DeoptInstr { |
| AssemblerMacros::kOffsetOfSavedPCfromEntrypoint; |
| intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index); |
| *to_addr = pc_marker; |
| + // Increment the deoptimization counter. This effectively increments each |
| + // function occurring in the optimized frame. |
| + function.set_deoptimization_counter(function.deoptimization_counter() + 1); |
| + // Clear invocation counter so that the function gets optimized only after |
|
Kevin Millikin (Google)
2012/10/04 11:37:59
Comment should say 'reoptimized'. Maybe we should
zerny-google
2012/10/04 12:18:41
Done. :)
|
| + // more feedback has been collected. |
| + function.set_usage_counter(0); |
| + if (function.HasOptimizedCode()) function.SwitchToUnoptimizedCode(); |
| } |
| private: |