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

Unified Diff: src/libsampler/sampler.h

Issue 2912773002: Rename "NoBarrier" memory operations to "Relaxed". (Closed)
Patch Set: comment 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 | « src/libplatform/tracing/tracing-controller.cc ('k') | src/libsampler/sampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libsampler/sampler.h
diff --git a/src/libsampler/sampler.h b/src/libsampler/sampler.h
index 311d577e1e4ecc66a342ad218f4586bd51d975be..6ce6798a442182a5709a184785f54483f7b7eeff 100644
--- a/src/libsampler/sampler.h
+++ b/src/libsampler/sampler.h
@@ -46,24 +46,24 @@ class Sampler {
// Whether the sampling thread should use this Sampler for CPU profiling?
bool IsProfiling() const {
- return base::NoBarrier_Load(&profiling_) > 0 &&
- !base::NoBarrier_Load(&has_processing_thread_);
+ return base::Relaxed_Load(&profiling_) > 0 &&
+ !base::Relaxed_Load(&has_processing_thread_);
}
void IncreaseProfilingDepth();
void DecreaseProfilingDepth();
// Whether the sampler is running (that is, consumes resources).
- bool IsActive() const { return base::NoBarrier_Load(&active_) != 0; }
+ bool IsActive() const { return base::Relaxed_Load(&active_) != 0; }
// CpuProfiler collects samples by calling DoSample directly
// without calling Start. To keep it working, we register the sampler
// with the CpuProfiler.
- bool IsRegistered() const { return base::NoBarrier_Load(&registered_) != 0; }
+ bool IsRegistered() const { return base::Relaxed_Load(&registered_) != 0; }
void DoSample();
void SetHasProcessingThread(bool value) {
- base::NoBarrier_Store(&has_processing_thread_, value);
+ base::Relaxed_Store(&has_processing_thread_, value);
}
// Used in tests to make sure that stack sampling is performed.
@@ -85,8 +85,8 @@ class Sampler {
unsigned external_sample_count_;
private:
- void SetActive(bool value) { base::NoBarrier_Store(&active_, value); }
- void SetRegistered(bool value) { base::NoBarrier_Store(&registered_, value); }
+ void SetActive(bool value) { base::Relaxed_Store(&active_, value); }
+ void SetRegistered(bool value) { base::Relaxed_Store(&registered_, value); }
Isolate* isolate_;
base::Atomic32 profiling_;
« no previous file with comments | « src/libplatform/tracing/tracing-controller.cc ('k') | src/libsampler/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698