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

Unified Diff: runtime/vm/deferred_objects.cc

Issue 1557533002: Eliminate excessive increment of deoptimization counters (e.g., with deep recursion of deoptimized … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 5 years 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/debugger.cc ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deferred_objects.cc
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc
index 3d86592165b4b397f3e18c8742803f7f8dc8f20a..71a734acaa610ede45e144bff77701bc52cf5955 100644
--- a/runtime/vm/deferred_objects.cc
+++ b/runtime/vm/deferred_objects.cc
@@ -173,16 +173,18 @@ void DeferredPcMarker::Materialize(DeoptContext* deopt_context) {
*reinterpret_cast<RawObject**>(dest_addr) = code.raw();
if (FLAG_trace_deoptimization_verbose) {
- OS::PrintErr("materializing pc marker at 0x%" Px ": %s, %s\n",
- reinterpret_cast<uword>(slot()), code.ToCString(),
- function.ToCString());
+ THR_Print("materializing pc marker at 0x%" Px ": %s, %s\n",
+ reinterpret_cast<uword>(slot()), code.ToCString(),
+ function.ToCString());
}
// Increment the deoptimization counter. This effectively increments each
// function occurring in the optimized frame.
- function.set_deoptimization_counter(function.deoptimization_counter() + 1);
+ if (deopt_context->deoptimizing_code()) {
+ function.set_deoptimization_counter(function.deoptimization_counter() + 1);
+ }
if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
- OS::PrintErr("Deoptimizing %s (count %d)\n",
+ THR_Print("Deoptimizing '%s' (count %d)\n",
function.ToFullyQualifiedCString(),
function.deoptimization_counter());
}
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698