Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index 1a46007c99881f263a8b8f8f9104176ca8643c9a..20f1b34b60797eef9b2511dfdc80d961cd27f1ba 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -16,6 +16,7 @@ |
#include "vm/debugger.h" |
#include "vm/isolate.h" |
#include "vm/lockers.h" |
+#include "vm/malloc_hooks.h" |
#include "vm/message.h" |
#include "vm/message_handler.h" |
#include "vm/native_entry.h" |
@@ -3801,6 +3802,9 @@ void Service::PrintJSONForVM(JSONStream* js, bool ref) { |
jsobj.AddProperty64("_maxRSS", OS::MaxRSS()); |
jsobj.AddPropertyTimeMillis( |
"startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis()); |
+ jsobj.AddProperty("_heapAllocatedMemoryUsage", |
Cutch
2017/01/31 23:21:05
if there is a way to detect if the malloc hooks ar
bkonyi
2017/01/31 23:37:05
I've gone ahead and added MallocHooks::Initialized
|
+ MallocHooks::heap_allocated_memory_in_bytes()); |
+ jsobj.AddProperty("_heapAllocationCount", MallocHooks::allocation_count()); |
// Construct the isolate list. |
{ |
JSONArray jsarr(&jsobj, "isolates"); |