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

Unified Diff: base/metrics/histogram_samples.cc

Issue 23450016: Re-land https://codereview.chromium.org/23602005: Use nobarrier atomics for lossy counters in base:… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 | « base/metrics/histogram_base.h ('k') | base/metrics/sample_vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_samples.cc
===================================================================
--- base/metrics/histogram_samples.cc (revision 221170)
+++ base/metrics/histogram_samples.cc (working copy)
@@ -113,7 +113,8 @@
}
void HistogramSamples::IncreaseRedundantCount(HistogramBase::Count diff) {
- redundant_count_ += diff;
+ base::subtle::NoBarrier_Store(&redundant_count_,
+ base::subtle::NoBarrier_Load(&redundant_count_) + diff);
}
SampleCountIterator::~SampleCountIterator() {}
« no previous file with comments | « base/metrics/histogram_base.h ('k') | base/metrics/sample_vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698