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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1849643002: Add support for async, metadata, and counter timeline events to be reported by the embedder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/include/dart_tools_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « runtime/include/dart_tools_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698