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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 11031040: Don't inline functions above the deoptimization threshold. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Typo and added deopt increment Created 8 years, 2 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
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:

Powered by Google App Engine
This is Rietveld 408576698