| 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" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 public: | 68 public: |
| 69 IsolateProfilerData(SampleBuffer* sample_buffer, bool own_sample_buffer); | 69 IsolateProfilerData(SampleBuffer* sample_buffer, bool own_sample_buffer); |
| 70 ~IsolateProfilerData(); | 70 ~IsolateProfilerData(); |
| 71 | 71 |
| 72 SampleBuffer* sample_buffer() const { return sample_buffer_; } | 72 SampleBuffer* sample_buffer() const { return sample_buffer_; } |
| 73 | 73 |
| 74 void set_sample_buffer(SampleBuffer* sample_buffer) { | 74 void set_sample_buffer(SampleBuffer* sample_buffer) { |
| 75 sample_buffer_ = sample_buffer; | 75 sample_buffer_ = sample_buffer; |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool blocked() const { |
| 79 return block_count_ > 0; |
| 80 } |
| 81 |
| 82 void Block(); |
| 83 |
| 84 void Unblock(); |
| 85 |
| 78 private: | 86 private: |
| 79 SampleBuffer* sample_buffer_; | 87 SampleBuffer* sample_buffer_; |
| 80 bool own_sample_buffer_; | 88 bool own_sample_buffer_; |
| 89 intptr_t block_count_; |
| 81 | 90 |
| 82 DISALLOW_COPY_AND_ASSIGN(IsolateProfilerData); | 91 DISALLOW_COPY_AND_ASSIGN(IsolateProfilerData); |
| 83 }; | 92 }; |
| 84 | 93 |
| 85 | 94 |
| 86 class SampleVisitor : public ValueObject { | 95 class SampleVisitor : public ValueObject { |
| 87 public: | 96 public: |
| 88 explicit SampleVisitor(Isolate* isolate) : isolate_(isolate), visited_(0) { } | 97 explicit SampleVisitor(Isolate* isolate) : isolate_(isolate), visited_(0) { } |
| 89 virtual ~SampleVisitor() {} | 98 virtual ~SampleVisitor() {} |
| 90 | 99 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 intptr_t capacity_; | 306 intptr_t capacity_; |
| 298 uintptr_t cursor_; | 307 uintptr_t cursor_; |
| 299 | 308 |
| 300 DISALLOW_COPY_AND_ASSIGN(SampleBuffer); | 309 DISALLOW_COPY_AND_ASSIGN(SampleBuffer); |
| 301 }; | 310 }; |
| 302 | 311 |
| 303 | 312 |
| 304 } // namespace dart | 313 } // namespace dart |
| 305 | 314 |
| 306 #endif // VM_PROFILER_H_ | 315 #endif // VM_PROFILER_H_ |
| OLD | NEW |