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

Unified Diff: base/metrics/histogram_samples.h

Issue 116983004: Change some operations touching counts_[] to be atomic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years 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 | « base/metrics/histogram_base.h ('k') | base/metrics/histogram_samples.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_samples.h
===================================================================
--- base/metrics/histogram_samples.h (revision 242519)
+++ base/metrics/histogram_samples.h (working copy)
@@ -39,7 +39,9 @@
// Accessor fuctions.
int64 sum() const { return sum_; }
- HistogramBase::Count redundant_count() const { return redundant_count_; }
+ HistogramBase::Count redundant_count() const {
+ return subtle::NoBarrier_Load(&redundant_count_);
+ }
protected:
// Based on |op| type, add or subtract sample counts data from the iterator.
@@ -59,7 +61,7 @@
// types, there might be races during histogram accumulation and snapshotting
// that we choose to accept. In this case, the tallies might mismatch even
// when no memory corruption has happened.
- HistogramBase::Count redundant_count_;
+ HistogramBase::AtomicCount redundant_count_;
};
class BASE_EXPORT SampleCountIterator {
« no previous file with comments | « base/metrics/histogram_base.h ('k') | base/metrics/histogram_samples.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698