| 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 RUNTIME_VM_TIMELINE_H_ | 5 #ifndef RUNTIME_VM_TIMELINE_H_ |
| 6 #define RUNTIME_VM_TIMELINE_H_ | 6 #define RUNTIME_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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 }; | 746 }; |
| 747 | 747 |
| 748 #if defined(HOST_OS_FUCHSIA) | 748 #if defined(HOST_OS_FUCHSIA) |
| 749 // A recorder that sends events to Fuchsia's tracing app. Events are also stored | 749 // A recorder that sends events to Fuchsia's tracing app. Events are also stored |
| 750 // in a buffer of fixed capacity. When the buffer is full, new events overwrite | 750 // in a buffer of fixed capacity. When the buffer is full, new events overwrite |
| 751 // old events. | 751 // old events. |
| 752 // See: https://fuchsia.googlesource.com/tracing/+/HEAD/docs/usage_guide.md | 752 // See: https://fuchsia.googlesource.com/tracing/+/HEAD/docs/usage_guide.md |
| 753 class TimelineEventFuchsiaRecorder : public TimelineEventFixedBufferRecorder { | 753 class TimelineEventFuchsiaRecorder : public TimelineEventFixedBufferRecorder { |
| 754 public: | 754 public: |
| 755 explicit TimelineEventFuchsiaRecorder(intptr_t capacity = kDefaultCapacity); | 755 explicit TimelineEventFuchsiaRecorder(intptr_t capacity = kDefaultCapacity); |
| 756 virtual ~TimelineEventFuchsiaRecorder() {} | 756 virtual ~TimelineEventFuchsiaRecorder(); |
| 757 | 757 |
| 758 const char* name() const { return "Fuchsia"; } | 758 const char* name() const { return "Fuchsia"; } |
| 759 | 759 |
| 760 protected: | 760 protected: |
| 761 TimelineEventBlock* GetNewBlockLocked(); | 761 TimelineEventBlock* GetNewBlockLocked(); |
| 762 void CompleteEvent(TimelineEvent* event); | 762 void CompleteEvent(TimelineEvent* event); |
| 763 }; | 763 }; |
| 764 #endif // defined(HOST_OS_FUCHSIA) | 764 #endif // defined(HOST_OS_FUCHSIA) |
| 765 | 765 |
| 766 // A recorder that stores events in a buffer of fixed capacity. When the buffer | 766 // A recorder that stores events in a buffer of fixed capacity. When the buffer |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 TimelineEventBlock* Next(); | 844 TimelineEventBlock* Next(); |
| 845 | 845 |
| 846 private: | 846 private: |
| 847 TimelineEventBlock* current_; | 847 TimelineEventBlock* current_; |
| 848 TimelineEventRecorder* recorder_; | 848 TimelineEventRecorder* recorder_; |
| 849 }; | 849 }; |
| 850 | 850 |
| 851 } // namespace dart | 851 } // namespace dart |
| 852 | 852 |
| 853 #endif // RUNTIME_VM_TIMELINE_H_ | 853 #endif // RUNTIME_VM_TIMELINE_H_ |
| OLD | NEW |