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

Unified Diff: src/counters.h

Issue 10828113: When specifying a new create histogram callback, reset all histograms so they recreate themselves o… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 8 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 | « src/api.cc ('k') | src/v8-counters.h » ('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 233837635a411261d051f17c4a77b5e40a7e20dd..577280f444848a7511da42d91f7fe229c0569910 100644
--- a/src/counters.h
+++ b/src/counters.h
@@ -219,6 +219,11 @@ struct Histogram {
return GetHistogram() != NULL;
}
+ // Reset the cached internal pointer.
+ void Reset() {
+ lookup_done_ = false;
+ }
+
protected:
// Returns the handle to the histogram.
void* GetHistogram() {
@@ -251,6 +256,10 @@ struct HistogramTimer {
bool Running() {
return histogram_.Enabled() && (start_time_ != 0) && (stop_time_ == 0);
}
+
+ void Reset() {
+ histogram_.Reset();
+ }
};
// Helper class for scoping a HistogramTimer.
« no previous file with comments | « src/api.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698