Commit Graph

96 Commits

Author SHA1 Message Date
Ben Konyi 2a2d83e9e9 [ VM / Service ] Add support for enabling/disabling breakpoints
This change adds a `setBreakpointState` RPC which allows for breakpoints
to be enabled or disabled without needing to remove and recreate
breakpoints.

Fixes https://github.com/dart-lang/sdk/issues/45336.

TEST=set_breakpoint_state_test.dart

Change-Id: I1a04e6028d4e4560fdb8d3d26420c9a05da06b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193896
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-06 22:16:06 +00:00
Ben Konyi c4bfca9b6a [ dart:io / package:vm_service ] Add HTTP request profiling service
extensions

This change adds HTTP request profiling support to the dart:io service
extensions and removes HTTP request/response body logging to the
timeline due to memory constraints.

Fixes https://github.com/dart-lang/sdk/issues/44950

TEST=pkg/vm_service/test/get_http_profile_test.dart

Change-Id: I85642296c3d6595197f3365022477c7685c452bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189881
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2021-03-24 23:01:03 +00:00
Ben Konyi 5e88959488 [ Service ] Deprecate CpuSamples.timeSpan
The implementation of CpuSamples.timeSpan has never matched the
specification and has never been returned properly from the service
(returned as 'timespan' instead of 'timeSpan'). Since timeSpan is
effectively the same value as timeExtentMicros, timeExtendMicros should
be used instead.

Fixes https://github.com/dart-lang/sdk/issues/45276

TEST=N/A

Change-Id: I3a1fda81e199718824ad80eb955adb3214ae192c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192780
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-03-23 21:23:31 +00:00
Ben Konyi 3b49fd862b [ VM / Service ] Add identityHashCode to @Instance and Instance
responses

Allows for comparing @Instances and Instances with allocation traces and
heap snapshot entries.

TEST=pkg/vm_service/test/get_allocation_traces_test.dart

Change-Id: I6d021b0267f1595332475470961df6e35321ce80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188600
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-03-22 22:45:57 +00:00
Sam Rawlins 5aca96546b vm_service: Remove unnecessary '?' from dynamic types
Also update the generator:

* Remove same unnecessary '?'
* Update MemberType.name, TypeRef.ref to be non-nullable

Bug: https://github.com/dart-lang/sdk/issues/45165
Change-Id: I438e9ce1e02faac9417a7d2d4ace143f2cf6feb3
TEST=Just the regular trybots.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190722
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-03-11 20:14:41 +00:00
Kenzie Schmoll c0c56b0592 Fix a couple typos in vm_service
TEST=N/A

Change-Id: I3a9bee58e7dd28ea54933dc229f91339e9d0a0a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188760
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-03-03 19:27:22 +00:00
Ben Konyi 9a755f2227 [ package:vm_service ] Attach callsite StackTrace to RPCErrors and
SentinelExceptions

Fixes https://github.com/dart-lang/sdk/issues/44839

TEST=rpc_error_test.dart,throws_sentinel_test.dart

Change-Id: I5aa1b8a11fbf9a83c0584c2df07f4aa07cf374a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185942
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
2021-02-19 22:54:25 +00:00
Ben Konyi b563a592ca [ package:vm_service ] Fix documentation not appearing on pub, update CHANGELOG for 6.1.0
TEST=N/A

Change-Id: Ic585afc5a74701cd9a787319e4dad8b2ec12b748
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185900
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-02-19 21:35:45 +00:00
Sam Rawlins 6ce172d87f vm_service: remove unnecessary imports
TEST=The standard tryjobs bots

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: If959fad41185fbb8bfdf400e1d1e177bef082902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185304
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-02-18 00:23:46 +00:00
Ben Konyi 3e83400e0f [ VM / Service ] Added getAllocationTraces and setTraceClassAllocation RPCs and identity hash support
This change adds two new RPCs and various new properties:
  - getAllocationTraces
  - setTraceClassAllocation
  - classId and identityHashCode properties in CpuSample
  - traceAllocations property in Class

TEST=get_allocation_traces_test.dart

