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

Unified Diff: runtime/vm/metrics.cc

Issue 1384003004: Add max post-gc heap usage metrics (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/metrics.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/metrics.cc
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc
index 274a3fd179f5025f1a90f1adf032497eae0ee788..0e15c0fb84f38ab9ed8dc3fc26ee7282ba69c0a5 100644
--- a/runtime/vm/metrics.cc
+++ b/runtime/vm/metrics.cc
@@ -276,6 +276,12 @@ int64_t MetricHeapNewExternal::Value() const {
}
+int64_t MetricHeapUsed::Value() const {
+ ASSERT(isolate() == Isolate::Current());
+ return isolate()->heap()->UsedInWords(Heap::kNew) * kWordSize +
+ isolate()->heap()->UsedInWords(Heap::kOld) * kWordSize;
+}
+
int64_t MetricIsolateCount::Value() const {
return Isolate::IsolateListLength();
}
« no previous file with comments | « runtime/vm/metrics.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698