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

Unified Diff: runtime/vm/dart.cc

Issue 11478012: Provide a mechanism for dumping of heap profiles on predefined events. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 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 | « no previous file | runtime/vm/exceptions.cc » ('j') | runtime/vm/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index d37c2d76ac2effa682675213c78c5428ba41f75e..ed9085f8a2eba6164ce73f733dd8bf8214b4fe29 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -23,6 +23,8 @@
namespace dart {
+DEFINE_FLAG(bool, heap_profile_initialize, false,
+ "Writes a heap profile on isolate initialization.");
DECLARE_FLAG(bool, print_bootstrap);
DECLARE_FLAG(bool, print_class_table);
DECLARE_FLAG(bool, trace_isolates);
@@ -168,6 +170,11 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
if (FLAG_trace_isolates) {
isolate->heap()->PrintSizes();
}
+
+ if (FLAG_heap_profile_initialize) {
+ isolate->heap()->ProfileToFile("initialize");
+ }
+
if (FLAG_print_bootstrap) {
PrintLibrarySources(isolate);
}
« no previous file with comments | « no previous file | runtime/vm/exceptions.cc » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698