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

Unified Diff: src/sampler.h

Issue 316133002: Move atomic ops and related files to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 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/runtime-profiler.h ('k') | src/sampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sampler.h
diff --git a/src/sampler.h b/src/sampler.h
index b45388e687af8bd5bf458263b4a1bd284d58b497..fe94a02e9350d1437d5ac63fc22a03f8989f6758 100644
--- a/src/sampler.h
+++ b/src/sampler.h
@@ -5,7 +5,7 @@
#ifndef V8_SAMPLER_H_
#define V8_SAMPLER_H_
-#include "src/atomicops.h"
+#include "src/base/atomicops.h"
#include "src/frames.h"
#include "src/globals.h"
@@ -74,20 +74,20 @@ class Sampler {
// Whether the sampling thread should use this Sampler for CPU profiling?
bool IsProfiling() const {
- return NoBarrier_Load(&profiling_) > 0 &&
- !NoBarrier_Load(&has_processing_thread_);
+ return base::NoBarrier_Load(&profiling_) > 0 &&
+ !base::NoBarrier_Load(&has_processing_thread_);
}
void IncreaseProfilingDepth();
void DecreaseProfilingDepth();
// Whether the sampler is running (that is, consumes resources).
- bool IsActive() const { return NoBarrier_Load(&active_); }
+ bool IsActive() const { return base::NoBarrier_Load(&active_); }
void DoSample();
// If true next sample must be initiated on the profiler event processor
// thread right after latest sample is processed.
void SetHasProcessingThread(bool value) {
- NoBarrier_Store(&has_processing_thread_, value);
+ base::NoBarrier_Store(&has_processing_thread_, value);
}
// Used in tests to make sure that stack sampling is performed.
@@ -108,13 +108,13 @@ class Sampler {
virtual void Tick(TickSample* sample) = 0;
private:
- void SetActive(bool value) { NoBarrier_Store(&active_, value); }
+ void SetActive(bool value) { base::NoBarrier_Store(&active_, value); }
Isolate* isolate_;
const int interval_;
- Atomic32 profiling_;
- Atomic32 has_processing_thread_;
- Atomic32 active_;
+ base::Atomic32 profiling_;
+ base::Atomic32 has_processing_thread_;
+ base::Atomic32 active_;
PlatformData* data_; // Platform specific data.
bool is_counting_samples_;
// Counts stack samples taken in JS VM state.
« no previous file with comments | « src/runtime-profiler.h ('k') | src/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698