[VM/Timeline] Add Microtask stream
TEST=runtime/vm/dart_api_impl_test.cc Change-Id: Icb078489f3600ac0fb8b314ca3bf748f482a687e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422860 Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
@@ -153,8 +153,9 @@ class RunCommand extends DartdevCommand {
|
||||
'timeline-streams',
|
||||
help: 'Enables recording for specific timeline streams.\n'
|
||||
'Valid streams include: all, API, Compiler, CompilerVerbose, Dart, '
|
||||
'Debugger, Embedder, GC, Isolate, VM.\n'
|
||||
'Defaults to "Compiler, Dart, GC" when --observe is provided.',
|
||||
'Debugger, Embedder, GC, Isolate, Microtask, VM.\n'
|
||||
'Defaults to "Compiler, Dart, GC, Microtask" when --observe is '
|
||||
'provided.',
|
||||
valueHelp: 'str1, str2, ...',
|
||||
hide: !verbose,
|
||||
);
|
||||
|
||||
@@ -1 +1 @@
|
||||
version=4.17
|
||||
version=4.18
|
||||
|
||||
@@ -27,7 +27,7 @@ export 'snapshot_graph.dart'
|
||||
HeapSnapshotObjectNoData,
|
||||
HeapSnapshotObjectNullData;
|
||||
|
||||
const String vmServiceVersion = '4.17.0';
|
||||
const String vmServiceVersion = '4.18.0';
|
||||
|
||||
/// @optional
|
||||
const String optional = 'optional';
|
||||
|
||||
@@ -17,7 +17,7 @@ import 'service_extension_registry.dart';
|
||||
|
||||
export 'service_extension_registry.dart' show ServiceExtensionRegistry;
|
||||
|
||||
const String vmServiceVersion = '4.17.0';
|
||||
const String vmServiceVersion = '4.18.0';
|
||||
|
||||
/// A class representation of the Dart VM Service Protocol.
|
||||
abstract interface class VmServiceInterface {
|
||||
|
||||
@@ -168,7 +168,7 @@ void Options::PrintUsage() {
|
||||
" --pause-isolates-on-exit\n"
|
||||
" --pause-isolates-on-unhandled-exceptions\n"
|
||||
" --warn-on-pause-with-no-debugger\n"
|
||||
" --timeline-streams=\"Compiler, Dart, GC\"\n"
|
||||
" --timeline-streams=\"Compiler, Dart, GC, Microtask\"\n"
|
||||
" This set is subject to change.\n"
|
||||
" Please see these options (--help --verbose) for further documentation.\n"
|
||||
"--write-service-info=<file_uri>\n"
|
||||
@@ -210,7 +210,7 @@ void Options::PrintUsage() {
|
||||
" --pause-isolates-on-exit\n"
|
||||
" --pause-isolates-on-unhandled-exceptions\n"
|
||||
" --warn-on-pause-with-no-debugger\n"
|
||||
" --timeline-streams=\"Compiler, Dart, GC\"\n"
|
||||
" --timeline-streams=\"Compiler, Dart, GC, Microtask\"\n"
|
||||
" This set is subject to change.\n"
|
||||
" Please see these options for further documentation.\n"
|
||||
#endif // !defined(PRODUCT)
|
||||
@@ -456,7 +456,7 @@ bool Options::ProcessObserveOption(const char* arg,
|
||||
vm_options->AddArgument("--pause-isolates-on-unhandled-exceptions");
|
||||
vm_options->AddArgument("--profiler");
|
||||
vm_options->AddArgument("--warn-on-pause-with-no-debugger");
|
||||
vm_options->AddArgument("--timeline-streams=\"Compiler,Dart,GC\"");
|
||||
vm_options->AddArgument("--timeline-streams=\"Compiler,Dart,GC,Microtask\"");
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
dfe()->set_use_incremental_compiler(true);
|
||||
#endif // !defined(DART_PRECOMPILED_RUNTIME)
|
||||
|
||||
@@ -33,6 +33,7 @@ Streams, also called categories, are sets of events whose recordering can be ena
|
||||
| `Embedder` | Events created by `Dart_RecordTimelineEvent`. |
|
||||
| `GC` | Events related to garbage collection or heap iteration. |
|
||||
| `Isolate` | Isolate or isolate group lifecycle events such as startup or shutdown. |
|
||||
| `Microtask` | Events representing `dart:async` microtasks. This stream only contains events when the VM is started with the `--profile-microtasks` flag. |
|
||||
| `VM` | VM lifecycle events such a startup or shutdown. |
|
||||
|
||||
The set of enabled streams can be selected with the `timeline_streams` flag. E.g., `--timeline_stream=VM,Isolate,GC,Dart` or `--timeline_streams=All`.
|
||||
@@ -45,7 +46,7 @@ There are also some convenience flags:
|
||||
|
||||
| Flag | Expansion |
|
||||
| ---- | --------- |
|
||||
|`--timeline_streams=All` | `--timeline_streams=API,Compiler,CompilerVerbose,Dart,Debugger,Embedder,GC,Isolate,VM` |
|
||||
|`--timeline_streams=All` | `--timeline_streams=API,Compiler,CompilerVerbose,Dart,Debugger,Embedder,GC,Isolate,Microtask,VM` |
|
||||
| `--complete_timeline` | `--timeline_recorder=endless --timeline_streams=All` |
|
||||
| `--startup_timeline` | `--timeline_recorder=startup --timeline_streams=All` |
|
||||
|
||||
|
||||
@@ -300,6 +300,7 @@ DART_EXPORT bool Dart_IsReloading();
|
||||
* "Embedder" - Execution of Dart embedder code
|
||||
* "GC" - Execution of Dart Garbage Collector
|
||||
* "Isolate" - Dart Isolate lifecycle execution
|
||||
* "Microtask" - Execution of Dart microtasks
|
||||
* "VM" - Execution in Dart VM runtime code
|
||||
* "" - None
|
||||
*
|
||||
|
||||
@@ -12,7 +12,7 @@ var tests = <VMTest>[
|
||||
final result = await vm.invokeRpcNoUpgrade('getVersion', {});
|
||||
expect(result['type'], 'Version');
|
||||
expect(result['major'], 4);
|
||||
expect(result['minor'], 17);
|
||||
expect(result['minor'], 18);
|
||||
expect(result['_privateMajor'], 0);
|
||||
expect(result['_privateMinor'], 0);
|
||||
},
|
||||
|
||||
@@ -10140,6 +10140,7 @@ TEST_CASE(DartAPI_TimelineCategories) {
|
||||
EXPECT_NOTSUBSTRING("Debugger", js_str);
|
||||
EXPECT_NOTSUBSTRING("Embedder", js_str);
|
||||
EXPECT_NOTSUBSTRING("Isolate", js_str);
|
||||
EXPECT_NOTSUBSTRING("Microtask", js_str);
|
||||
EXPECT_NOTSUBSTRING("VM", js_str);
|
||||
}
|
||||
|
||||
@@ -10158,6 +10159,7 @@ TEST_CASE(DartAPI_TimelineCategories) {
|
||||
EXPECT_NOTSUBSTRING("Debugger", js_str);
|
||||
EXPECT_NOTSUBSTRING("Embedder", js_str);
|
||||
EXPECT_SUBSTRING("Isolate", js_str);
|
||||
EXPECT_NOTSUBSTRING("Microtask", js_str);
|
||||
EXPECT_NOTSUBSTRING("VM", js_str);
|
||||
}
|
||||
|
||||
@@ -10176,6 +10178,7 @@ TEST_CASE(DartAPI_TimelineCategories) {
|
||||
EXPECT_NOTSUBSTRING("Debugger", js_str);
|
||||
EXPECT_NOTSUBSTRING("Embedder", js_str);
|
||||
EXPECT_NOTSUBSTRING("Isolate", js_str);
|
||||
EXPECT_NOTSUBSTRING("Microtask", js_str);
|
||||
EXPECT_NOTSUBSTRING("VM", js_str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
namespace dart {
|
||||
|
||||
#define SERVICE_PROTOCOL_MAJOR_VERSION 4
|
||||
#define SERVICE_PROTOCOL_MINOR_VERSION 17
|
||||
#define SERVICE_PROTOCOL_MINOR_VERSION 18
|
||||
|
||||
class Array;
|
||||
class EmbedderServiceHandler;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Dart VM Service Protocol 4.17
|
||||
# Dart VM Service Protocol 4.18
|
||||
|
||||
> Please post feedback to the [observatory-discuss group][discuss-list]
|
||||
|
||||
This document describes of _version 4.16_ of the Dart VM Service Protocol. This
|
||||
This document describes of _version 4.18_ of the Dart VM Service Protocol. This
|
||||
protocol is used to communicate with a running Dart Virtual Machine.
|
||||
|
||||
To use the Service Protocol, start the VM with the *--observe* flag.
|
||||
@@ -4994,5 +4994,6 @@ version | comments
|
||||
4.15 | Added `closureReceiver` property to `@Instance` and `Instance`.
|
||||
4.16 | Added `reloadFailureReason` property to `Event`. Added `createIdZone`, `deleteIdZone`, and `invalidateIdZone` RPCs. Added optional `idZoneId` parameter to `evaluate`, `evaluateInFrame`, `getInboundReferences`, `getInstances`, `getInstancesAsList`, `getObject`, `getRetainingPath`, `getStack`, and `invoke` RPCs.
|
||||
4.17 | Added `Timer` stream, added `TimerSignificantlyOverdue` event kind, and added `details` property to `Event`.
|
||||
4.18 | Added `Microtask` timeline stream.
|
||||
|
||||
[discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
|
||||
|
||||
@@ -77,7 +77,7 @@ DEFINE_FLAG(charp,
|
||||
nullptr,
|
||||
"Comma separated list of timeline streams to record. "
|
||||
"Valid values: all, API, Compiler, CompilerVerbose, Dart, "
|
||||
"Debugger, Embedder, GC, Isolate, and VM.");
|
||||
"Debugger, Embedder, GC, Isolate, Microtask, and VM.");
|
||||
DEFINE_FLAG(charp,
|
||||
timeline_recorder,
|
||||
DEFAULT_TIMELINE_RECORDER,
|
||||
|
||||
@@ -78,6 +78,7 @@ class Zone;
|
||||
V(Embedder, "dart:embedder", true) \
|
||||
V(GC, "dart:gc", true) \
|
||||
V(Isolate, "dart:isolate", true) \
|
||||
V(Microtask, "dart:microtask", true) \
|
||||
V(VM, "dart:vm", true)
|
||||
#endif // defined(SUPPORT_TIMELINE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user