Index: runtime/vm/profiler.h |
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h |
index ff8e14853d20a9caff4f295efa730c498b5988c8..138f5474ab661b028a5aaa5c8d89ebec0c37a77f 100644 |
--- a/runtime/vm/profiler.h |
+++ b/runtime/vm/profiler.h |
@@ -33,10 +33,6 @@ class Profiler : public AllStatic { |
static void SetSampleDepth(intptr_t depth); |
static void SetSamplePeriod(intptr_t period); |
- static void InitProfilingForIsolate(Isolate* isolate, |
- bool shared_buffer = true); |
- static void ShutdownProfilingForIsolate(Isolate* isolate); |
- |
static void BeginExecution(Isolate* isolate); |
static void EndExecution(Isolate* isolate); |
@@ -44,47 +40,24 @@ class Profiler : public AllStatic { |
return sample_buffer_; |
} |
- static void RecordAllocation(Thread* thread, intptr_t cid); |
+ static void SampleAllocation(Thread* thread, intptr_t cid); |
+ static void SampleThread(Thread* thread, |
+ uintptr_t pc, |
+ uintptr_t fp, |
+ uintptr_t sp); |
private: |
static bool initialized_; |
static Monitor* monitor_; |
- static void RecordSampleInterruptCallback(const InterruptedThreadState& state, |
- void* data); |
+ static void SampleThreadInterruptCallback( |
+ Thread* thread, |
+ const InterruptedThreadState& state); |
static SampleBuffer* sample_buffer_; |
}; |
-class IsolateProfilerData { |
- public: |
- IsolateProfilerData(SampleBuffer* sample_buffer, bool own_sample_buffer); |
- ~IsolateProfilerData(); |
- |
- SampleBuffer* sample_buffer() const { return sample_buffer_; } |
- |
- void set_sample_buffer(SampleBuffer* sample_buffer) { |
- sample_buffer_ = sample_buffer; |
- } |
- |
- bool blocked() const { |
- return block_count_ > 0; |
- } |
- |
- void Block(); |
- |
- void Unblock(); |
- |
- private: |
- SampleBuffer* sample_buffer_; |
- bool own_sample_buffer_; |
- intptr_t block_count_; |
- |
- DISALLOW_COPY_AND_ASSIGN(IsolateProfilerData); |
-}; |
- |
- |
class SampleVisitor : public ValueObject { |
public: |
explicit SampleVisitor(Isolate* isolate) : isolate_(isolate), visited_(0) { } |