Commit Graph

1605 Commits

Author SHA1 Message Date
Ben Konyi 493560a419 [ VM ] Disable sdk_break_with_mixin_test on AOT bots
Fixes https://github.com/dart-lang/sdk/issues/45781

TEST=N/A

Change-Id: I3a624078183eaa2bc283bd9f2363b65dfdf781d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196341
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-21 16:59:04 +00:00
Vyacheslav Egorov f88ce677e1 [vm/debugger] Avoid treating a try/finally as a catch
There is a synthetic try/catch within a try/finally block.

When trying to assess whether an exception is caught, the debugger
should skip such generated try/catch blocks. Otherwise, it considers
that try/finally actually handles the exception, which is wrong.

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

TEST=runtime/observatory{,_2}/tests/service{,_2}/regress_45684_test.dart

Change-Id: I60e8837204cf97ee1ab02ffd03364e7f69857004
Fixed: 45684
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196124
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-20 23:14:38 +00:00
Ben Konyi 302e42da44 [ VM / Service ] Allow for resolving breakpoints in multiple Script
objects

It's possible for scripts to appear in multiple components provided by
the front end in certain situations (e.g., mixin applications in
different libraries). Previously when trying to set a breakpoint, if
multiple scripts were found matching the target URI the debugger would
give up and not set the breakpoint.

This change allows for multiple Scripts to be associated with a
BreakpointLocation.

Fixes https://github.com/flutter/flutter/issues/66832

TEST=runtime/observatory_2/tests/service_2/sdk_break_with_mixin_test.dart

Change-Id: I935721f4753675a9a2051a71cc1720e590f8d4f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195664
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-20 22:34:38 +00:00
Alexander Thomas b5c63ce757 [infra] Migrate scripts to python3
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.

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

TEST=Manually tested common user journeys.

Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-15 10:10:20 +00:00
Ryan Macnak e67dd9c2c5 Reapply "[vm, service] Gather used and capacity from various mallocs."
Avoid weak linking on iOS.

TEST=ci
Change-Id: Iafcb5bfdea0520d50363486e67031e1d5302d32b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161461
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-14 21:50:31 +00:00
Ryan Macnak f54bb55244 Reland "[vm, service, observatory] Add ability to retrieve the set of all instances of a class, implementation hierarchy or interface hierarchy as an array."
Filter Class::direct_subclasses/implementors_ to remove tree-shaken classes.

TEST=ci, manual UI interaction
Bug: https://github.com/dart-lang/sdk/issues/45564
Change-Id: Ia2a46e9701745ce88dffa95a86b7756f3ab0921d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194110
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-14 19:40:20 +00:00
Martin Kustermann 3f7614f56f [gardening] Skip service tests that require expression evaluation in AppJIT
In AppJIT mode we run from a snapshot and won't have an incremental
compiler available. That also means expression evaluation is not
supported.

The specific test that was failing was

  service_2/evaluate_activation_in_method_class_test/service

though this CL skips all evaluation tests.

The CL also align the service and service_2 status files more.

TEST=Only updates status file to skips tests.

Change-Id: I8dbb3aeeb686370d898c59da3729f5e0c52df411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194685
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-04-09 09:58:43 +00:00
Ryan Macnak fb181e87b9 [vm, service] Fill in more field names in retaining paths.
TEST=manual, runtime/observatory/tests/ui/inspector.dart
Bug: https://github.com/flutter/flutter/issues/79605#issuecomment-814342601
Change-Id: I1532dff15620835805cd2a8e9ddab693864f6eb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194112
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-07 23:05:58 +00:00
Ben Konyi d18d3d837f [ dart:developer ] Add serverWebSocketUri to ServiceProtocolInfo
Adds a convenience getter to ServiceProtocolInfo which transforms the VM
Service HTTP URI into a valid web socket URI that can be used to connect
to the VM service.

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

TEST=runtime/observatory/tests/service/developer_server_control_test.dart

Change-Id: Ib15de1f1a9b26ac5cf45f55a53014761a6fa7900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194209
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-04-07 20:02:17 +00:00
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
Alexander Aprelev abdca81fa0 Revert "[vm, service, observatory] Add ability to retrieve the set of all instances of a class, implementation hierarchy or interface hierarchy as an array."
This reverts commit 170bda2b74 as it breaks ffi test.

