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

Unified Diff: runtime/vm/isolate.cc

Issue 1303033005: Add --print-metrics vm flag for printing metrics to console (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months 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/dart.cc ('k') | runtime/vm/metrics.h » ('j') | 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 7af37bfbcff69f3d9213c7ee37e0aa812b6ec5b6..0b8a1b07a09d5fdcc2b199c1f08edff5e9d95aed 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -44,7 +44,7 @@
namespace dart {
-DECLARE_FLAG(charp, timeline_trace_dir);
+DECLARE_FLAG(bool, print_metrics);
DEFINE_FLAG(bool, trace_isolates, false,
"Trace isolate creation and shut down.");
@@ -1540,6 +1540,15 @@ void Isolate::Shutdown() {
OS::Print("[-] Stopping isolate:\n"
"\tisolate: %s\n", name());
}
+ if (FLAG_print_metrics) {
+ LogBlock lb(this);
+ ISL_Print("Printing metrics for %s\n", name());
+#define ISOLATE_METRIC_PRINT(type, variable, name, unit) \
+ ISL_Print("%s\n", metric_##variable##_.ToString());
+ ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT);
+#undef ISOLATE_METRIC_PRINT
+ ISL_Print("\n");
+ }
}
#if defined(DEBUG)
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698