Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: runtime/vm/timeline.h

Issue 2977663003: [vm] Support flow events in Dart_TimelineEvent. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 enum EventType { 151 enum EventType {
152 kNone, 152 kNone,
153 kBegin, 153 kBegin,
154 kEnd, 154 kEnd,
155 kDuration, 155 kDuration,
156 kInstant, 156 kInstant,
157 kAsyncBegin, 157 kAsyncBegin,
158 kAsyncInstant, 158 kAsyncInstant,
159 kAsyncEnd, 159 kAsyncEnd,
160 kCounter, 160 kCounter,
161 kFlowBegin,
162 kFlowStep,
163 kFlowEnd,
161 kMetadata, 164 kMetadata,
162 kNumEventTypes, 165 kNumEventTypes,
163 }; 166 };
164 167
165 TimelineEvent(); 168 TimelineEvent();
166 ~TimelineEvent(); 169 ~TimelineEvent();
167 170
168 void Reset(); 171 void Reset();
169 172
170 bool IsValid() const { 173 bool IsValid() const {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int64_t micros = OS::GetCurrentMonotonicMicros(), 206 int64_t micros = OS::GetCurrentMonotonicMicros(),
204 int64_t thread_micros = OS::GetCurrentThreadCPUMicros()); 207 int64_t thread_micros = OS::GetCurrentThreadCPUMicros());
205 208
206 void End(const char* label, 209 void End(const char* label,
207 int64_t micros = OS::GetCurrentMonotonicMicros(), 210 int64_t micros = OS::GetCurrentMonotonicMicros(),
208 int64_t thread_micros = OS::GetCurrentThreadCPUMicros()); 211 int64_t thread_micros = OS::GetCurrentThreadCPUMicros());
209 212
210 void Counter(const char* label, 213 void Counter(const char* label,
211 int64_t micros = OS::GetCurrentMonotonicMicros()); 214 int64_t micros = OS::GetCurrentMonotonicMicros());
212 215
216 void FlowBegin(const char* label,
217 int64_t async_id,
218 int64_t micros = OS::GetCurrentMonotonicMicros());
219 void FlowStep(const char* label,
220 int64_t async_id,
221 int64_t micros = OS::GetCurrentMonotonicMicros());
222 void FlowEnd(const char* label,
223 int64_t async_id,
224 int64_t micros = OS::GetCurrentMonotonicMicros());
225
213 void Metadata(const char* label, 226 void Metadata(const char* label,
214 int64_t micros = OS::GetCurrentMonotonicMicros()); 227 int64_t micros = OS::GetCurrentMonotonicMicros());
215 228
216 // Completes this event with pre-serialized JSON. Copies |json|. 229 // Completes this event with pre-serialized JSON. Copies |json|.
217 void CompleteWithPreSerializedJSON(const char* json); 230 void CompleteWithPreSerializedJSON(const char* json);
218 231
219 // Set the number of arguments in the event. 232 // Set the number of arguments in the event.
220 void SetNumArguments(intptr_t length); 233 void SetNumArguments(intptr_t length);
221 // |name| must be a compile time constant. Takes ownership of |argument|. 234 // |name| must be a compile time constant. Takes ownership of |argument|.
222 void SetArgument(intptr_t i, const char* name, char* argument); 235 void SetArgument(intptr_t i, const char* name, char* argument);
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 862
850 private: 863 private:
851 TimelineEventBlock* current_; 864 TimelineEventBlock* current_;
852 TimelineEventRecorder* recorder_; 865 TimelineEventRecorder* recorder_;
853 }; 866 };
854 867
855 868
856 } // namespace dart 869 } // namespace dart
857 870
858 #endif // RUNTIME_VM_TIMELINE_H_ 871 #endif // RUNTIME_VM_TIMELINE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698