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

Unified Diff: runtime/lib/timeline.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 | « pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart ('k') | runtime/lib/timeline.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/timeline.cc
diff --git a/runtime/lib/timeline.cc b/runtime/lib/timeline.cc
index f90ff71dc1ada014132152bdc5cdd1254b5c9831..2006be207369ca2bba7398bf8209b5e9a5fd0b77 100644
--- a/runtime/lib/timeline.cc
+++ b/runtime/lib/timeline.cc
@@ -110,6 +110,38 @@ DEFINE_NATIVE_ENTRY(Timeline_reportCompleteEvent, 5) {
return Object::null();
}
+DEFINE_NATIVE_ENTRY(Timeline_reportFlowEvent, 7) {
+#ifndef PRODUCT
+ if (!FLAG_support_timeline) {
+ return Object::null();
+ }
+ GET_NON_NULL_NATIVE_ARGUMENT(Integer, start, arguments->NativeArgAt(0));
+ GET_NON_NULL_NATIVE_ARGUMENT(Integer, start_cpu, arguments->NativeArgAt(1));
+ GET_NON_NULL_NATIVE_ARGUMENT(String, category, arguments->NativeArgAt(2));
+ GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(3));
+ GET_NON_NULL_NATIVE_ARGUMENT(Integer, type, arguments->NativeArgAt(4));
+ GET_NON_NULL_NATIVE_ARGUMENT(Integer, flow_id, arguments->NativeArgAt(5));
+ GET_NON_NULL_NATIVE_ARGUMENT(String, args, arguments->NativeArgAt(6));
+
+ TimelineEventRecorder* recorder = Timeline::recorder();
+ if (recorder == NULL) {
+ return Object::null();
+ }
+
+ TimelineEvent* event = Timeline::GetDartStream()->StartEvent();
+ if (event == NULL) {
+ // Stream was turned off.
+ return Object::null();
+ }
+
+ DartTimelineEventHelpers::ReportFlowEvent(
+ thread, zone, event, start.AsInt64Value(), start_cpu.AsInt64Value(),
+ category.ToCString(), name.ToCString(), type.AsInt64Value(),
+ flow_id.AsInt64Value(), args.ToCString());
+#endif // !defined(PRODUCT)
+ return Object::null();
+}
+
DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 4) {
#ifndef PRODUCT
if (!FLAG_support_timeline) {
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart ('k') | runtime/lib/timeline.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698