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

Unified Diff: src/cpu-profiler.h

Issue 632313002: Fix data race on CpuProfiler::running_ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | src/cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.h
diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h
index c1e75a101adb095fb53e49bc7b67140d1b0d04eb..4dc5643aa1bc73fe8ccbcba72492e07f0d71ed2a 100644
--- a/src/cpu-profiler.h
+++ b/src/cpu-profiler.h
@@ -132,7 +132,7 @@ class ProfilerEventsProcessor : public base::Thread {
// Thread control.
virtual void Run();
void StopSynchronously();
- INLINE(bool running()) { return running_; }
+ INLINE(bool running()) { return !!base::NoBarrier_Load(&running_); }
void Enqueue(const CodeEventsContainer& event);
// Puts current stack into tick sample events buffer.
@@ -163,7 +163,7 @@ class ProfilerEventsProcessor : public base::Thread {
ProfileGenerator* generator_;
Sampler* sampler_;
- bool running_;
+ base::Atomic32 running_;
// Sampling period in microseconds.
const base::TimeDelta period_;
UnboundQueue<CodeEventsContainer> events_buffer_;
« no previous file with comments | « no previous file | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698