Index: dart/runtime/vm/profiler.h |
=================================================================== |
--- dart/runtime/vm/profiler.h (revision 31530) |
+++ dart/runtime/vm/profiler.h (working copy) |
@@ -16,6 +16,7 @@ |
// Forward declarations. |
class JSONArray; |
class JSONStream; |
+class ProfilerCodeRegionTable; |
struct Sample; |
// Profiler |
@@ -31,10 +32,10 @@ |
static void BeginExecution(Isolate* isolate); |
static void EndExecution(Isolate* isolate); |
- static void PrintToJSONStream(Isolate* isolate, JSONStream* stream); |
+ static void PrintToJSONStream(Isolate* isolate, JSONStream* stream, |
+ bool full); |
+ static void WriteProfile(Isolate* isolate); |
- static void WriteTracing(Isolate* isolate); |
- |
static SampleBuffer* sample_buffer() { |
return sample_buffer_; |
} |
@@ -43,9 +44,14 @@ |
static bool initialized_; |
static Monitor* monitor_; |
- static void WriteTracingSample(Isolate* isolate, intptr_t pid, |
- Sample* sample, JSONArray& events); |
+ static intptr_t ProcessSamples(Isolate* isolate, |
+ ProfilerCodeRegionTable* code_region_table, |
+ SampleBuffer* sample_buffer); |
+ static intptr_t ProcessSample(Isolate* isolate, |
+ ProfilerCodeRegionTable* code_region_table, |
+ Sample* sample); |
+ |
static void RecordTickInterruptCallback(const InterruptedThreadState& state, |
void* data); |
@@ -76,9 +82,6 @@ |
// Profile sample. |
struct Sample { |
- static const char* kLookupSymbol; |
- static const char* kNoSymbol; |
- static const char* kNoFrame; |
static const intptr_t kNumStackFrames = 6; |
enum SampleType { |
kIsolateStart, |
@@ -109,10 +112,10 @@ |
Sample* ReserveSample(); |
- Sample* GetSample(intptr_t i) const { |
+ Sample GetSample(intptr_t i) const { |
ASSERT(i >= 0); |
ASSERT(i < capacity_); |
- return &samples_[i]; |
+ return samples_[i]; |
} |
private: |