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

Unified Diff: runtime/vm/timeline_fuchsia.cc

Issue 2985253002: [corelib] dart:developer timeline flow events (Closed)
Patch Set: Update changelog 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/timeline_android.cc ('k') | runtime/vm/timeline_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline_fuchsia.cc
diff --git a/runtime/vm/timeline_fuchsia.cc b/runtime/vm/timeline_fuchsia.cc
index 0c37b087877e31b9f510c2f2ac59ee113d1a427a..5a13bf1956e0064223c47bab7e3bd85c0a457ce3 100644
--- a/runtime/vm/timeline_fuchsia.cc
+++ b/runtime/vm/timeline_fuchsia.cc
@@ -188,6 +188,38 @@ void DartTimelineEventHelpers::ReportCompleteEvent(Thread* thread,
event->Complete();
}
+void DartTimelineEventHelpers::ReportFlowEvent(Thread* thread,
+ Zone* zone,
+ TimelineEvent* event,
+ int64_t start,
+ int64_t start_cpu,
+ const char* category,
+ const char* name,
+ int64_t type,
+ int64_t flow_id,
+ const char* args) {
+ char* name_string = strdup(name);
+ ASSERT((type >= 0) && (type <= 2));
+ switch (type) {
+ case 0:
+ event->FlowBegin(name_string, flow_id, start);
+ break;
+ case 1:
+ event->FlowStep(name_string, flow_id, start);
+ break;
+ case 2:
+ event->FlowEnd(name_string, flow_id, start);
+ break;
+ default:
+ UNREACHABLE();
+ break;
+ }
+ event->set_owns_label(true);
+ event->SetNumArguments(1);
+ event->CopyArgument(0, "args", args);
+ event->Complete();
+}
+
void DartTimelineEventHelpers::ReportInstantEvent(Thread* thread,
Zone* zone,
TimelineEvent* event,
« no previous file with comments | « runtime/vm/timeline_android.cc ('k') | runtime/vm/timeline_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698