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

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
« no previous file with comments | « 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..ea0666b0790119dfdfa3a78fcba111b163bdc552 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1182,6 +1182,20 @@ bool Isolate::MakeRunnable() {
Service::HandleEvent(&runnableEvent);
}
#endif // !PRODUCT
+ if (FLAG_print_benchmarking_metrics) {
+ // is_service_isolate not set yet.
+ if (!ServiceIsolate::NameEquals(name())) {
+ int64_t uptime = OS::GetCurrentTimeMicros() - start_time();
sortie 2016/12/14 19:09:52 This interval seems to be measure in wall seconds
rmacnak 2016/12/16 19:10:22 Fixed this in another CL.
+ OS::Print("MakeRunnable(Latency): %" Pd64 " us.\n", uptime);
Cutch 2016/12/14 18:34:36 Please use the metric support in metrics.h instead
+ {
+ 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);
+ }
+ }
return true;
}
« no previous file with comments | « runtime/vm/flag_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698