Chromium Code Reviews| Index: runtime/vm/isolate.cc |
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
| index 7708047f003a3f7acb3a28d864f45718a26aeba5..fd4a3835c6753f4342ef691c8b3b67b0e832203f 100644 |
| --- a/runtime/vm/isolate.cc |
| +++ b/runtime/vm/isolate.cc |
| @@ -1177,6 +1177,20 @@ bool Isolate::MakeRunnable() { |
| event->Complete(); |
| } |
| } |
| + if (FLAG_print_benchmarking_metrics) { |
| + // is_service_isolate not set yet. |
| + if (!ServiceIsolate::NameEquals(name())) { |
|
Florian Schneider
2016/12/14 18:22:47
Maybe only print the metrics for the main isolate?
|
| + int64_t uptime = OS::GetCurrentTimeMicros() - start_time(); |
| + OS::Print("MakeRunnable(Latency): %" Pd64 " us.\n", uptime); |
| + { |
| + StartIsolateScope scope(this); |
| + heap()->CollectAllGarbage(); |
| + } |
| + int64_t heap_size = (heap()->UsedInWords(Heap::kNew) * kWordSize) + |
| + (heap()->UsedInWords(Heap::kOld) * kWordSize); |
| + OS::Print("MakeRunnable(HeapSize): %" Pd64 " B.\n", heap_size); |
| + } |
| + } |
| if (FLAG_support_service && Service::isolate_stream.enabled()) { |
| ServiceEvent runnableEvent(this, ServiceEvent::kIsolateRunnable); |
| Service::HandleEvent(&runnableEvent); |