Chromium Code Reviews| Index: src/cpu-profiler.h |
| diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h |
| index 77fdb0681ba871a79cb30af671a0b8d200a25bcc..64b8e198e747e833124611ae91d491be4a2ddfae 100644 |
| --- a/src/cpu-profiler.h |
| +++ b/src/cpu-profiler.h |
| @@ -154,9 +154,12 @@ class ProfilerEventsProcessor : public Thread { |
| explicit ProfilerEventsProcessor(ProfileGenerator* generator); |
| virtual ~ProfilerEventsProcessor() {} |
| + // Processes all code events and starts the thread. |
| + void Start(); |
|
yurys
2013/07/05 13:10:00
There is already non-virtual method Start in Threa
loislo
2013/07/05 13:15:37
reverted
|
| + |
| // Thread control. |
| virtual void Run(); |
| - inline void Stop() { running_ = false; } |
| + void Stop(); |
| INLINE(bool running()) { return running_; } |
| void Enqueue(const CodeEventsContainer& event); |
| @@ -171,15 +174,16 @@ class ProfilerEventsProcessor : public Thread { |
| private: |
| // Called from events processing thread (Run() method.) |
| - bool ProcessCodeEvent(unsigned* dequeue_order); |
| - bool ProcessTicks(unsigned dequeue_order); |
| + bool ProcessCodeEvent(); |
| + bool ProcessTicks(); |
| ProfileGenerator* generator_; |
| bool running_; |
| UnboundQueue<CodeEventsContainer> events_buffer_; |
| SamplingCircularQueue ticks_buffer_; |
| UnboundQueue<TickSampleEventRecord> ticks_from_vm_buffer_; |
| - unsigned enqueue_order_; |
| + unsigned last_recorded_code_event_id_; |
|
yurys
2013/07/05 13:10:00
last_code_event_id_
loislo
2013/07/05 13:15:37
Done.
|
| + unsigned last_processed_code_event_id_; |
| }; |
| @@ -251,6 +255,9 @@ class CpuProfiler { |
| return &is_profiling_; |
| } |
| + ProfileGenerator* generator() const { return generator_; } |
| + ProfilerEventsProcessor* processor() const { return processor_; } |
| + |
| private: |
| void StartProcessorIfNotStarted(); |
| void StopProcessorIfLastProfile(const char* title); |