| 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());
|
| }
|
|
|