Chromium Code Reviews| 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" |
| 11 #include "vm/bitfield.h" | 11 #include "vm/bitfield.h" |
| 12 #include "vm/growable_array.h" | 12 #include "vm/growable_array.h" |
| 13 #include "vm/os.h" | 13 #include "vm/os.h" |
| 14 #include "vm/os_thread.h" | 14 #include "vm/os_thread.h" |
| 15 | 15 |
| 16 namespace dart { | 16 namespace dart { |
| 17 | 17 |
| 18 class JSONArray; | 18 class JSONArray; |
| 19 class JSONObject; | 19 class JSONObject; |
| 20 class JSONStream; | 20 class JSONStream; |
| 21 class Object; | 21 class Object; |
| 22 class ObjectPointerVisitor; | 22 class ObjectPointerVisitor; |
| 23 class Isolate; | 23 class Isolate; |
| 24 class RawArray; | 24 class RawArray; |
| 25 class Thread; | 25 class Thread; |
| 26 class TimelineEvent; | 26 class TimelineEvent; |
| 27 class TimelineEventBlock; | 27 class TimelineEventBlock; |
| 28 class TimelineEventRecorder; | 28 class TimelineEventRecorder; |
| 29 class TimelineStream; | 29 class TimelineStream; |
| 30 class VirtualMemory; | |
|
zra
2017/07/27 19:05:44
Why can't/shouldn't this #include "vm/virtual_memo
rmacnak
2017/07/27 20:24:33
It doesn't need it. timeline.h gets included in a
| |
| 30 class Zone; | 31 class Zone; |
| 31 | 32 |
| 32 // (name, enabled by default for isolate). | 33 // (name, enabled by default for isolate). |
| 33 #define TIMELINE_STREAM_LIST(V) \ | 34 #define TIMELINE_STREAM_LIST(V) \ |
| 34 V(API, false) \ | 35 V(API, false) \ |
| 35 V(Compiler, false) \ | 36 V(Compiler, false) \ |
| 36 V(Dart, false) \ | 37 V(Dart, false) \ |
| 37 V(Debugger, false) \ | 38 V(Debugger, false) \ |
| 38 V(Embedder, false) \ | 39 V(Embedder, false) \ |
| 39 V(GC, false) \ | 40 V(GC, false) \ |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 698 | 699 |
| 699 protected: | 700 protected: |
| 700 TimelineEvent* StartEvent(); | 701 TimelineEvent* StartEvent(); |
| 701 void CompleteEvent(TimelineEvent* event); | 702 void CompleteEvent(TimelineEvent* event); |
| 702 TimelineEventBlock* GetHeadBlockLocked(); | 703 TimelineEventBlock* GetHeadBlockLocked(); |
| 703 intptr_t FindOldestBlockIndex() const; | 704 intptr_t FindOldestBlockIndex() const; |
| 704 void Clear(); | 705 void Clear(); |
| 705 | 706 |
| 706 void PrintJSONEvents(JSONArray* array, TimelineEventFilter* filter); | 707 void PrintJSONEvents(JSONArray* array, TimelineEventFilter* filter); |
| 707 | 708 |
| 708 TimelineEventBlock** blocks_; | 709 VirtualMemory* memory_; |
| 710 TimelineEventBlock* blocks_; | |
| 709 intptr_t capacity_; | 711 intptr_t capacity_; |
| 710 intptr_t num_blocks_; | 712 intptr_t num_blocks_; |
| 711 intptr_t block_cursor_; | 713 intptr_t block_cursor_; |
| 712 }; | 714 }; |
| 713 | 715 |
| 714 // A recorder that stores events in a buffer of fixed capacity. When the buffer | 716 // A recorder that stores events in a buffer of fixed capacity. When the buffer |
| 715 // is full, new events overwrite old events. | 717 // is full, new events overwrite old events. |
| 716 class TimelineEventRingRecorder : public TimelineEventFixedBufferRecorder { | 718 class TimelineEventRingRecorder : public TimelineEventFixedBufferRecorder { |
| 717 public: | 719 public: |
| 718 explicit TimelineEventRingRecorder(intptr_t capacity = kDefaultCapacity) | 720 explicit TimelineEventRingRecorder(intptr_t capacity = kDefaultCapacity) |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 910 TimelineEvent* event, | 912 TimelineEvent* event, |
| 911 int64_t start, | 913 int64_t start, |
| 912 const char* category, | 914 const char* category, |
| 913 const char* name, | 915 const char* name, |
| 914 const char* args); | 916 const char* args); |
| 915 }; | 917 }; |
| 916 | 918 |
| 917 } // namespace dart | 919 } // namespace dart |
| 918 | 920 |
| 919 #endif // RUNTIME_VM_TIMELINE_H_ | 921 #endif // RUNTIME_VM_TIMELINE_H_ |
| OLD | NEW |