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

Unified Diff: src/counters.h

Issue 420753002: Added histogram to track distribution of requested idle notifications. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/counters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.h
diff --git a/src/counters.h b/src/counters.h
index 4a35bf493f2c24809d742e31fcdc2c8db406f360..975363afa97ac7826f3dd989431b2ee3df02590f 100644
--- a/src/counters.h
+++ b/src/counters.h
@@ -291,6 +291,9 @@ class HistogramTimerScope BASE_EMBEDDED {
#endif
};
+#define HISTOGRAM_RANGE_LIST(HR) \
+ /* Generic range histograms */ \
+ HR(gc_idle_time_allotted_in_ms, V8.GCIdleTimeAllottedInMS, 0, 1000, 1001)
#define HISTOGRAM_TIMER_LIST(HT) \
/* Garbage collection timers. */ \
@@ -551,6 +554,11 @@ class HistogramTimerScope BASE_EMBEDDED {
// This file contains all the v8 counters that are in use.
class Counters {
public:
+#define HR(name, caption, min, max, num_buckets) \
+ Histogram* name() { return &name##_; }
+ HISTOGRAM_RANGE_LIST(HR)
+#undef HR
+
#define HT(name, caption) \
HistogramTimer* name() { return &name##_; }
HISTOGRAM_TIMER_LIST(HT)
@@ -638,6 +646,10 @@ class Counters {
void ResetHistograms();
private:
+#define HR(name, caption, min, max, num_buckets) Histogram name##_;
+ HISTOGRAM_RANGE_LIST(HR)
+#undef HR
+
#define HT(name, caption) \
HistogramTimer name##_;
HISTOGRAM_TIMER_LIST(HT)
« no previous file with comments | « no previous file | src/counters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698