See https://github.com/dart-lang/sdk/issues/45564

TEST=rollback

Change-Id: Ie27cfa7c3bc093c1e8d46722942d1f2e5e3cb77e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193882
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-04-02 16:46:11 +00:00
Ryan Macnak 170bda2b74 [vm, service, observatory] Add ability to retrieve the set of all instances of a class, implementation hierarchy or interface hierarchy as an array.
Allows developers to perform arbitrary filtering or analysis of instances, such as finding the largest strings, degreeses of duplication, histograms of various properties, etc.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/44479
Change-Id: I0b4005b5778038945e5f1b2d7858806c8e0dbbff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176381
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-04-01 20:53:22 +00:00
Ben Konyi 0ab30e584b [ Service ] Mark pause_on_exception_from_slow_path_test as Slow
TEST=N/A

Change-Id: I570d977a84e60c478e08e933abf184a227231d05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193441
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-03-29 16:45:06 +00:00
Ben Konyi 3b76190e02 [ Service ] Skip sigquit_starts_service_test on AppJIT configurations
TEST=N/A

Change-Id: If118d8254b1f918306723e7677680fffefe836e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193060
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-03-25 17:02:31 +00:00
Ben Konyi 45c4f589a1 [ Service ] Skip sigquit_starts_service_test on precompiled and simarm
configurations

TEST=N/A

Change-Id: I286abb3e76aab0019fe838b65097b2d07651b52b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192950
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-03-25 01:20:52 +00:00
Ben Konyi 4faadf1bdd [ VM / Service ] Fixed Observatory URI not being printed when service is
started via SIGQUIT

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

TEST=service/sigquit_starts_service_test.dart

Change-Id: I4e7b818d60b18e0a3bc2ce4cea670accf4bbd115
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192604
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-03-24 23:59:23 +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
Daco Harkes 043ea3b4f4 [vm/service] Fix tests in obfuscation
Added entry-point pragmas to prevent obfuscation of global vars.

Removed expectation checking for standard library `Expando` class name.

Closes: https://github.com/dart-lang/sdk/issues/45422

TEST=Fixes various service_2 tests in obfuscation mode.

Change-Id: I91bb856c7f1ff44afe1cceec8e94e3b97ab56e44
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-obfuscate-linux-release-x64-try
Fixed: 45422
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192681
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-03-23 13:28:36 +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
Alexander Aprelev 2c5b320b14 [vm/concurrency/debugger] Fix pool patching synchronization for lightweight isolates breakpoints.
TEST=service/break_on_function_many_child_isolates_test

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

Change-Id: I15b9d9db938042c89f21700876bf75d932f044a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191781
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-03-19 20:24:48 +00:00
Martin Kustermann 3930eb8fce [gardening] Mark class as entrypoint to preserve name in obfuscation mode
Fixes https://github.com/dart-lang/sdk/issues/45385

TEST=Fixes service/allocation_test in obfuscation mode.

Change-Id: I80ac204866c5224cf88d2f5f2079655e224691c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192143
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-03-19 13:15:29 +00:00
Alexander Aprelev 7b94d56d67 [observatory] Provide isolate for send data events because observatory expects it for write events.
_ConsoleStreamPrinter::onEvent expects isolate on WriteEvent. It's absence causes exceptions in Observatory. This started with https://dart-review.googlesource.com/c/sdk/+/190303

TEST=updated capture_stdio_test with isolate expectations; run observatory to ensure to exceptions are generated

Change-Id: I73efe9c1ab5b0d779d9432fd64ad5ccc5fcc14ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191661
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-03-17 23:30:47 +00:00
Alexander Aprelev 4baf7e5e3d [vm/concurrency] Introduce GroupDebugger that takes CodeBreakpoints management away from isolate Debugger.
CodeBreakpoint class tracks patching of the call targets for the purpose of routing the call to the debugger runtime.
With this CL CodeBreakpoint instance is managed by GroupDebugger, debugger class owned by IsolateGroup, and can be associated with multiple BreakpointLocation, one location per isolate that set a breakpoint at particular code location.

TEST=observatory/tests/service/break_on_function_child_isolate_test

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

Change-Id: I3b3d0974a0fb9668742e5c1e2a2ce13b84b1d630
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190732
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-03-17 18:03:14 +00:00
Clement Skau f2dfe3a8be [vm/debugger] Fixes async CollectAwaiterReturn()
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>
2021-02-26 06:46:36 +00:00
Ryan Macnak 5a385890b9 [test] Apply simarm64 status file entries to simarm64c.
Remove references to the removed simarmv6 architecture.