package:vm_service has been regenerated for 3.43 of the service protocol
and is ready for a 6.1.0 release.
Change-Id: Ia8ed055423798d7d17fe9f5fd74efb4239b875fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182666
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-02-12 21:15:35 +00:00
Ben Konyi f7cc17fb7e [ package:vm_service ] Fix issue where null was returned instead of @Instance of type Null
Also includes some cleanup for next release.

Fixes https://github.com/dart-lang/sdk/issues/44842

TEST=pkg/vm_service/test/regress_44842_test.dart

Change-Id: I250fac7c52d6d5344bd5c3ec1c143deaa97419d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182369
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-02-03 21:10:28 +00:00
Ben Konyi 565dc5b6a2 Reland "[ VM / Service ] Report identity hash codes of objects at end of heap snapshot"
This reverts commit 7083692624 in order to
reland commit 8d99d295da.

TEST=N/A

Change-Id: I06c80a666a9307caf0313fef1fde212ec801203c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182600
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-03 19:13:40 +00:00
Ben Konyi 7083692624 [ package:vm_service ] Prepare for 6.0.1 stable null-safe release
There is no diff between this version and 6.0.1-nullsafety.1.

This temporarily reverts commit 8d99d295da.

TEST=None

Change-Id: I3597b3543c9ea9122865604b9ba07c99683a5355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182580
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-03 18:16:27 +00:00
Ben Konyi 8d99d295da [ VM / Service ] Report identity hash codes of objects at end of heap
snapshot

TEST=pkg/vm_service/test/object_graph_identity_hash_test.dart

Change-Id: I71eff4e8bb2153d8ef1117bc90d078f678f358ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180484
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-02-01 22:37:21 +00:00
Ben Konyi 9fe5f563f4 [ package:vm_service ] Fix some Instance fields not being parsed from JSON
Fixes https://github.com/dart-lang/sdk/issues/44800

TEST=Manual testing

Change-Id: Id03bc8a6be57c8937c8fa850fbf82227bef8bafb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181720
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-01-28 22:25:35 +00:00
Ben Konyi 251dab8721 [ package:vm_service ] Removed null assertion from
`SourceReportRange.coverage` parsing

Fixes https://github.com/dart-lang/sdk/issues/44739

TEST=Existing
Change-Id: I395d6f908862767655d7d3e9b5518995dea8c433
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180480
Reviewed-by: Gary Roumanis <grouma@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-01-22 00:22:17 +00:00
Ben Konyi 761f5ef250 [ package:vm_service ] Fix issue where objects were returning the
package:vm_service class name instead of the class name from the spec as
their type.

Fixes https://github.com/dart-lang/sdk/issues/44725

TEST=Existing package:vm_service tests

Change-Id: I4168a338aea4d0aaa2ff37b6af98d86b372dcd9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180264
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-01-21 00:15:33 +00:00
Ben Konyi fc48e553d5 [ Service / package:vm_service ] Allow for Sentinel value in Field.staticValue, fix null values in ClassList
Field.staticValue has always been able to take a Sentinel as a value but
was not correctly specified in the service spec. Updates the spec and
package:vm_service to allow for this case.

Also fixed an issue where FreeListElement and ForwardingCorpse were
being returned from getClassList.

Fixes https://github.com/dart-lang/sdk/issues/44588

TEST=pkg/vm_service/test/regress_44588_test.dart

Change-Id: I059717657533ff623a70d159a918d63e9e4b6cc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179020
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-01-20 19:25:46 +00:00
Ben Konyi e3c0b0d3f7 [ package:vm_service ] Null safety migration, take two
All object fields are now non-final and nullable to allow for missing
fields due to communicating with an older VM service version.

TEST=Existing tests.

Change-Id: Ibfbeefb329359e92f2e048499df7b9c806fb3220
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180089
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-01-20 00:37:05 +00:00
Ben Konyi fb5ffc8275 [ package:vm_service] Output null-safe code from package:vm_service code generator
TEST=Existing VM service tests

Change-Id: Ia3877927f8c761c8f37a37f1efe87221cc1ac2aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156980
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-01-08 21:19:38 +00:00
Ben Konyi 67a4bbb60b [ package:vm_service ] Ensure VmService.onDone doesn't complete until the provided dispose handler has finished
Fixes https://github.com/dart-lang/sdk/issues/43940
TEST=regress_43940_test.dart

