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

Unified Diff: runtime/vm/metrics.h

Issue 1391473002: Add Metrics for heap high water marks (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/heap.cc ('k') | runtime/vm/metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/metrics.h
diff --git a/runtime/vm/metrics.h b/runtime/vm/metrics.h
index 03cead211bbb2cd7a0030a5fad3a2b73a653710e..22f9a7895829d5dccff68506dca7d8e06d75695f 100644
--- a/runtime/vm/metrics.h
+++ b/runtime/vm/metrics.h
@@ -16,13 +16,15 @@ class JSONStream;
#define ISOLATE_METRIC_LIST(V) \
V(MetricHeapOldUsed, HeapOldUsed, "heap.old.used", kByte) \
V(MetricHeapOldCapacity, HeapOldCapacity, "heap.old.capacity", kByte) \
+ V(MaxMetric, HeapOldCapacityMax, "heap.old.capacity.max", kByte) \
V(MetricHeapOldExternal, HeapOldExternal, "heap.old.external", kByte) \
V(MetricHeapNewUsed, HeapNewUsed, "heap.new.used", kByte) \
V(MetricHeapNewCapacity, HeapNewCapacity, "heap.new.capacity", kByte) \
- V(MetricHeapNewExternal, HeapNewExternal, "heap.new.external", kByte) \
+ V(MaxMetric, HeapNewCapacityMax, "heap.new.capacity.max", kByte) \
+ V(MetricHeapNewExternal, HeapNewExternal, "heap.new.external", kByte)
#define VM_METRIC_LIST(V) \
- V(MetricIsolateCount, IsolateCount, "vm.isolate.count", kCounter) \
+ V(MetricIsolateCount, IsolateCount, "vm.isolate.count", kCounter)
class Metric {
public:
@@ -102,6 +104,26 @@ class Metric {
};
+// A Metric class that reports the maximum value observed.
+// Initial maximum is kMinInt64.
+class MaxMetric : public Metric {
+ public:
+ MaxMetric();
+
+ void SetValue(int64_t new_value);
+};
+
+
+// A Metric class that reports the minimum value observed.
+// Initial minimum is kMaxInt64.
+class MinMetric : public Metric {
+ public:
+ MinMetric();
+
+ void SetValue(int64_t new_value);
+};
+
+
class MetricHeapOldUsed : public Metric {
protected:
virtual int64_t Value() const;
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698