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

Unified Diff: src/counters.cc

Issue 1125683004: Add aggregated memory histograms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comments Created 5 years, 7 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
« src/counters.h ('K') | « src/counters.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.cc
diff --git a/src/counters.cc b/src/counters.cc
index 8cae329f5215ef6ae141f1f1b27d9bf6d5dc4329..6972011e5fdb848987bf3ebefa23594b591cd93e 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -79,8 +79,25 @@ Counters::Counters(Isolate* isolate) {
HISTOGRAM_PERCENTAGE_LIST(HP)
#undef HP
+
+// Exponential histogram assigns bucket limits to points
+// p[1], p[2], ... p[n] such that p[i+1] / p[i] = constant.
+// The constant factor is equal to the n-th root of (high / low),
+// where the n is the number of buckets, the low is the lower limit,
+// the high is the upper limit.
+// For n = 50, low = 1000, high = 500000: the factor = 1.13.
#define HM(name, caption) \
name##_ = Histogram(#caption, 1000, 500000, 50, isolate);
+ HISTOGRAM_LEGACY_MEMORY_LIST(HM)
+#undef HM
+// For n = 100, low = 4000, high = 2000000: the factor = 1.06.
+#define HM(name, caption) \
+ name##_ = Histogram(#caption, 4000, 2000000, 100, isolate);
+ HISTOGRAM_MEMORY_LIST(HM)
+#undef HM
+
+#define HM(name, caption) \
+ aggregated_##name##_ = AggregatedMemoryHistogram<Histogram>(&name##_);
HISTOGRAM_MEMORY_LIST(HM)
#undef HM
@@ -173,7 +190,7 @@ void Counters::ResetHistograms() {
#undef HP
#define HM(name, caption) name##_.Reset();
- HISTOGRAM_MEMORY_LIST(HM)
+ HISTOGRAM_LEGACY_MEMORY_LIST(HM)
#undef HM
}
« src/counters.h ('K') | « src/counters.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698