| 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/bitfield.h" | 9 #include "vm/bitfield.h" |
| 10 #include "vm/code_observers.h" | 10 #include "vm/code_observers.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // * Accessing TLS -- Because on Windows the callback will be running in a | 47 // * Accessing TLS -- Because on Windows the callback will be running in a |
| 48 // different thread. | 48 // different thread. |
| 49 // * Allocating memory -- Because this takes locks which may already be | 49 // * Allocating memory -- Because this takes locks which may already be |
| 50 // held, resulting in a dead lock. | 50 // held, resulting in a dead lock. |
| 51 // * Taking a lock -- See above. | 51 // * Taking a lock -- See above. |
| 52 static void SampleThread(Thread* thread, | 52 static void SampleThread(Thread* thread, |
| 53 const InterruptedThreadState& state); | 53 const InterruptedThreadState& state); |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 static bool initialized_; | 56 static bool initialized_; |
| 57 static Monitor* monitor_; | |
| 58 | 57 |
| 59 static SampleBuffer* sample_buffer_; | 58 static SampleBuffer* sample_buffer_; |
| 60 | 59 |
| 61 friend class Thread; | 60 friend class Thread; |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 | 63 |
| 65 class SampleVisitor : public ValueObject { | 64 class SampleVisitor : public ValueObject { |
| 66 public: | 65 public: |
| 67 explicit SampleVisitor(Isolate* isolate) : isolate_(isolate), visited_(0) { } | 66 explicit SampleVisitor(Isolate* isolate) : isolate_(isolate), visited_(0) { } |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 private: | 633 private: |
| 635 ZoneGrowableArray<ProcessedSample*> samples_; | 634 ZoneGrowableArray<ProcessedSample*> samples_; |
| 636 CodeLookupTable* code_lookup_table_; | 635 CodeLookupTable* code_lookup_table_; |
| 637 | 636 |
| 638 DISALLOW_COPY_AND_ASSIGN(ProcessedSampleBuffer); | 637 DISALLOW_COPY_AND_ASSIGN(ProcessedSampleBuffer); |
| 639 }; | 638 }; |
| 640 | 639 |
| 641 } // namespace dart | 640 } // namespace dart |
| 642 | 641 |
| 643 #endif // VM_PROFILER_H_ | 642 #endif // VM_PROFILER_H_ |
| OLD | NEW |