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

Unified Diff: src/platform.h

Issue 12592002: Revert "Send SIGPROF signals on the profiler event processor thread" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/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 5fde6a009aa40a01e548429894810de9a45b5b90..56ac61dc7b6352a7323710daf5fd2c7445d28ef4 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -766,17 +766,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_);
- }
- void IncreaseProfilingDepth() {
- if (NoBarrier_AtomicIncrement(&profiling_, 1) == 1) StartProfiling();
- }
- void DecreaseProfilingDepth() {
- if (!NoBarrier_AtomicIncrement(&profiling_, -1)) StopProfiling();
- }
+ // 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_); }
@@ -792,14 +785,6 @@ class Sampler {
PlatformData* platform_data() { return data_; }
- // If true next sample must be initiated on the profiler event processor
- // thread right after latest sample is processed.
- static bool CanSampleOnProfilerEventsProcessorThread();
- void DoSample();
- void SetHasProcessingThread(bool value) {
- NoBarrier_Store(&has_processing_thread_, value);
- }
-
protected:
virtual void DoSampleStack(TickSample* sample) = 0;
@@ -807,15 +792,9 @@ class Sampler {
void SetActive(bool value) { NoBarrier_Store(&active_, value); }
void IncSamplesTaken() { if (++samples_taken_ < 0) samples_taken_ = 0; }
- // Perform platform-specific initialization before DoSample() may be invoked.
- void StartProfiling();
- // Perform platform-specific cleanup after profiling.
- void StopProfiling();
-
Isolate* isolate_;
const int interval_;
Atomic32 profiling_;
- Atomic32 has_processing_thread_;
Atomic32 active_;
PlatformData* data_; // Platform specific data.
int samples_taken_; // Counts stack samples taken.
« 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