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

Unified Diff: src/counters.cc

Issue 2812543002: Ensure counters are initialized, to avoid init on non-joinable threads. (Closed)
Patch Set: Created 3 years, 8 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 | « src/counters.h ('k') | no next file » | 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 0b71d439cfd53ff3f725779a6ea5859c6134c8f0..d1a1a44c9f9c65cfa7f7dd93f2b5c24c4d3b3c52 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -252,6 +252,30 @@ void Counters::ResetHistograms() {
#define HM(name, caption) name##_.Reset();
HISTOGRAM_LEGACY_MEMORY_LIST(HM)
+ HISTOGRAM_MEMORY_LIST(HM)
+#undef HM
+}
+
+void Counters::InitializeHistograms() {
+#define HR(name, caption, min, max, num_buckets) name##_.Enabled();
+ HISTOGRAM_RANGE_LIST(HR)
+#undef HR
+
+#define HT(name, caption, max, res) name##_.Enabled();
+ HISTOGRAM_TIMER_LIST(HT)
+#undef HT
+
+#define AHT(name, caption) name##_.Enabled();
+ AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT)
+#undef AHT
+
+#define HP(name, caption) name##_.Enabled();
+ HISTOGRAM_PERCENTAGE_LIST(HP)
+#undef HP
+
+#define HM(name, caption) name##_.Enabled();
+ HISTOGRAM_LEGACY_MEMORY_LIST(HM)
+ HISTOGRAM_MEMORY_LIST(HM)
#undef HM
}
« no previous file with comments | « src/counters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698