TEST=ci
Change-Id: I10e9fc8291c3e5b6b9a4bd71ca05de95e53f22c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187500
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-02-25 21:18:02 +00:00
Jens Johansen 3f8cbc96d9 [observatory] Make Multi-line evaluation work
Before this CL, if enabling multi-line expression evaluation, clicking
`Evaluate` would crash because of - essentially - a null pointer
exception.

TEST=Existing test suites.

Change-Id: Ibe517870dee33ff9d3edd427601d724b151e9699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186293
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-02-24 10:41:50 +00:00
Jens Johansen bbb24d3364 [observatory] Properly handle expression compile time errors
In observatory there are two different ways to do expression evaluation.
One calls `evaluateInFrame` and catches the ServerRpcException thrown
when there's a compilation error. Another calls `evaluate` and does not
catch the ServerRpcException thrown when there's a compilation error.

This means, for instance, if evaluting an expression on an instance
and makes a typo there's suddenly a big box with scrambled javascript
on the top-right of the screen.

This CL:
* Handles the ServerRpcException thrown when there's a compilation error
  for `evaluate` as well.
* Makes both `evaluate` and `evaluateInFrame` unpack the `details` sent
  by the VM instead of printing out the textual representation of a map.
  This means that you get an error message like

```
org-dartlang-debug:synthetic_debug_expression:1:1: Error: Getter not found: 'test'.
test
^^^^
```

instead of

```
{details: org-dartlang-debug:synthetic_debug_expression:1:1: Error: Getter not found: 'test'.
test
^^^^}
```

TEST=Existing test suites.

Change-Id: I2dc3f19f024e918e8d0e9b0f4166a4ef2c6cbd9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186292
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-02-24 10:34:35 +00:00
Ben Konyi 7315480f5d [ VM ] Skip get_allocation_traces_test on AppJIT, SIMARM, and AOT
AOT lacks debugger() support and AppJIT/SIMARM allocation traces don't
exactly match those listed in the test.

Follow up to https://dart-review.googlesource.com/c/sdk/+/182666

TEST=N/A

Change-Id: I74a4d124c5e2ec10e28521b46f553eae87fea540
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184845
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-02-12 23:52:00 +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
Martin Kustermann 2439c412f0 [vm/concurrency] Make main Kernel loading independent of current isolate
Since loading kernel will affect all isolates within a group, there
should be nothing isolate-specific inside the kernel loader. To ensure
we don't have (or introduce) any accidental uses, we add a
NoActiveIsolateScope to the main parts of kernel loading.

Only loading of native extensions - done by the kernel loader -
currently requires an active isolate. The reason for this is that
loading native extensions happen by calling out to embedder, which calls
back into the VM using the our embedding API (which currently requires
an active isolate)

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

TEST=Refactoring of existing implementation.

Change-Id: I96e64dbfe7148b76b8fa006fe5dbde8c1f904504
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184269
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-02-12 19:45:05 +00:00
Martin Kustermann 4e84c97af7 [gardening] Mark service{,_2}/valid_source_locations_test as slow
TEST=Attempt at making timing out tests pass.

Change-Id: Id972bf437eef103b5e923a0ab7fdeb4b6433c727
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184781
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-02-12 16:57:53 +00:00
Martin Kustermann 92af830255 [vm/concurrency] Move background compiler related state from Isolate to IsolateGroup
As part of making the compiler independent of `Isolate` we have to move
various state from `Isolate` to `IsolateGroup`. This CL moves background
compiler and related state.

One background compiler will be shared for all isolates within a group.

Issue https://github.com/dart-lang/sdk/issues/36097
Fixes https://github.com/dart-lang/sdk/issues/44938

TEST=Mainly refactoring, stress tests for --enable-isolate-groups with JIT will come in the future.

Change-Id: I66e863651d0b37c431ce1864e505b5413850cbde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183401
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-12 03:40:14 +00:00
Ben Konyi c039ff268f [ VM ] Fix crash when accessing metrics page when no metrics have been
logged

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

TEST=regress_44859_test.dart