Fixed: 43940
Change-Id: I7ad57e0c35a91bf1e1e3dada6662b33b59e2d7bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176922
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2021-01-05 23:39:29 +00:00
Ben Konyi 89de1e82d9 [ VM / Service ] Add optional 'limit' parameter to getStack RPC
Allows for clients to request the top N frames of the current stack.

Fixes https://github.com/dart-lang/sdk/issues/43826

Change-Id: Ia8d38e6317373024382a5e857faff73c89a0d2c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169980
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-03 21:39:37 +00:00
Ming Lyu (CareF) 2613251b4d typo fix
Fix a spell typo

Closes https://github.com/dart-lang/sdk/pull/43127
https://github.com/dart-lang/sdk/pull/43127

GitOrigin-RevId: 32c2b39492d6b1dc5a66c7d8f2f99a0230200cf0
Change-Id: I393e4ed66ed7c6a9aef5cac7ae3bcef15a0d0e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159500
Reviewed-by: Michael Thomsen <mit@google.com>
2020-11-02 09:32:15 +00:00
Ben Konyi d5118d5fc8 Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional"
This reverts commit f78c40e32a.

Change-Id: Id838b39afcb371d3b50f0009322ecf0fb2080894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169461
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-10-29 02:52:03 +00:00
Devon Carew c877d5bf3e [pkg/vm_service] remove three deprecation warnings
Change-Id: I902fb07a37c8cefb9867db7a6987e8a63b3d832c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169284
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-10-28 17:38:25 +00:00
Tess Strickland f78c40e32a Revert "Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional""
This reverts commit a5d4511847.

Reason for revert: Failure in test standalone_2/io/unix_socket_test on reload bots, see https://github.com/dart-lang/sdk/issues/43952.

Original change's description:
> Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional"
>
> This reverts commit b71477a2a6.
>
> Change-Id: Iba11c41e43ec8c08b48147bbd07b71a151c3d1e6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169243
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com

Change-Id: I2ac1f18fef03d29bf74df4f49a91406a26f1ce26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169323
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-10-28 10:51:40 +00:00
Ben Konyi a5d4511847 Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional"
This reverts commit b71477a2a6.

Change-Id: Iba11c41e43ec8c08b48147bbd07b71a151c3d1e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169243
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-10-28 00:49:11 +00:00
Kenzie Schmoll 76118806bd [dart:io / Service] Rename State class to _State to avoid class name conflicts with Flutter
Change-Id: If252628b39d4f38f5d67b76f8fdd7195e9975b79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169245
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-10-27 23:38:53 +00:00
Ben Konyi b71477a2a6 Revert "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional"
This reverts commit 5bf9163e1b.

Reason for revert: Tests failing on bots.

