Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 5f314a6db9d497900e3aa547c2e356b86349a7a3..ffcbc7da62e066a7ebdc1af8cc8c074e88f3ad1a 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -5947,7 +5947,7 @@ DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer, |
DART_EXPORT void Dart_TimelineEvent(const char* label, |
int64_t timestamp0, |
- int64_t timestamp1, |
+ int64_t timestamp1_or_async_id, |
Dart_Timeline_Event_Type type, |
intptr_t argument_count, |
const char** argument_names, |
@@ -5958,7 +5958,7 @@ DART_EXPORT void Dart_TimelineEvent(const char* label, |
if (type < Dart_Timeline_Event_Begin) { |
return; |
} |
- if (type > Dart_Timeline_Event_Duration) { |
+ if (type > Dart_Timeline_Event_Metadata) { |
return; |
} |
TimelineStream* stream = Timeline::GetEmbedderStream(); |
@@ -5978,7 +5978,22 @@ DART_EXPORT void Dart_TimelineEvent(const char* label, |
event->Instant(label, timestamp0); |
break; |
case Dart_Timeline_Event_Duration: |
- event->Duration(label, timestamp0, timestamp1); |
+ event->Duration(label, timestamp0, timestamp1_or_async_id); |
+ break; |
+ case Dart_Timeline_Event_Async_Begin: |
+ event->AsyncBegin(label, timestamp1_or_async_id, timestamp0); |
+ break; |
+ case Dart_Timeline_Event_Async_End: |
+ event->AsyncEnd(label, timestamp1_or_async_id, timestamp0); |
+ break; |
+ case Dart_Timeline_Event_Async_Instant: |
+ event->AsyncInstant(label, timestamp1_or_async_id, timestamp0); |
+ break; |
+ case Dart_Timeline_Event_Counter: |
+ event->Counter(label, timestamp0); |
+ break; |
+ case Dart_Timeline_Event_Metadata: |
+ event->Metadata(label, timestamp0); |
break; |
default: |
FATAL("Unknown Dart_Timeline_Event_Type"); |