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

Unified Diff: runtime/vm/isolate.cc

Issue 2572873003: Add --print-benchmarking-metrics to the VM for Golem. (Closed)
Patch Set: Created 4 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
« runtime/vm/flag_list.h ('K') | « runtime/vm/flag_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« runtime/vm/flag_list.h ('K') | « runtime/vm/flag_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698