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

Unified Diff: src/platform.h

Issue 11428103: Revert "Perform CPU sampling by CPU sampling thread only iff processing thread is not running." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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/flag-definitions.h ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index 67f6792e1af52ee76d6dd58c16a46afb1a58403e..6f75ca83d5014e82715d1eb76de3a7e09b7449dc 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -753,9 +753,6 @@ class Sampler {
IncSamplesTaken();
}
- // Performs platform-specific stack sampling.
- void DoSample();
-
// This method is called for each sampling period with the current
// program counter.
virtual void Tick(TickSample* sample) = 0;
@@ -764,28 +761,10 @@ class Sampler {
void Start();
void Stop();
- // Whether the sampling thread should use this Sampler for CPU profiling?
- bool IsProfiling() const {
- return NoBarrier_Load(&profiling_) > 0 &&
- !NoBarrier_Load(&has_processing_thread_);
- }
- // Perform platform-specific initialization before DoSample() may be invoked.
- void StartSampling();
- // Perform platform-specific cleanup after samping.
- void StopSampling();
- void IncreaseProfilingDepth() {
- if (NoBarrier_AtomicIncrement(&profiling_, 1) == 1) {
- StartSampling();
- }
- }
- void DecreaseProfilingDepth() {
- if (!NoBarrier_AtomicIncrement(&profiling_, -1)) {
- StopSampling();
- }
- }
- void SetHasProcessingThread(bool value) {
- NoBarrier_Store(&has_processing_thread_, value);
- }
+ // Is the sampler used for profiling?
+ bool IsProfiling() const { return NoBarrier_Load(&profiling_) > 0; }
+ void IncreaseProfilingDepth() { NoBarrier_AtomicIncrement(&profiling_, 1); }
+ void DecreaseProfilingDepth() { NoBarrier_AtomicIncrement(&profiling_, -1); }
// Whether the sampler is running (that is, consumes resources).
bool IsActive() const { return NoBarrier_Load(&active_); }
@@ -812,7 +791,6 @@ class Sampler {
const int interval_;
Atomic32 profiling_;
Atomic32 active_;
- Atomic32 has_processing_thread_;
PlatformData* data_; // Platform specific data.
int samples_taken_; // Counts stack samples taken.
DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
« no previous file with comments | « src/flag-definitions.h ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698