Change-Id: I7aa6b54f8f8d04b630d0ffe64d5414a6a9e56de2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183041
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-02-05 00:31:47 +00:00
Clement Skau 2236883ff2 [SDK] Removes non-exiting tests from .status
TEST=Tested all configurations.

Change-Id: Iec00d7e6ea56221ffebcf044de22647907f598f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182500
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-02-04 06:46:13 +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
Clement Skau ee2f0702e9 [VM] Removes #35505 status file exception.
Issue #35505 has been closed, and the test is no longer failing.
This is causing test runs to fail because this test _isn't_ failing.

TEST=Tested previously failing test locally.

Bug: https://github.com/dart-lang/sdk/issues/35505
Change-Id: I0664683ec26e40a42ad60340718c78b1392b823d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182267
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Clement Skau <cskau@google.com>
2021-02-02 13:55:24 +00:00
Clement Skau dfd5413952 [VM] Adds Debugger break for Future.catchError
TEST=Added new Future.catchError pause-on-unhandled-exceptions test.

Bug: https://github.com/dart-lang/sdk/issues/37953
Change-Id: Ieb3cf834eacad4f9b98ab2db0e5813e9bfa09747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180840
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-02-02 06:59:54 +00:00
asiva 34f9734b41 Revert "[cfe] Handle conditional await in CFE"
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>
2021-02-01 23:41:01 +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
Clement Skau c3ec3e53a1 [VM] Adds Future.then stack unwind. (3)
TEST=ASAN; Various 'causal' tests updated below.

Issues addressed in this revision:
- https://github.com/dart-lang/sdk/issues/44708 ASAN
- https://github.com/dart-lang/sdk/issues/44700 SegFault

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-asan-linux-release-x64-try,analyzer-linux-release-try,analyzer-analysis-server-linux-try,analyzer-nnbd-linux-release-try
Bug: https://github.com/dart-lang/sdk/issues/40815, https://github.com/dart-lang/sdk/issues/37953
Change-Id: I8b8f6ee2e5d4ca2e6bea988ec1cd9f912ddf8240
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180186
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-26 14:02:39 +00:00
Johnni Winther 14032a6209 [cfe] Handle conditional await in CFE
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 #44395
Closes #44396
Closes #44397
Closes #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>
2021-01-22 19:12:24 +00:00
Ryan Macnak 54402fb7e0 [test] Skip new reload test on AOT configurations.
TEST=ci
Change-Id: I5bffa2964d3e695c016fa6e86d7e8b2f6079ce45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180267
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-01-21 01:53:23 +00:00
Ryan Macnak 9fd4b10fe5 [vm, reload] Allow reload of libraries containing deferred imports.
Previously, deferred imports were really deferred, and the VM would have needed to trigger more loading as part of checking the validity of a reload and handle the re-entrancy of the tag handler and restart the checking a reload: all messy control flow that was side-stepped by just erroring-out. Currently, the language and kernel are incapable of truly deferred imports, so we need only propagate the state bit that checks loadLibrary was called and completed before members are accessed through the deferred prefix.

TEST=deferred_import_reload_test
Bug: https://github.com/dart-lang/sdk/issues/26878
Bug: https://github.com/flutter/flutter/issues/73602
Change-Id: I48bf3e8331630b732d96393e02b12f86de8cc5b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179620
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-01-20 21:58:04 +00:00
David Morgan 88c1be7e3b Revert "Reland "[VM] Adds Future.then and Future.catchError stack unwinding.""
This reverts commit 9978a246c1.

Reason for revert: VM crashes in google3, b/177506826

