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

Unified Diff: src/cpu-profiler.h

Issue 10857035: Moving cpu profiling into its own thread. (Closed) Base URL: http://git.chromium.org/external/v8.git@master
Patch Set: moved installing/restoring handler of SIGPROF to Sampler::Start/Stop Created 8 years, 3 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') | src/cpu-profiler.cc » ('J')
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 9cd44842095ccabe25d0ef74f0c0f0b53dde958d..9be1df15ee8837b50450ac22d34f3a8b55582ad9 100644
--- a/src/cpu-profiler.h
+++ b/src/cpu-profiler.h
@@ -124,7 +124,7 @@ class TickSampleEventRecord {
// methods called by event producers: VM and stack sampler threads.
class ProfilerEventsProcessor : public Thread {
public:
- explicit ProfilerEventsProcessor(ProfileGenerator* generator);
+ explicit ProfilerEventsProcessor(ProfileGenerator* generator, Sampler* sampler, int interval_in_useconds);
Jakob Kummerow 2012/09/04 11:10:51 long line. Put each argument onto its own line: ex
virtual ~ProfilerEventsProcessor() {}
// Thread control.
@@ -172,12 +172,16 @@ class ProfilerEventsProcessor : public Thread {
// Called from events processing thread (Run() method.)
bool ProcessCodeEvent(unsigned* dequeue_order);
- bool ProcessTicks(unsigned dequeue_order);
+ bool ProcessTicks(int64_t stop_time, unsigned dequeue_order);
+ void ProcessEventsQueue(int64_t stop_time, unsigned* dequeue_order);
INLINE(static bool FilterOutCodeCreateEvent(Logger::LogEventsAndTags tag));
ProfileGenerator* generator_;
+ Sampler* sampler_;
bool running_;
+ // Sampling interval in microseconds.
+ const int interval_in_useconds_;
UnboundQueue<CodeEventsContainer> events_buffer_;
SamplingCircularQueue ticks_buffer_;
UnboundQueue<TickSampleEventRecord> ticks_from_vm_buffer_;
« no previous file with comments | « no previous file | src/cpu-profiler.cc » ('j') | src/cpu-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698