| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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_TIMELINE_H_ | 5 #ifndef VM_TIMELINE_H_ |
| 6 #define VM_TIMELINE_H_ | 6 #define VM_TIMELINE_H_ |
| 7 | 7 |
| 8 #include "include/dart_tools_api.h" | 8 #include "include/dart_tools_api.h" |
| 9 | 9 |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // NOTE: It is not allowed to call StartEvent again without completing | 64 // NOTE: It is not allowed to call StartEvent again without completing |
| 65 // the first event. | 65 // the first event. |
| 66 TimelineEvent* StartEvent(); | 66 TimelineEvent* StartEvent(); |
| 67 | 67 |
| 68 static intptr_t enabled_offset() { | 68 static intptr_t enabled_offset() { |
| 69 return OFFSET_OF(TimelineStream, enabled_); | 69 return OFFSET_OF(TimelineStream, enabled_); |
| 70 } | 70 } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 const char* name_; | 73 const char* name_; |
| 74 |
| 75 // This field is accessed by generated code (intrinsic) and expects to see |
| 76 // 0 or 1. If this becomes a BitField, the generated code must be updated. |
| 74 uintptr_t enabled_; | 77 uintptr_t enabled_; |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 class Timeline : public AllStatic { | 80 class Timeline : public AllStatic { |
| 78 public: | 81 public: |
| 79 // Initialize timeline system. Not thread safe. | 82 // Initialize timeline system. Not thread safe. |
| 80 static void InitOnce(); | 83 static void InitOnce(); |
| 81 | 84 |
| 82 // Shutdown timeline system. Not thread safe. | 85 // Shutdown timeline system. Not thread safe. |
| 83 static void Shutdown(); | 86 static void Shutdown(); |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 | 881 |
| 879 private: | 882 private: |
| 880 TimelineEventBlock* current_; | 883 TimelineEventBlock* current_; |
| 881 TimelineEventRecorder* recorder_; | 884 TimelineEventRecorder* recorder_; |
| 882 }; | 885 }; |
| 883 | 886 |
| 884 | 887 |
| 885 } // namespace dart | 888 } // namespace dart |
| 886 | 889 |
| 887 #endif // VM_TIMELINE_H_ | 890 #endif // VM_TIMELINE_H_ |
| OLD | NEW |