Original change's description:
> Reland "[VM] Adds Future.then and Future.catchError stack unwinding."
>
> This reverts commit 978b838461.
>
> Reason for revert: Fix: https://dart-review.googlesource.com/c/sdk/+/179762
>
> TEST=Various 'causal' tests updated below.
>
> Original change's description:
> > Revert "[VM] Adds Future.then and Future.catchError stack unwinding."
> >
> > This reverts commit 8f2c47f24b.
> >
> > Reason for revert: We suspect this is causing VM crashes: http://b/177506826
> >
> > Original change's description:
> > > [VM] Adds Future.then and Future.catchError stack unwinding.
> > >
> > > TEST=Various 'causal' tests updated below.
> > >
> > > Bug: https://github.com/dart-lang/sdk/issues/40815, https://github.com/dart-lang/sdk/issues/37953
> > > Change-Id: I1420d6163ac2e3b22e0971f7b0ad516895dded70
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176662
> > > Commit-Queue: Clement Skau <cskau@google.com>
> > > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> >
> > TBR=vegorov@google.com,cskau@google.com
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/40815
> > Bug: https://github.com/dart-lang/sdk/issues/37953
> > Change-Id: I870f0202f43588f71a5d2b0f82338978b5a5dda9
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178998
> > Reviewed-by: Michal Terepeta <michalt@google.com>
> > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> > Commit-Queue: Michal Terepeta <michalt@google.com>
>
> TBR=vegorov@google.com,cskau@google.com,michalt@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: https://github.com/dart-lang/sdk/issues/40815
> Bug: https://github.com/dart-lang/sdk/issues/37953
> Change-Id: I8a1eb6679b01571b850499cac2dadc5bf9ef2dcd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179763
> Reviewed-by: Clement Skau <cskau@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Clement Skau <cskau@google.com>

TBR=vegorov@google.com,cskau@google.com,michalt@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/40815
Bug: https://github.com/dart-lang/sdk/issues/37953
Change-Id: I1274bcb375bf6f9cb0609d372b0b451d51eb99c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180147
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2021-01-20 12:44:55 +00:00
Clement Skau 9978a246c1 Reland "[VM] Adds Future.then and Future.catchError stack unwinding."
This reverts commit 978b838461.

Reason for revert: Fix: https://dart-review.googlesource.com/c/sdk/+/179762

TEST=Various 'causal' tests updated below.

Original change's description:
> Revert "[VM] Adds Future.then and Future.catchError stack unwinding."
>
> This reverts commit 8f2c47f24b.
>
> Reason for revert: We suspect this is causing VM crashes: http://b/177506826
>
> Original change's description:
> > [VM] Adds Future.then and Future.catchError stack unwinding.
> >
> > TEST=Various 'causal' tests updated below.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/40815, https://github.com/dart-lang/sdk/issues/37953
> > Change-Id: I1420d6163ac2e3b22e0971f7b0ad516895dded70
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176662
> > Commit-Queue: Clement Skau <cskau@google.com>
> > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
>
> TBR=vegorov@google.com,cskau@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: https://github.com/dart-lang/sdk/issues/40815
> Bug: https://github.com/dart-lang/sdk/issues/37953
> Change-Id: I870f0202f43588f71a5d2b0f82338978b5a5dda9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178998
> Reviewed-by: Michal Terepeta <michalt@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Michal Terepeta <michalt@google.com>

TBR=vegorov@google.com,cskau@google.com,michalt@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/40815
Bug: https://github.com/dart-lang/sdk/issues/37953
Change-Id: I8a1eb6679b01571b850499cac2dadc5bf9ef2dcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179763
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-01-18 12:15:49 +00:00
Ryan Macnak b1c09ecd8f [vm] Make naming more consistent when converting between handles, tagged and untagged pointers.
Currently we have things called XPtr which are not what you get from ptr().

Old world:
handle->raw() returns RawObject* (tagged)
raw_obj->ptr() returns RawObject* (untagged)

After 6fe15f6df9:
handle->raw() returns ObjectPtr
obj_ptr->ptr() returns ObjectLayout*

New world:
handle->ptr() returns ObjectPtr
obj_ptr->untag() returns UntaggedObject*

TEST=ci
Change-Id: I6c7f34014cf20737607caaf84979838300d12df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149367
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-15 23:32:02 +00:00
Michal Terepeta 978b838461 Revert "[VM] Adds Future.then and Future.catchError stack unwinding."
This reverts commit 8f2c47f24b.

Reason for revert: We suspect this is causing VM crashes: http://b/177506826

Original change's description:
> [VM] Adds Future.then and Future.catchError stack unwinding.
>
> TEST=Various 'causal' tests updated below.
>
> Bug: https://github.com/dart-lang/sdk/issues/40815, https://github.com/dart-lang/sdk/issues/37953
> Change-Id: I1420d6163ac2e3b22e0971f7b0ad516895dded70
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176662
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,cskau@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/40815
Bug: https://github.com/dart-lang/sdk/issues/37953
Change-Id: I870f0202f43588f71a5d2b0f82338978b5a5dda9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178998
Reviewed-by: Michal Terepeta <michalt@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-01-14 13:56:53 +00:00