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

Unified Diff: base/metrics/persistent_histogram_allocator.cc

Issue 2886453002: Use acquire/relase for delayed persistent allocations. (Closed)
Patch Set: rebased Created 3 years, 7 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 | base/metrics/persistent_memory_allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator.cc
diff --git a/base/metrics/persistent_histogram_allocator.cc b/base/metrics/persistent_histogram_allocator.cc
index ea1a23566ea6f42aaeba18a7fb9695649288fff8..e23c6353c7423829251a9c0fc8d7988dc0d9b887 100644
--- a/base/metrics/persistent_histogram_allocator.cc
+++ b/base/metrics/persistent_histogram_allocator.cc
@@ -610,7 +610,7 @@ std::unique_ptr<HistogramBase> PersistentHistogramAllocator::CreateHistogram(
size_t counts_bytes = CalculateRequiredCountsBytes(histogram_bucket_count);
PersistentMemoryAllocator::Reference counts_ref =
- subtle::NoBarrier_Load(&histogram_data_ptr->counts_ref);
+ subtle::Acquire_Load(&histogram_data_ptr->counts_ref);
if (counts_bytes == 0 ||
(counts_ref != 0 &&
memory_allocator_->GetAllocSize(counts_ref) < counts_bytes)) {
« no previous file with comments | « no previous file | base/metrics/persistent_memory_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698