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

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: Review comments. 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
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index c2baadf9768c7371afca74b2bfb07b8af888944a..69b9e43f8d3edd53425b1b2dad95dc4382b6d41c 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 hopefully the function gets reoptimized
+ // only after more feedback has been collected.
+ function.set_usage_counter(0);
+ if (function.HasOptimizedCode()) function.SwitchToUnoptimizedCode();
}
private:
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698