| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_PROFILER_H_ | 5 #ifndef VM_PROFILER_H_ |
| 6 #define VM_PROFILER_H_ | 6 #define VM_PROFILER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/code_observers.h" | 9 #include "vm/code_observers.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| 11 #include "vm/thread.h" | 11 #include "vm/thread.h" |
| 12 #include "vm/thread_interrupter.h" | 12 #include "vm/thread_interrupter.h" |
| 13 | 13 |
| 14 namespace dart { | 14 namespace dart { |
| 15 | 15 |
| 16 // Forward declarations. | 16 // Forward declarations. |
| 17 class JSONArray; | 17 class JSONArray; |
| 18 class JSONStream; | 18 class JSONStream; |
| 19 class ProfilerCodeRegionTable; | 19 class ProfilerCodeRegionTable; |
| 20 struct Sample; | 20 struct Sample; |
| 21 | 21 |
| 22 // Profiler | 22 // Profiler |
| 23 class Profiler : public AllStatic { | 23 class Profiler : public AllStatic { |
| 24 public: | 24 public: |
| 25 static void InitOnce(); | 25 static void InitOnce(); |
| 26 static void Shutdown(); | 26 static void Shutdown(); |
| 27 | 27 |
| 28 static void InitProfilingForIsolate(Isolate* isolate, | 28 static void InitProfilingForIsolate(Isolate* isolate, |
| 29 bool shared_buffer = false); | 29 bool shared_buffer = true); |
| 30 static void ShutdownProfilingForIsolate(Isolate* isolate); | 30 static void ShutdownProfilingForIsolate(Isolate* isolate); |
| 31 | 31 |
| 32 static void BeginExecution(Isolate* isolate); | 32 static void BeginExecution(Isolate* isolate); |
| 33 static void EndExecution(Isolate* isolate); | 33 static void EndExecution(Isolate* isolate); |
| 34 | 34 |
| 35 static void PrintToJSONStream(Isolate* isolate, JSONStream* stream, | 35 static void PrintToJSONStream(Isolate* isolate, JSONStream* stream, |
| 36 bool full); | 36 bool full); |
| 37 static void WriteProfile(Isolate* isolate); | 37 static void WriteProfile(Isolate* isolate); |
| 38 | 38 |
| 39 static SampleBuffer* sample_buffer() { | 39 static SampleBuffer* sample_buffer() { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 const uintptr_t original_pc_; | 152 const uintptr_t original_pc_; |
| 153 const uintptr_t original_fp_; | 153 const uintptr_t original_fp_; |
| 154 const uintptr_t original_sp_; | 154 const uintptr_t original_sp_; |
| 155 uintptr_t lower_bound_; | 155 uintptr_t lower_bound_; |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 | 158 |
| 159 } // namespace dart | 159 } // namespace dart |
| 160 | 160 |
| 161 #endif // VM_PROFILER_H_ | 161 #endif // VM_PROFILER_H_ |
| OLD | NEW |