Index: src/cpu-profiler.h |
diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h |
index 77fdb0681ba871a79cb30af671a0b8d200a25bcc..e31b47dda9983b2f5b10caf750345af16c8b1bdc 100644 |
--- a/src/cpu-profiler.h |
+++ b/src/cpu-profiler.h |
@@ -156,7 +156,7 @@ class ProfilerEventsProcessor : public Thread { |
// Thread control. |
virtual void Run(); |
- inline void Stop() { running_ = false; } |
+ void StopSynchronously(); |
INLINE(bool running()) { return running_; } |
void Enqueue(const CodeEventsContainer& event); |
@@ -171,15 +171,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_code_event_id_; |
+ unsigned last_processed_code_event_id_; |
}; |
@@ -251,6 +252,9 @@ class CpuProfiler { |
return &is_profiling_; |
} |
+ ProfileGenerator* generator() const { return generator_; } |
+ ProfilerEventsProcessor* processor() const { return processor_; } |
+ |
private: |
void StartProcessorIfNotStarted(); |
void StopProcessorIfLastProfile(const char* title); |