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

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

Issue 1362503002: Add global timeline stream overrides (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 #define DART_TIMELINE_STREAM_API (1 << 0) 883 #define DART_TIMELINE_STREAM_API (1 << 0)
884 /** Timeline stream for compiler events */ 884 /** Timeline stream for compiler events */
885 #define DART_TIMELINE_STREAM_COMPILER (1 << 1) 885 #define DART_TIMELINE_STREAM_COMPILER (1 << 1)
886 /** Timeline stream for embedder provided events */ 886 /** Timeline stream for embedder provided events */
887 #define DART_TIMELINE_STREAM_EMBEDDER (1 << 2) 887 #define DART_TIMELINE_STREAM_EMBEDDER (1 << 2)
888 /** Timeline stream for GC events */ 888 /** Timeline stream for GC events */
889 #define DART_TIMELINE_STREAM_GC (1 << 3) 889 #define DART_TIMELINE_STREAM_GC (1 << 3)
890 /** Timeline stream for isolate events */ 890 /** Timeline stream for isolate events */
891 #define DART_TIMELINE_STREAM_ISOLATE (1 << 4) 891 #define DART_TIMELINE_STREAM_ISOLATE (1 << 4)
892 892
893 /** Enable all timeline stream recording */ 893 /** Timeline stream for VM events */
894 #define DART_TIMELINE_STREAM_VM (1 << 5)
895
896 /** Enable all timeline stream recording for an isolate */
894 #define DART_TIMELINE_STREAM_ALL (DART_TIMELINE_STREAM_API | \ 897 #define DART_TIMELINE_STREAM_ALL (DART_TIMELINE_STREAM_API | \
895 DART_TIMELINE_STREAM_COMPILER | \ 898 DART_TIMELINE_STREAM_COMPILER | \
896 DART_TIMELINE_STREAM_EMBEDDER | \ 899 DART_TIMELINE_STREAM_EMBEDDER | \
897 DART_TIMELINE_STREAM_GC | \ 900 DART_TIMELINE_STREAM_GC | \
898 DART_TIMELINE_STREAM_ISOLATE) 901 DART_TIMELINE_STREAM_ISOLATE)
899 902
900 /** Disable all timeline stream recording */ 903 /** Disable all timeline stream recording */
901 #define DART_TIMELINE_STREAM_DISABLE 0 904 #define DART_TIMELINE_STREAM_DISABLE 0
902 905
903 /** 906 /**
904 * Start recording timeline events for the current isolate. 907 * Start recording timeline events for the current isolate.
905 * 908 *
906 * \param stream_mask A bitmask of streams that should be recorded. 909 * \param stream_mask A bitmask of streams that should be recorded.
907 * 910 *
908 * NOTE: Calling with 0 disables recording of all streams. 911 * NOTE: Calling with 0 disables recording of all streams.
909 */ 912 */
910 DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask); 913 DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask);
911 914
915
916 /**
917 * Start recording timeline events for the entire VM (including all isolates).
918 *
919 * NOTE: When enabled, the global flag, will override the per-isolate flag.
920 *
921 * \param stream_mask A bitmask of streams that should be recorded.
922 *
923 * NOTE: Calling with 0 disables recording of all streams.
924 */
925 DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask);
926
927
912 typedef enum { 928 typedef enum {
913 /** Indicates a new stream is being output */ 929 /** Indicates a new stream is being output */
914 Dart_StreamConsumer_kStart = 0, 930 Dart_StreamConsumer_kStart = 0,
915 /** Data for the current stream */ 931 /** Data for the current stream */
916 Dart_StreamConsumer_kData = 1, 932 Dart_StreamConsumer_kData = 1,
917 /** Indicates stream is finished */ 933 /** Indicates stream is finished */
918 Dart_StreamConsumer_kFinish = 2, 934 Dart_StreamConsumer_kFinish = 2,
919 } Dart_StreamConsumer_State; 935 } Dart_StreamConsumer_State;
920 936
921 /** 937 /**
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 * \return Returns an asynchronous id that must be passed to 1046 * \return Returns an asynchronous id that must be passed to
1031 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. 1047 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd.
1032 * 1048 *
1033 * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms 1049 * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms
1034 * this call uses GetSystemTimeAsFileTime to get the current time. 1050 * this call uses GetSystemTimeAsFileTime to get the current time.
1035 */ 1051 */
1036 DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label, 1052 DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label,
1037 int64_t async_id); 1053 int64_t async_id);
1038 1054
1039 #endif // INCLUDE_DART_TOOLS_API_H_ 1055 #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