The real token position is required in case debugger stopped on
an exception thrown from AssertAssignable and trying to evaluate
an expression which uses receiver. Without token position all local
variables (including receiver) are considered out of scope
(as frame's token position is out of range).
TEST=runtime/observatory/tests/service/regress_48279_test.dart
Fixes https://github.com/dart-lang/sdk/issues/48279
Change-Id: Idb6a8e12185367ceac2034269b8f046272384006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231748
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The java generation for type `(string|Null)[]` was creating `@return one of <code>List<String></code> or <code>ElementList<Null></code>`
see example:
```
@SuppressWarnings({"WeakerAccess", "unused"})
public class UriList extends Response {
public UriList(JsonObject json) {
super(json);
}
/**
* A list of URIs.
*
* @return one of <code>List<String></code> or <code>ElementList<Null></code>
*/
public Object getUris() {
final JsonObject elem = (JsonObject)json.get("uris");
if (elem == null) return null;
if (elem.get("type").getAsString().equals("String")) return new String(elem);
if (elem.get("type").getAsString().equals("Null")) return new Null(elem);
return null;
}
```
My change is the simplest thing I could think of, just making the return type `List<String>` instead and allowing some of the elements to be null. But I'm happy to implement something else if someone has a suggestion for a better type (along with how to get the generate code to produce it)
Closes https://github.com/dart-lang/sdk/pull/48309https://github.com/dart-lang/sdk/pull/48309
TEST=N/A
GitOrigin-RevId: fa9dddad68219e697998c4a011a82d6860f44bfb
Change-Id: I79cf2aedf0672354a2fd28c8962740f6fcea4f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231740
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Removes the need for requesting a full Script object, which can be
extremely large when including source code. This change will have a
relatively small impact on response sizes.
Related issues: https://github.com/dart-lang/sdk/issues/47215, https://github.com/flutter/devtools/issues/3382
TEST=pkg/vm_service tests updated
Change-Id: I27999c4b1da65d4f0c643fa8db1a019c0fd1d689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
profiler events.
`Event.cpuSamples` is now a `CpuSamplesEvent` rather than a `CpuSamples`
object, where `CpuSamplesEvent` returns `(@Object|NativeFunction)[]` rather
than `(@Func|NativeFunction)[]`, resulting in a smaller JSON payload.
TEST=get_object_rpc_test.dart,get_cached_cpu_samples_test.dart
Change-Id: I1ad5e3df8840b8c41735d10c6c8669f6503e54a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219284
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit 5de4830a4e.
Reason for revert: Unable to roll into google3
Original change's description:
> Reland "[ VM / Service ] Add setIsolatePauseMode RPC"
>
> This reverts commit d21897b88d.
>
> Reason for revert: Reland before fixing failures in google3 (requires copybara update of package:vm_service which requires this change to have already been landed in the SDK).
>
> Original change's description:
> > Revert "[ VM / Service ] Add setIsolatePauseMode RPC"
> >
> > This reverts commit cad8a34d83.
> >
> > Reason for revert: broke the g3 cbuild, see cbuild logs
> > (Error: The method 'setIsolatePauseMode' isn't defined for the class 'VmServiceInterface')
> >
> > Original change's description:
> > > [ VM / Service ] Add setIsolatePauseMode RPC
> > >
> > > Allows for service clients to set pause behaviors on a per-isolate
> > > basis at runtime. setIsolatePauseMode is a more general version of
> > > setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.
> > >
> > > TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart
> > >
> > > Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
> > > Commit-Queue: Ben Konyi <bkonyi@google.com>
> > > Reviewed-by: Siva Annamalai <asiva@google.com>
> >
> > TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
> >
> > Change-Id: Ic326c54e0fd682e382bd70e36d87467d4148c990
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220067
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Commit-Queue: Siva Annamalai <asiva@google.com>
>
> # Not skipping CQ checks because this is a reland.
>
> Change-Id: I0e25654e1991b7246cd413454ef45594d36f4bde
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220127
> Reviewed-by: Siva Annamalai <asiva@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I9f1a2e81c99bfb90ddf0b4298bcb6c60e7e69dd3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220130
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit d21897b88d.
Reason for revert: Reland before fixing failures in google3 (requires copybara update of package:vm_service which requires this change to have already been landed in the SDK).
Original change's description:
> Revert "[ VM / Service ] Add setIsolatePauseMode RPC"
>
> This reverts commit cad8a34d83.
>
> Reason for revert: broke the g3 cbuild, see cbuild logs
> (Error: The method 'setIsolatePauseMode' isn't defined for the class 'VmServiceInterface')
>
> Original change's description:
> > [ VM / Service ] Add setIsolatePauseMode RPC
> >
> > Allows for service clients to set pause behaviors on a per-isolate
> > basis at runtime. setIsolatePauseMode is a more general version of
> > setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.
> >
> > TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart
> >
> > Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
> > Commit-Queue: Ben Konyi <bkonyi@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
>
> TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
>
> Change-Id: Ic326c54e0fd682e382bd70e36d87467d4148c990
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220067
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
# Not skipping CQ checks because this is a reland.
Change-Id: I0e25654e1991b7246cd413454ef45594d36f4bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220127
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit cad8a34d83.
Reason for revert: broke the g3 cbuild, see cbuild logs
(Error: The method 'setIsolatePauseMode' isn't defined for the class 'VmServiceInterface')
Original change's description:
> [ VM / Service ] Add setIsolatePauseMode RPC
>
> Allows for service clients to set pause behaviors on a per-isolate
> basis at runtime. setIsolatePauseMode is a more general version of
> setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.
>
> TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart
>
> Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: Ic326c54e0fd682e382bd70e36d87467d4148c990
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220067
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Allows for service clients to set pause behaviors on a per-isolate
basis at runtime. setIsolatePauseMode is a more general version of
setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.
TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart
Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This is a preparation CL to remove the --enable-isolate-groups flag in
the VM.
The following tests were only running in --no-enable-isolate-groups and
are therefore obsolete now:
- runtime/tests/vm/dart/regress_47468_test.dart
- runtime/tests/vm/dart_2/regress_47468_test.dart
- tests/lib/isolate/illegal_msg_function_test.dart
- tests/lib_2/isolate/illegal_msg_function_test.dart
TEST=Changes tests only.
Change-Id: I6257cb667eebca66a649614d3010139dd2cdd3ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219100
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Adds RPCs that allow for service clients to convert URIs from absolute
paths to unresolved package URIs and vice-versa.
Fixes https://github.com/dart-lang/sdk/issues/46631
TEST=uri_mappings_lookup_test.dart
Change-Id: I06e56e37dc0d4fe505527f8fb246c07caef5e058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217744
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
In Dart 2.15, we're removing "dartfmt" in favor of "dart format", so I'm
going through and fixing all the dangling references to the old name.
TEST=Only changing tools
Change-Id: I83a5c00be925fdb536014a47dff2b488ed9f478b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215186
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Fixes#47190
TEST=None, only markdown files where edited.
Change-Id: Ife204f9c792b6bce30d0cd7bf2260ced11c8f2b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213049
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Bug : request headers were not captured because finishRequest was
called to early (before headers was fully initialised)
Fixes#47115
TEST=pkg/vm_service/test/get_http_profile_test.dart
Change-Id: I544101c6f37d20e2ddfe7086698c0925f8f5bd09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212561
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
`--mark-main-isolate-as-system-isolate` option affects all isolates in the main isolate group. The test had to be adjusted so it verifies that isolates in new isolate groups remain non-system in presence of this option.
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/207203
TEST=mark_main_isolate_as_system_isolate_test
Change-Id: I74d94accab2094311a1067ca3853fd4e19d9c67f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212030
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Every known user of the coverage report just wants the line numbers. At
the moment they have to do a second RPC to get the Script object, so
they can translate the token positions into line numbers.
Slower test times with coverage are usually caused by the extra time it
takes to run the RPCs. So reporting the line number directly will halve
the time it takes to get coverage, for most users.
Bug: https://github.com/flutter/flutter/issues/86722
Change-Id: I7b8d436669713ebc7b7096790a02593b9cb94dda
TEST=CI
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211081
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This reverts commit 1796160606.
Reason for revert: Still seeing failures.
Original change's description:
> Reland "[ package:dds ] Add support for caching CPU samples based on UserTag"
>
> This reverts commit 4160747ef6.
>
> It seems like 9397b8ff05 should have fixed the original failures we were seeing and the failing bots in question seem to be passing when running try jobs.
>
> TBR=asiva@ (discussed offline)
>
> TEST=Existing service tests + get_cached_cpu_samples_test
> Change-Id: I1c50c0e79375df819a0bd68e68ac28c3064874c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208441
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,asiva@google.com
Change-Id: Ic522ab61b430673533c94ecd0c91bee569a0add6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208960
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit 4160747ef6.
It seems like 9397b8ff05 should have fixed the original failures we were seeing and the failing bots in question seem to be passing when running try jobs.
TBR=asiva@ (discussed offline)
TEST=Existing service tests + get_cached_cpu_samples_test
Change-Id: I1c50c0e79375df819a0bd68e68ac28c3064874c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208441
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commits 746b8f1f5c and
9ee2259fde.
Reason for revert: https://github.com/dart-lang/sdk/issues/46746
Original change's description:
> [ package:dds ] Add support for caching CPU samples based on UserTag
>
> 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>
TEST=ci
TBR=bkonyi@google.com,rmacnak@google.com,kenzieschmoll@google.com
Change-Id: I1b6655ad7e3b10e1145ff545cc90ecf3bc6e092d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208341
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
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>
Allows for function objects to be displayed in an understandable fashion
in developer tooling (e.g., a DevTools program structure inspector).
Also adds 'implicit' property to @Function which specifies whether or not a function was defined implicitly (e.g., getter/setter).
TEST=service/get_object_rpc_test.dart
Change-Id: I2da1aa15c58635046b905e205bfd29d654bbde2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203200
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Allows for tools like the Dart test runner to hide the main isolate by
marking it as a system isolate, only showing the isolates users are
interested in.
TEST=pkg/vm_service/mark_main_isolate_as_system_isolate_test.dart
Change-Id: I24d0f20614e89076a05499c206d576c355489a13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207203
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
events on Developer stream.
Also removes intrinsic implementations for UserTag_makeCurrent to allow
for service events to be sent on UserTag change.
TEST=DartAPI_UserTags,pkg/vm_service/test/user_tag_changed_test.dart
Change-Id: I5dc9ee77c0048590d3c6e33a652eee5bc3bf522a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Token position and script reference information are cheap to provide and
make it possible to tie objects to scripts without requiring additional
requests for full objects.
TEST=Existing
Change-Id: I917714149a72a53081fee5626ccad858e86f5313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201864
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
See: https://dart-review.googlesource.com/c/sdk/+/196026
TEST=Code cleanup exclusively (sorting imports); no new tests.
Change-Id: Ib07a82ff418138c542d6a83cfab9aabbb285f866
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196180
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
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>
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>
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>
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>
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>
The async, off-stack part of DebuggerStackTrace::CollectAwaiterReturn's
stack unwinding incorrectly looked on the stack instead of following
the Closure's awaiter chain.
This caused the async stack traces to be truncated and missing any
async frames, in turn causing ShouldPauseOnException to incorrectly
conclude no handler frame existing.
This would affect any case where the exception handling was located
around any except for the inner most awaiter.
TEST=Added regression test to pause_on_unhandled_exceptions_catcherror_test
Closes: https://github.com/dart-lang/sdk/issues/37953
Bug: https://github.com/dart-lang/sdk/issues/37953
Change-Id: I34a2b5ce3c7532032b2ef3dfbc2af7294d13a4c7
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187405
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
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>
Will allow for tests to be enabled in google3 as pub or portions of pub
are used to run VM tests.
Previously the test harness was configured to look for a URI with a data: scheme to determine if it was being run via pub run test (pub generates its own harness and spawns the test from that). We were parsing the test URI out of this data URI, which wouldn't work correctly in google3.
This change assumes that if Platform.script.scheme == 'data', the test is being run via pub from the root directory of the package. In that case, we can assume there is a 'test' directory and simply use 'test/$scriptName'as the path for the testee process.
TEST=N/A
Change-Id: I589605ebc7001adc9d8595ca8347c0af329b9c28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184541
Reviewed-by: Gary Roumanis <grouma@google.com>
paired with this so the sdk roll can succeed.
TEST=Fixes static errors
Change-Id: Ia4e325936ea81d0d51fbf6dd939b732860d22100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183760
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
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>
This reverts commit 14032a6209.
Reason for revert : Several customer flutter tests are failing because
of the change in behavior.
TEST=revert of previous CL.
Change-Id: Ia235aa93b9c81fbab066803dc0625856f93acceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181860
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This converts `return e` in async methods in opt-in libraries into
return let v = e in v is Future<FTV> ? await v ; v
where FTV is the future value type of the enclosing function.
Closes#44395Closes#44396Closes#44397Closes#44399
TEST=existing tests
Change-Id: I59687039bfe4a97ffdaa55ac0f193ca4fb208f44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175310
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
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>
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>
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>
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>
All existing embedders have been opted into --lazy-async-stacks, the
VM also uses it as it's default in all configurations.
After this CL, any user of --causal-async-stacks will get an error
message when trying to use it.
=> In any such case, please simply remove the flag.
TEST=Exhaustive CQ.
Bug: https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ia440afcf2dba464aa8b8cf381b93bbac8eb9f8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172564
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This adds back special handling of sync frames which was previously
dropped in 171584.
This is however needed to un-inline optimised frames.
https://dart-review.googlesource.com/c/sdk/+/171584
TEST=python tools/test.py -n dartk-linux-debug-x64 pkg/vm_service/test/get_stack_test
Bug: https://github.com/dart-lang/sdk/issues/44206
Change-Id: Ia24b24c05a1e5f4257b3723bc6e6d3d1dbac9c93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172220
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Clement Skau <cskau@google.com>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
This adds a debugger mechanism to replace part of
--causal-async-stack's _asyncStackTraceHelper runtime entry.
It recognises async and async* functions and adds a synthetic
breakpoint on entry into the wrapped async_op, making sure we
don't get "synthetic" frames as we're stepping in and out of
the async code.
Change-Id: I1df6e6874de2fa9185f27a1a8873ad0071ad9fb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157480
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
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>
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>
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>
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>
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>
This is a reland of 604a366065
Original change's description:
> [ VM / DartDev ] Run all debugging sessions via 'dart run'
>
> Prior to this change, running `dart --observe foo.dart` would result in
> the DartDev flow being bypassed. While `dart foo.dart` will continue to
> bypass DartDev and be run directly, running either `dart --observe
> <vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
> will result in the command being implicitly converted to `dart run
> --observe <vm-flags> foo.dart`. This is required for all standalone VM
> instances to run against DDS instead of the VM service directly.
>
> As usual, the DartDev flow can always be bypassed by providing the
> --disable-dart-dev flag.
>
> Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
Change-Id: I917d3056322d74766bdf376a3e28871ad5b66cfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147980
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit 604a366065.
Reason for revert: Breaks google3, see b/156414355
Original change's description:
> [ VM / DartDev ] Run all debugging sessions via 'dart run'
>
> Prior to this change, running `dart --observe foo.dart` would result in
> the DartDev flow being bypassed. While `dart foo.dart` will continue to
> bypass DartDev and be run directly, running either `dart --observe
> <vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
> will result in the command being implicitly converted to `dart run
> --observe <vm-flags> foo.dart`. This is required for all standalone VM
> instances to run against DDS instead of the VM service directly.
>
> As usual, the DartDev flow can always be bypassed by providing the
> --disable-dart-dev flag.
>
> Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I688a3779e7ccaf85a28dc4d6f5ccf23596109519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147900
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Prior to this change, running `dart --observe foo.dart` would result in
the DartDev flow being bypassed. While `dart foo.dart` will continue to
bypass DartDev and be run directly, running either `dart --observe
<vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
will result in the command being implicitly converted to `dart run
--observe <vm-flags> foo.dart`. This is required for all standalone VM
instances to run against DDS instead of the VM service directly.
As usual, the DartDev flow can always be bypassed by providing the
--disable-dart-dev flag.
Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
The `TimelineStreamSubscriptionsChanged` event is sent when
`setVMTimelineFlags` is invoked, notifying `Timeline` subscribers that
the set of recorded timeline streams has changed.
Fixes https://github.com/dart-lang/sdk/issues/41822
Change-Id: Ic1545eefea8cf3deeefba97bd1ea2695d1c35016
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147681
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Fixes buildbot failures by running VM service and DDS service tests in
separate test processes.
This reverts commit 1f0c90868c.
Change-Id: I0ad9b2e6ccea4d5468dd4dcdde0e286bcbf820ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142902
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
We'll let test.py kill the tests based on its own timeout settings.
Change-Id: I2dab10e16d936b4c7cfffcab3e78370c00733cb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143180
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit 6b2419ddaf.
Reason for revert: Failures on bots. Reverting.
Original change's description:
> [ Service / package:dds ] Add stream support to package:dds and enable DDS for VM service tests
>
> This change adds stream forwarding to the Dart Development Service,
> allowing for clients to subscribe to service protocol streams with DDS
> instead of the VM service directly. DDS will maintain a single
> subscription for each stream as long as at least one client is listening
> to that stream. A DDS stream subscription will be closed when the last
> client listening to that stream either disconnects or calls
> streamCancel.
>
> This change also enables DDS for most of the Observatory services tests,
> excluding thoses which utilize:
>
> - Service extensions
> - Client naming
> - Client isolate resume synchronization
>
> Change-Id: I5641e879a7626fcd5e4d28434ed480dd72fc7659
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142083
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I185e63eabca54a3dff49d4f5a8a126795cadfa80
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This change adds stream forwarding to the Dart Development Service,
allowing for clients to subscribe to service protocol streams with DDS
instead of the VM service directly. DDS will maintain a single
subscription for each stream as long as at least one client is listening
to that stream. A DDS stream subscription will be closed when the last
client listening to that stream either disconnects or calls
streamCancel.
This change also enables DDS for most of the Observatory services tests,
excluding thoses which utilize:
- Service extensions
- Client naming
- Client isolate resume synchronization
Change-Id: I5641e879a7626fcd5e4d28434ed480dd72fc7659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142083
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This is a breaking change for package:vm_service as multiple RPCs now return `Future<dynamic>` to allow for Sentinels.
Fix related to b/150193047
Change-Id: I9dd3247d079a391e8677f7ba6ef5056107284af3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137821
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit 37f4a44a27.
Reason for revert: Relanding after infra issues cleared
Original change's description:
> Revert "[ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs"
>
> This reverts commit 48808f7dce.
>
> Reason for revert: Unable to approve failures.
>
> Original change's description:
> > [ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs
> >
> > Add support for naming VM service clients which allows for resume
> > permissions to be set for all clients of the same name. If a client
> > name requires resume approval, an isolate won't be resumed until all
> > clients which require resume approval have called the `resume` RPC.
> >
> > Resume approvals can be set for the following pause events:
> > - PauseOnStart
> > - PausePostRequest (issued after `reloadSources(pause: true)`)
> > - PauseOnExit
> >
> > Change-Id: I7dde3d8aaeccfcf47fa84f1f92159846f1560e16
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133621
> > Commit-Queue: Ben Konyi <bkonyi@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Reviewed-by: Gary Roumanis <grouma@google.com>
>
> TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com
>
> Change-Id: I8e60416ad8cbec9ad93f4e34e9bf9af5a516c6dc
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134465
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com
Change-Id: Ibd9d831774e5c4dd500da026f41b173589a9aefd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134415
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit 48808f7dce.
Reason for revert: Unable to approve failures.
Original change's description:
> [ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs
>
> Add support for naming VM service clients which allows for resume
> permissions to be set for all clients of the same name. If a client
> name requires resume approval, an isolate won't be resumed until all
> clients which require resume approval have called the `resume` RPC.
>
> Resume approvals can be set for the following pause events:
> - PauseOnStart
> - PausePostRequest (issued after `reloadSources(pause: true)`)
> - PauseOnExit
>
> Change-Id: I7dde3d8aaeccfcf47fa84f1f92159846f1560e16
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133621
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Gary Roumanis <grouma@google.com>
TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com
Change-Id: I8e60416ad8cbec9ad93f4e34e9bf9af5a516c6dc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134465
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Add support for naming VM service clients which allows for resume
permissions to be set for all clients of the same name. If a client
name requires resume approval, an isolate won't be resumed until all
clients which require resume approval have called the `resume` RPC.
Resume approvals can be set for the following pause events:
- PauseOnStart
- PausePostRequest (issued after `reloadSources(pause: true)`)
- PauseOnExit
Change-Id: I7dde3d8aaeccfcf47fa84f1f92159846f1560e16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133621
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
using Instruments to track these events.
Signed-off-by: yuanhuihui <gityuan@gmail.com>
Bug: https://github.com/dart-lang/sdk/issues/40076
Change-Id: I590081c516923f82a2a3dbf4b109afe75b8f5fc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131360
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Running all existing tests with/without lazy async stacks ensures that
the existing functionality for --lazy-async-stacks does not regress.
There are still a few smaller things to be done in the debugger for lazy
async stacks.
This CL also ensures:
* The inner closure, i.e. AsyncClosure/AsyncGenClosure, is not
inlined if FLAG_lazy_async_stacks is on.
* Fixes a crash in dartkb mode, when the function of the Bytecode
object is null.
* Does a simple integration of the lazy async stacks in debugger.cc -
to ensure a stack is returned via vm-service.
Issue https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ibc1e887a457e2c456ae65d9ed5fa92434f122a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131825
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Also extend test to verify one can find expected instances through the
heap snapshot.
Change-Id: Ie4d83100b0702f6e0ceb7ae351b1d49d85d385a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131066
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
When connecting to a VM service which supports an older version of the
protocol than that supported by package:vm_service, there was the
possibility for a crash if the package tried to create a List for a
response property which is not supported by the remote VM service. The
fix here is to check for null from createServiceObject when building a
List from a response and produce an empty list for that property.
Issue originally filed here: https://github.com/dart-lang/coverage/issues/278
Change-Id: Ibe8593fa8e4a55d05dd821bbdf363a67c15d5483
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127065
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I5bcb7c40be12ee1dc887620281b4807469d67bbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125729
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
This is to enable vm clients to ask how much memory is consumed by isolate group.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: I4f1c499bf02c20b80e9802d8ad60e7ea65cfb375
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119724
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This change should also reduce the number of flaky failures and fix issue where `pub run -c test` would fail for certain tests.
Change-Id: I6010346b8a916958d46985e45600ef5a4dc760c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119500
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I0844d5d9e61351bae64ed2b0747d86872c336339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117922
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This change is considered breaking as the constructor parameters for non-optional
fields are marked as @required.
General cleanups (unnecessary 'new', single line methods) in this CL as well.
Fixes https://github.com/dart-lang/sdk/issues/38194
Change-Id: I1d6a4b3a6cca6646b6bc3ebb1fb8322060ea7c52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117211
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Allows for VM service clients to determine information about the system
the service is running on. Needed for some DevTools functionality.
Change-Id: I530984816e6cc1e4ca378454882219085e2d9de8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111361
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Changes from original CL:
* Removed service_undocumented.md
* Removed generation of wrappers for undocumented RPCs
* Cleaned up generation code which was used for generating wrappers for undocumented RPCs
* Removed JARs from pkg/vm_service/java/third_party
This reverts commit 477a3c4748.
Change-Id: I8d36733c8b2602e4935c3f23698d3f7c97a20187
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110135
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit dbeceb1d06.
Reason for revert: Exposes private VM service methods
Original change's description:
> [ VM / Service ] Pulled in vm_service_drivers from its own repo.
>
> - Updated various paths to point to the sdk repo instead of the
> vm_service_drivers repo.
> - Updated generate.dart to use the service.md from the SDK, not a copy.
> - Removed hidden files that are no longer needed.
>
> Change-Id: I11b1f2e32d55f1fdaaa6eb9ce34fc318716c36f9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109120
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=devoncarew@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I44af2074ba13dec41ffac3c25330e4603c50b06a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109895
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
- Updated various paths to point to the sdk repo instead of the
vm_service_drivers repo.
- Updated generate.dart to use the service.md from the SDK, not a copy.
- Removed hidden files that are no longer needed.
Change-Id: I11b1f2e32d55f1fdaaa6eb9ce34fc318716c36f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109120
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>