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

Side by Side Diff: runtime/include/dart_tools_api.h

Issue 1783953002: Add ability for embedder to provide private timeline trace data (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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 INCLUDE_DART_TOOLS_API_H_ 5 #ifndef INCLUDE_DART_TOOLS_API_H_
6 #define INCLUDE_DART_TOOLS_API_H_ 6 #define INCLUDE_DART_TOOLS_API_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 /** \mainpage Dart Tools Embedding API Reference 10 /** \mainpage Dart Tools Embedding API Reference
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 * \param label The name of event. 1071 * \param label The name of event.
1072 * 1072 *
1073 * \return Returns an asynchronous id that must be passed to 1073 * \return Returns an asynchronous id that must be passed to
1074 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. 1074 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd.
1075 * 1075 *
1076 * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros. 1076 * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros.
1077 */ 1077 */
1078 DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label, 1078 DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label,
1079 int64_t async_id); 1079 int64_t async_id);
1080 1080
1081
1082 /**
1083 * Called by the VM to let the embedder know when to start recording into their
1084 * own timeline implementation. Can be called from any thread.
1085 */
1086 typedef void (*Dart_EmbedderTimelineStartRecording)();
1087
1088 /**
1089 * Called by the VM to let the embedder know when to stop recording into their
1090 * own timeline implementation. Can be called from any thread.
1091 */
1092 typedef void (*Dart_EmbedderTimelineStopRecording)();
1093
1094 /**
1095 * Called by the VM to request data from the embedder's private timeline
1096 * implementation. Can be called from any thread and must complete
1097 * synchronously.
yjbanov 2016/03/10 22:45:16 I'm not sure Flutter's implementation can complete
1098 *
1099 * \param stream_consumer The embedder must only call the stream_consumer with
1100 * the Dart_StreamConsumer_kData state. See Dart_StreamConsumer above.
1101 * \param user_data
1102 *
1103 * \return Returns true on success.
1104 *
1105 */
1106 typedef bool (*Dart_EmbedderTimelineGetTimeline)(
1107 Dart_StreamConsumer stream_consumer,
1108 void* user_data);
1109
1110
1111 /**
1112 * Sets the embedder timeline callbacks. These callbacks are used by the VM
1113 * to notify the embedder of timeline recording state changes and to request
1114 * data from the embedder.
1115 *
1116 * \param start_recording See Dart_EmbedderTimelineStartRecording.
1117 * \param stop_recording See Dart_EmbedderTimelineStopRecording.
1118 * \param get_timeline See Dart_EmbedderTimelineGetTimeline.
1119 *
1120 * NOTE: To avoid races, this should be called before Dart_Initialize.
1121 */
1122 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks(
1123 Dart_EmbedderTimelineStartRecording start_recording,
1124 Dart_EmbedderTimelineStopRecording stop_recording,
1125 Dart_EmbedderTimelineGetTimeline get_timeline);
siva 2016/03/11 12:56:17 Does it make sense for any of these callbacks to b
1126
1081 #endif // INCLUDE_DART_TOOLS_API_H_ 1127 #endif // INCLUDE_DART_TOOLS_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698