DDS can be configured to listen for CPU sample events and cache samples
that were collected while certain UserTags are active. These cached
samples are stored in a ring buffer and are stored until the isolate
shuts down.
TEST=pkg/dds/test/get_cached_cpu_samples_test.dart
Change-Id: Ib20770f59f1672c703413486f87795b3bb23f676
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207206
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Avoids a LateInitializationError that could occur when the VM service
connection goes down during DDS startup. Done by delaying error
reporting until after DDS has completed its initial startup flow,
ensuring that all relevant state has already been initialized when we
try to cleanup.
Fixes https://github.com/flutter/flutter/issues/86361
Change-Id: I2b357bfb95c759d301ab48bce9fe1c28871d5e08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206672
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
The CLI was not providing the ipv6 flag to DDS, resulting in a "Could
not start Observatory" error.
Change-Id: Idff0f525455f121b8f1e89bc4ad20a01cd1165ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Bots are failing with:
SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = localhost, port = 9200
This could be multiple test libraries being run in parallel and starting from the same port.
Change-Id: Ic7d14c3bb9a4e19295849933fadd6ad6daaea464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203500
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
These tests appear to be consistently failing on some bots but the code they're testing is not currently in-use. These tests will be fixed and re-enabled before the code becomes used.
Change-Id: I235c8390381c0f82d4f60078e969d5c035ee2e94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202740
Reviewed-by: Ben Konyi <bkonyi@google.com>
This starts the app paused, connects t the VM service and resumes. It handles dart:developer log() events, but no other debugging functionality yet (for ex. breakpoints, stepping).
Change-Id: Ib50680c775da5d13df95771eec62e77a4af75a08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201566
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit a527411e51.
Reason for revert: depends on package 'devtools_shared' that is not yet migrated.
Original change's description:
> [ package:dds ] Add null safety support
>
> Fixes https://github.com/dart-lang/sdk/issues/45756
>
> TEST=service + DDS tests
>
> Change-Id: I6dd14d7f9fdee479a830c3b053dc3b00aa635202
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199800
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Icdaef3ac55d7ef302acd3f9c2538a41e52e4253a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200180
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
This reverts commit ef0e4ea107.
Reason for revert: Flutter HHH and golem builds are red. Rolls to Flutter are failing.
TEST=N/A
Original change's description:
> [ VM / DDS / CLI ] Add DevTools support to the standalone VM
>
> Example output on stdout when DevTools is enabled:
>
> Observatory listening on http://127.0.0.1:8181/CzkZzZaONW4=/
> The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FCzkZzZaONW4%3D%2Fws
> hello world!
>
> vm-service: isolate(1674461414267555) 'main' has no debugger attached and is paused at exit. Connect to Observatory at http://127.0.0.1:8181/CzkZzZaONW4=/ to debug.
>
> TEST=pkg/dartdev/test/commands/run_test.dart
>
> Change-Id: Icd1afda87ad4a46f228125d53094d10adf8056ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188361
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I50e8dc4e592e13b44c2fb980b2029d5c5cc3ad2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198381
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Also updated non-migrated libraries to include @dart=2.10.
Change-Id: Idcf4e54f9aa37b9b016133144af594cc932418a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192122
Reviewed-by: Gary Roumanis <grouma@google.com>
Uberproxy actively kills long standing connections after a set period of
time. This change adds a 30 second keep alive period for SSE connections
so connections can be reestablished after being killed by Uberproxy
without DDS assuming the connection has disappeared.
Change-Id: I18363da475bc5d785f85f5ffbec4102a2b7941af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183141
Reviewed-by: Gary Roumanis <grouma@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I34c9d9f542fd896af742fd246c7111029c44daec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180606
Reviewed-by: Dan Field <dnfield@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
code if DDS loses connection to the VM service while forwarding a
request.
Change-Id: I9bb2adc160f25658756cc7106b77cbcd3b9ccc27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180090
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
service connection loss could result in a null JSON RPC response.
This would cause package:vm_service to throw a NoSuchMethodError as it
currently assumes it will never receive a null result in a JSON RPC
response.
Related to https://github.com/flutter/flutter/issues/74051.
Change-Id: I86c1c9f7e46e34519f32dfed589c6b31aed39d7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179800
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
have a null message
Change-Id: I03e800aeef82ce536e768b8da6ba274d89486bb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179367
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
_yieldControlToDDS
Instead of DDS failing to connect when there are existing clients
connected to the VM service, the VM service will now disconnect these
clients when _yieldControlToDDS is invoked.
If an existing DDS instance is already connected, existing clients will *not*
be disconnected and instead an error will be returned containing the URI of
the existing DDS instance.
TEST= runtime/observatory/tests/service/dds_disconnects_existing_clients_test.dart
Change-Id: I08e126d99f51ff14205f359a60ca802c27fd206d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178725
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Adds a DDS RPC which allows for stream history to be manually requested
in addition to being sent upon initial stream subscription.
Also adds an initial implementation of
package:dds/vm_service_extensions.dart, which adds DDS functionality to
the `VmService` class.
Fixes https://github.com/dart-lang/sdk/issues/44505
Change-Id: I198a6fd7fca15f131a6fdd95e7860a6f98ef06a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177182
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Emphasize that the operation is going away,
and mark constructor as deprecated.
TEST= Refactoring+deprecation only, covered by existing tests.
Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>