| Index: src/cpu-profiler.h
|
| diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h
|
| index a6eccffb6bc6f025ca73833e66cf61a0c23fb527..8aba5426d5a53d62fde790d30a45a1f51f463b01 100644
|
| --- a/src/cpu-profiler.h
|
| +++ b/src/cpu-profiler.h
|
| @@ -31,6 +31,7 @@
|
| #include "allocation.h"
|
| #include "atomicops.h"
|
| #include "circular-queue.h"
|
| +#include "platform/time.h"
|
| #include "sampler.h"
|
| #include "unbound-queue.h"
|
|
|
| @@ -160,9 +161,13 @@ class ProfilerEventsProcessor : public Thread {
|
| private:
|
| // Called from events processing thread (Run() method.)
|
| bool ProcessCodeEvent();
|
| - bool ProcessTicks();
|
|
|
| - void ProcessEventsAndDoSample();
|
| + enum SampleProcessingResult {
|
| + OneSampleProcessed,
|
| + FoundSampleForNextCodeEvent,
|
| + NoSamplesInQueue
|
| + };
|
| + SampleProcessingResult ProcessOneSample();
|
|
|
| ProfileGenerator* generator_;
|
| Sampler* sampler_;
|
| @@ -203,6 +208,7 @@ class CpuProfiler : public CodeEventListener {
|
|
|
| virtual ~CpuProfiler();
|
|
|
| + void set_sampling_interval(TimeDelta value);
|
| void StartProfiling(const char* title, bool record_samples = false);
|
| void StartProfiling(String* title, bool record_samples);
|
| CpuProfile* StopProfiling(const char* title);
|
| @@ -260,6 +266,7 @@ class CpuProfiler : public CodeEventListener {
|
| void LogBuiltins();
|
|
|
| Isolate* isolate_;
|
| + TimeDelta sampling_interval_;
|
| CpuProfilesCollection* profiles_;
|
| unsigned next_profile_uid_;
|
| ProfileGenerator* generator_;
|
|
|