Original change's description:
> [ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional
> parameter for ReceivePort and RawReceivePort
>
> This change collects additional information related to ReceivePort
> allocation locations and an optional debug name that will be displayed
> by tooling. ReceivePort is now a special InstanceKind and a ReceivePort
> @Instance will include the port ID, allocation stack trace, and debug
> name.
>
> Change-Id: I003cfff2b7649218e37d9b653c0e953df5d992e7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167902
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I39c3abb07c8c40c158eb4549749b076399bccce9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169160
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-10-27 03:14:30 +00:00
Ben Konyi b9f83d1988 [ dart:io / Service ] Added socketProfilingEnable RPC to dart:io service
extensions

This is a replacement for startSocketProfiling and pauseSocketProfiling
which are now deprecated in favor of this single setter/getter RPC.

Also added a SocketProfilingStateChange event that is sent on the
Extension stream when socket profiling is enabled or disabled.

Fixes https://github.com/dart-lang/sdk/issues/43923

Change-Id: Ie3d7bb8cddaa935de3725ee95a39a17d0588e66f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169140
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2020-10-26 23:15:57 +00:00
Ben Konyi 5bf9163e1b [ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional
parameter for ReceivePort and RawReceivePort

This change collects additional information related to ReceivePort
allocation locations and an optional debug name that will be displayed
by tooling. ReceivePort is now a special InstanceKind and a ReceivePort
@Instance will include the port ID, allocation stack trace, and debug
name.

Change-Id: I003cfff2b7649218e37d9b653c0e953df5d992e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167902
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-10-26 23:09:47 +00:00
Ben Konyi 45159b12e0 [ VM / Service ] Add isolateFlags property to Isolate JSON response
Flags that can be set in `Dart_IsolateFlags` are now surfaced via the
Isolate JSON object returned from the service protocol. Currently only
returns boolean flags.

Related: https://github.com/dart-lang/sdk/issues/43588
Change-Id: I54a30155778de8612105eb4a5f60f8a222a086b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165403
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-10-01 19:18:30 +00:00
Ben Konyi 9c1adbd8c5 [ dart:io / package:vm_service ] Change parameter name for httpEnableTimelineLogging enable -> enabled
This is a backward compatible change that will continue to accept the
old parameter name.

Fixes https://github.com/dart-lang/sdk/issues/43628

Change-Id: I4e7a9d8d14921784e9d1c8693ae2252cf5f023e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165623
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-10-01 17:17:58 +00:00
Ben Konyi e85e5b6264 [ dart:io / package:vm_service ] Add httpEnableTimelineLogging extension and service events
- Added httpEnableTimelineLogging to the dart:io service extensions
- Deprecated setHttpEnableTimelineLogging and getHttpEnableTimelineLogging
- Send service event when HTTP timeline logging state has changed

Change-Id: I56df249fcfb11d7041a40a7749d47f6ef8f97c10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163724
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-22 16:06:23 +00:00
Ben Konyi a44409615f [ Service / dart:io ] Rework previously unused dart:io service extensions
This CL is mostly modernizing existing Process and File profiling code
that was never made public. Updated the service extension responses to
be more consistent with the rest of the service protocol.

Related to https://github.com/dart-lang/sdk/issues/41455.

Change-Id: I116b3cd1424980e4ec8133672901990776c1d9c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157160
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-09-18 20:15:56 +00:00
Ben Konyi e3fcee331d [ VM / Service ] Roll back major revision, update to 3.39
The major revision bump is causing Intellij users to be unable to debug
as the Dart and Flutter plugins both bail out if the VM service major
revision is not 3. This change will allow for these plugins to keep
working.

This is technically breaking the semver contract as the following RPCs
and objects have been removed:

- getClientName
- getWebSocketTarget
- setClientName
- requireResumeApproval
- ClientName
- WebSocketTarget

However, these RPCs were never used by first party tooling and it's
highly unlikely that they were used externally, so removing these RPCs
is unlikely to break anyone.

Change-Id: Ie8e2705545682e96c3dab4c0787a1e88cd8a19d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162240
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-09 17:46:09 +00:00
Mike Fairhurst 80ec90e13c [vm_service] Remove unused dart:async imports
Change-Id: Ie8c9121a1d7fc36eb8a7d9b1e599fd913cacb024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161469
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-09-09 14:53:09 +00:00
Ben Konyi f0d88cc96d Reland "[ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0"
This reverts commit ed120c3c80.

Change-Id: I445f4bb2dafaad3ce2daa3ae42efe1723f9b1abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160660
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-03 15:20:14 +00:00
Ben Konyi f00e45d9b8 [ package:vm_service ] Fix VmServerConnection always responding with a string ID
VmServerConnection was converting request IDs into Strings, even if the
ID was an integer. This resulted in request responses always having
string IDs which does not conform to the JSON-RPC spec and breaks

package:json_rpc_2.
Change-Id: Ia42d2fbf5a32b88c57b827f493a1847119e8a08c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161441
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-01 21:20:49 +00:00
Ben Konyi ed120c3c80 Revert "[ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0"
This reverts commit 0ea18ffb36.

Reason for revert: Tree is on fire

Original change's description:
> [ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0
> 
> This change does the following:
>   - The DDS URI will be reported by the VM as the VM service URI. If DDS
>     disconnects, the VM service URI will be reported instead. This only
>     impacts the standalone VM.
>   - Updated the service protocol to 4.0 and removed the following
>     deprecated functionality:
>       - Client synchronization RPCs (these now live in DDS)
>       - getWebSocketTarget (no longer needed as the VM service no longer
>         tries to redirect web socket clients to DDS)
>   - Regenerates package:vm_service based on the new spec, prepare for
>     5.0 release
> 
> Change-Id: I8a2b401062342eb99b81ef10ef6926baa88f946e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160141
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I6a16e9fa7ceb18555d6424a169cfa811d3833419
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-26 16:08:27 +00:00
Ben Konyi 0ea18ffb36 [ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0
This change does the following:
  - The DDS URI will be reported by the VM as the VM service URI. If DDS
    disconnects, the VM service URI will be reported instead. This only
    impacts the standalone VM.
  - Updated the service protocol to 4.0 and removed the following
    deprecated functionality:
      - Client synchronization RPCs (these now live in DDS)
      - getWebSocketTarget (no longer needed as the VM service no longer
        tries to redirect web socket clients to DDS)
  - Regenerates package:vm_service based on the new spec, prepare for
    5.0 release

Change-Id: I8a2b401062342eb99b81ef10ef6926baa88f946e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160141
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-08-26 14:55:15 +00:00
Ben Konyi e44c0b2264 [ Service ] Add 'is_system_isolate' option to Dart_IsolateFlags
Provides a general way to designate an isolate as a 'system isolate'
(formerly known as 'VM internal isolates').

Initial fix for https://github.com/dart-lang/sdk/issues/42875

Change-Id: I8798a3a1c51df1db8008d602f6303df13c958cba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158063
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-08-21 21:44:50 +00:00
Kevin Moore 832f27e8e5 vm_service: fix links to Dart website
Change-Id: I74c0031eacc5c93a4e3b146f516baafcb972fdb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158141
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-11 16:41:13 +00:00
Ben Konyi 6a66061703 [ Service ] Add getWebSocketTarget RPC to allow for Observatory to
connect to DDS without relying on a redirect.

Some WebSocket implementations (particularly dart:html's) don't follow
redirects and don't provide the user with the message returned by the
server.

This CL adds 'getWebSocketTarget' as an RPC which returns the
URI that should be used by the client to connect directly to the proper
web socket target. In addition, the "implicit-redirect" forwarding has
been removed.

Change-Id: Iaf88c965f6fedfa6f63c28a08860a3c80388797c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156485
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-08-03 22:06:41 +00:00
Daco Harkes 202e32afeb [vm] Native API: Introduce Dart_FinalizableHandle
Introduces Dart_NewFinalizableHandle which does auto delete itself,
but does not allow accessing the weak referenced object.

Issue: https://github.com/dart-lang/sdk/issues/42312

Change-Id: I24ea732925122c453213c4fa3f629761c352f838
Cq-Include-Trybots:dart/try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154695
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-23 11:30:39 +00:00
Kevin Moore b3caf5b152 pkg:vm_service - update and fix lints at pedantic v1.8
Change-Id: I02ce18ac683c70effcd33120504a45602f938850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150720
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-06-10 05:08:27 +00:00
Devon Carew b467ba5296 Add more required named parameters to named constructors.
Change-Id: I0e9df9c36d861e003f0d5391552600824335ae46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-05-21 18:40:23 +00:00
Devon Carew 46a5398b0a [pkg:vm_service] don't always write valueAsStringIsTruncated
Change-Id: Ic281ae8859d092a5b23762af3e750e354084b139
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148301
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-05-18 22:42:59 +00:00
Ben Konyi 54fb6ce3c0 [ Service / DDS ] Prepare for package:dds publishing
Final cleanup work before first full version of package:dds is
published:

- Added `getSupportedProtocols` RPC to the VM service protocol, which returns a
  list of supported service protocols and extensions along with their version
  information.
- Added `getDartDevelopmentServiceVersion` RPC to the DDS protocol.
- Misc code and dependency cleanup recommended by pub

Change-Id: If1bdf46852778adf31242122665c36b63106ad44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148224
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-15 22:52:12 +00:00
Ben Konyi 109eb97b02 [ package:vm_service ] Fix issue where invoking a service extension with no arguments would result in a TypeError during message routing.
Change-Id: I97835601edca0e92ffe344c4faa0947fc39a7c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147806
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-12 19:22:41 +00:00