Commit graph

180 commits

Author SHA1 Message Date
Anis Alibegić 40e18905f2 Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478

TEST=Manual

GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
Ben Konyi 54d3d7e459 [ Service ] Add gcType to Event
Fixes https://github.com/dart-lang/sdk/issues/49319

TEST=N/A

Change-Id: I703f102e2003ec6a21166b03ec52d89a42f61ad3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251621
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-07-20 18:08:27 +00:00
Liam Appelbe 844a9f3808 Reland "[ VM / Service ] Add abstract flag to Function"
This reverts commit 9b02bdaa76.

With https://dart-review.googlesource.com/c/sdk/+/251443 this is a
non-breaking change.

Bug: https://github.com/dart-lang/coverage/pull/412
Change-Id: Iaa8a74ab8065380d2a7e8a8fc07fec3a4518d979
TEST=Added to get_object_rpc_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251480
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-07-15 18:30:20 +00:00
Alexander Thomas 90bd16550d [infra] Upgrade checked-in SDKs to 2.18.0-271.0.dev
Tested: Builds on the CQ, built locally.
Change-Id: I25d0286d43199f4012a21e2223b1046a61a86bb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251545
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-07-15 04:48:41 +00:00
Ahmed Ashour 99f0fb5b70 Fix typos
Fixes #49364

TEST=ci

Change-Id: Ic643819c9cdd7b56690981b96b854b1e8d622fff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-12 19:35:22 +00:00
Alexander Aprelev 9b02bdaa76 Revert "Reland "[ VM / Service ] Add abstract flag to Function""
This reverts commit aa2e19827f.

Reason for revert: broken g3 bot

Original change's description:
> Reland "[ VM / Service ] Add abstract flag to Function"
>
> This reverts commit 6c542eca22.
>
> Switched vm_service from a minor version bump to a major one.
> See: https://buganizer.corp.google.com/issues/236964692#comment4
>
> Bug: https://github.com/dart-lang/coverage/issues/398
> Change-Id: I85f88d4a1cdcb878cbf77da283041458381e2a2b
> TEST=Added to get_object_rpc_test.dart
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250772
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I6fbedfb146ee2157baf49162acd0c943402b6cbf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/coverage/issues/398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250787
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-07-07 02:39:11 +00:00
Liam Appelbe aa2e19827f Reland "[ VM / Service ] Add abstract flag to Function"
This reverts commit 6c542eca22.

Switched vm_service from a minor version bump to a major one.
See: https://buganizer.corp.google.com/issues/236964692#comment4

Bug: https://github.com/dart-lang/coverage/issues/398
Change-Id: I85f88d4a1cdcb878cbf77da283041458381e2a2b
TEST=Added to get_object_rpc_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250772
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-07-06 22:32:22 +00:00
Alexander Markov 77ea9820aa [vm] New implementation of sync* based on suspend/resume stubs
Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I7f4b6b56d914a617dfd7ac724cd4414532073b4c
TEST=ci
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249141
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-27 18:19:12 +00:00
Emmanuel Pellereau 6c542eca22 Revert "[ VM / Service ] Add abstract flag to Function"
This reverts commit 921476edf3.

Reason for revert: breaks google3 (b/236964692).

Original change's description:
> [ VM / Service ] Add abstract flag to Function
>
> Bug: https://github.com/dart-lang/coverage/issues/398
> Change-Id: I1f6e16483e28fb7a77aebae079fd62abe9d16099
> TEST=Added to get_object_rpc_test.dart
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249421
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I1733080dadd6f283766dddbdbe1390d821f91f64
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/coverage/issues/398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249680
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
2022-06-24 07:35:29 +00:00
Liam Appelbe 921476edf3 [ VM / Service ] Add abstract flag to Function
Bug: https://github.com/dart-lang/coverage/issues/398
Change-Id: I1f6e16483e28fb7a77aebae079fd62abe9d16099
TEST=Added to get_object_rpc_test.dart
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249421
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2022-06-23 15:46:05 +00:00
Alexander Markov 058265f4e7 Reland "[vm] More efficient 'await' of not Future and completed _Future"
This is a reland of commit 6b3d1752fa

Fixes b/235734143
TEST=runtime/tests/vm/dart/await_in_custom_zone_test.dart

Original change's description:
> [vm] More efficient 'await' of not Future and completed _Future
>
> When awaiting a value which is not a Future or a completed
> built-in _Future, 'await' implementation can bypass heavyweight
> _Future/_FutureListener machinery and schedule micro-tasks directly.
>
> Benchmarks:
> JIT, x64:
> AsyncLiveVars.* +46-54% (bigger is better)
> Calls.AwaitAsyncCall -46% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -45%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45%
> Calls.AwaitFutureOrCall -60%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -60%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%
>
> JIT, ia32:
> AsyncLiveVars.* +43-52% (bigger is better)
> Calls.AwaitAsyncCall -42% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -42%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -41%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -39%
> Calls.AwaitFutureOrCall -55%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -54%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -53%
>
> JIT, arm:
> AsyncLiveVars.* +64-71% (bigger is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -51% (less is better)
> Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -48%
> Calls.AwaitFutureOrCall -64%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -64%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%
>
> JIT, arm64:
> AsyncLiveVars.* +65-78% (bigger is better)
> Calls.AwaitAsyncCall -51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -51%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -50%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49%
> Calls.AwaitFutureOrCall -69%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -68%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -67%
>
> AOT, x64:
> AsyncLiveVars.* +55-61% (bigger is better)
> Calls.AwaitAsyncCall -47% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -46%
> Calls.AwaitFutureOrCall -59%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -59%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -58%
>
> AOT, arm:
> AsyncLiveVars.* 54-66% (bigger is better)
> Calls.AwaitAsyncCall -46-51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46-50%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -46-52%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45-50%
> Calls.AwaitFutureOrCall -63-68%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -63-66%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%
>
> AOT, arm64:
> AsyncLiveVars.* +53-66% (bigger is better)
> Calls.AwaitAsyncCall -50-51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -50%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -50-51%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49-50%
> Calls.AwaitFutureOrCall -66-68%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -66-68%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%
>
> TEST=ci
> Issue: https://github.com/dart-lang/sdk/issues/48378
>
> Change-Id: I65e3702fcd816ee3fee876ff442b9887c035b1ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243102
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

Change-Id: I245984ace1c768fdcba58dfdd6aa46e52126be4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248442
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-06-15 15:35:38 +00:00
Alexander Markov 0fd7f0c2a2 Revert "[vm] More efficient 'await' of not Future and completed _Future"
This reverts commit 6b3d1752fa.

Reason for revert: internal test failures b/235734143.

Original change's description:
> [vm] More efficient 'await' of not Future and completed _Future
>
> When awaiting a value which is not a Future or a completed
> built-in _Future, 'await' implementation can bypass heavyweight
> _Future/_FutureListener machinery and schedule micro-tasks directly.
>
> Benchmarks:
> JIT, x64:
> AsyncLiveVars.* +46-54% (bigger is better)
> Calls.AwaitAsyncCall -46% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -45%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45%
> Calls.AwaitFutureOrCall -60%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -60%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%
>
> JIT, ia32:
> AsyncLiveVars.* +43-52% (bigger is better)
> Calls.AwaitAsyncCall -42% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -42%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -41%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -39%
> Calls.AwaitFutureOrCall -55%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -54%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -53%
>
> JIT, arm:
> AsyncLiveVars.* +64-71% (bigger is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -51% (less is better)
> Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -48%
> Calls.AwaitFutureOrCall -64%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -64%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%
>
> JIT, arm64:
> AsyncLiveVars.* +65-78% (bigger is better)
> Calls.AwaitAsyncCall -51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -51%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -50%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49%
> Calls.AwaitFutureOrCall -69%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -68%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -67%
>
> AOT, x64:
> AsyncLiveVars.* +55-61% (bigger is better)
> Calls.AwaitAsyncCall -47% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -46%
> Calls.AwaitFutureOrCall -59%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -59%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -58%
>
> AOT, arm:
> AsyncLiveVars.* 54-66% (bigger is better)
> Calls.AwaitAsyncCall -46-51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46-50%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -46-52%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45-50%
> Calls.AwaitFutureOrCall -63-68%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -63-66%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%
>
> AOT, arm64:
> AsyncLiveVars.* +53-66% (bigger is better)
> Calls.AwaitAsyncCall -50-51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -50%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -50-51%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49-50%
> Calls.AwaitFutureOrCall -66-68%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -66-68%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%
>
> TEST=ci
> Issue: https://github.com/dart-lang/sdk/issues/48378
>
> Change-Id: I65e3702fcd816ee3fee876ff442b9887c035b1ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243102
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

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

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I8ed0fca7234dd33f45997029b948a63341991ee1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248353
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-06-14 17:24:37 +00:00
Alexander Markov 6b3d1752fa [vm] More efficient 'await' of not Future and completed _Future
When awaiting a value which is not a Future or a completed
built-in _Future, 'await' implementation can bypass heavyweight
_Future/_FutureListener machinery and schedule micro-tasks directly.

Benchmarks:
JIT, x64:
AsyncLiveVars.* +46-54% (bigger is better)
Calls.AwaitAsyncCall -46% (less is better)
Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
Calls.AwaitAsyncCallClosureTargetPolymorphic -45%
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45%
Calls.AwaitFutureOrCall -60%
Calls.AwaitFutureOrCallInstanceTargetPolymorphic -60%
Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%

JIT, ia32:
AsyncLiveVars.* +43-52% (bigger is better)
Calls.AwaitAsyncCall -42% (less is better)
Calls.AwaitAsyncCallInstanceTargetPolymorphic -42%
Calls.AwaitAsyncCallClosureTargetPolymorphic -41%
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -39%
Calls.AwaitFutureOrCall -55%
Calls.AwaitFutureOrCallInstanceTargetPolymorphic -54%
Calls.AwaitFutureOrCallClosureTargetPolymorphic -53%

JIT, arm:
AsyncLiveVars.* +64-71% (bigger is better)
Calls.AwaitAsyncCallInstanceTargetPolymorphic -51% (less is better)
Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -48%
Calls.AwaitFutureOrCall -64%
Calls.AwaitFutureOrCallInstanceTargetPolymorphic -64%
Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%

JIT, arm64:
AsyncLiveVars.* +65-78% (bigger is better)
Calls.AwaitAsyncCall -51% (less is better)
Calls.AwaitAsyncCallInstanceTargetPolymorphic -51%
Calls.AwaitAsyncCallClosureTargetPolymorphic -50%
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49%
Calls.AwaitFutureOrCall -69%
Calls.AwaitFutureOrCallInstanceTargetPolymorphic -68%
Calls.AwaitFutureOrCallClosureTargetPolymorphic -67%

AOT, x64:
AsyncLiveVars.* +55-61% (bigger is better)
Calls.AwaitAsyncCall -47% (less is better)
Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -46%
Calls.AwaitFutureOrCall -59%
Calls.AwaitFutureOrCallInstanceTargetPolymorphic -59%
Calls.AwaitFutureOrCallClosureTargetPolymorphic -58%

AOT, arm:
AsyncLiveVars.* 54-66% (bigger is better)
Calls.AwaitAsyncCall -46-51% (less is better)
Calls.AwaitAsyncCallInstanceTargetPolymorphic -46-50%
Calls.AwaitAsyncCallClosureTargetPolymorphic -46-52%
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45-50%
Calls.AwaitFutureOrCall -63-68%
Calls.AwaitFutureOrCallInstanceTargetPolymorphic -63-66%
Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%

AOT, arm64:
AsyncLiveVars.* +53-66% (bigger is better)
Calls.AwaitAsyncCall -50-51% (less is better)
Calls.AwaitAsyncCallInstanceTargetPolymorphic -50%
Calls.AwaitAsyncCallClosureTargetPolymorphic -50-51%
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49-50%
Calls.AwaitFutureOrCall -66-68%
Calls.AwaitFutureOrCallInstanceTargetPolymorphic -66-68%
Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%

TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/48378

Change-Id: I65e3702fcd816ee3fee876ff442b9887c035b1ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243102
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-10 14:38:28 +00:00
Alexander Markov de43a7c16a [vm] Cleanup --lazy-async-stacks VM option
This option was enabled by default in https://dart-review.googlesource.com/c/sdk/+/149288
This change removes old logic behind --no-lazy-async-stacks
and makes --lazy-async-stacks/--no-lazy-async-stacks options no-op.

TEST=ci

Change-Id: I5726690e90e78dd2ac37d8c5944e388042fc3acf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247780
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-06-10 13:41:24 +00:00
Siva Annamalai 5cb3b37c74 Revert "Refactor _Future."
This reverts commit 69f32d6ad7.

Reason for revert: We seem to have a number of tests failing with timeouts in CBUILD after this change, please see logs at
69f32d6ad7

Original change's description:
> Refactor `_Future`.
>
> This is a major rewrite of the `_Future` class,
> which is the default implementation of the `Future` interface.
>
> The main goal was to reduce the number of expensive type checks
> in the internal passing around of data.
> Expensive type checks are things like
> * `is _Future<T>` (more expensive than just `is _Future`, the latter
>   can be a single class-ID check.
> * Covariant generic parameter checks (using `T` covariantly in a
>   parameter forces a run-time type check).
>
> Also removed some plain unnecessary casts and turned some
> implicit casts from `dynamic` into `unsafeCast`s.
>
> This seems to be an success, at least on very primitive benchmarks, according to Golem:
> FutureCatchErrorTest    41.22% (1.9 noise)
> FutureValueTest         46.51% (2.8 noise)
> EmptyFutureTest         59.15% (3.1 noise)
> FutureWhenCompleteTest  51.10% (3.2 noise)
>
> A secondary goal was to clean up a very old and messy class,
> and make it clearer for other `dart:async` how to interact
> with the future.
>
> The change has a memory cost: The `_FutureListener<S,T>` class,
> which represents a `then`, `catchError` or `whenComplete`
> call on a `_Future`, now contains a reference to its source future,
> the one which provides the inputs to the callbacks,
> as well as the result future returned by the call.
> That's one extra memory slot per listener.
>
> In return, the `_FutureListener` now does not need to
> get its source future as an argument, which needs a covariant
> generic type check, and the methods of `_Future` can be written
> in a way which ignores the type parameters of both `_Future`
> and `_FutureListener`, which reduces complex type checks
> significantly.
>
> In general, typed code is in `_FutureListener`, which knows both
> the source and target types of the listener callbacks, and which
> contains the futures already at that type, so no extra type checking
> is needed.
> The `_Future` class is mostly untyped, except for its "public"
> API, called by other classes, which checks inputs,
> and code interacting with non-native futures.
> Invariants ensure that only correctly typed values
> are stored in the untyped shared `_resultOrListeners` field
> on `_Future`, as determined by its `_state` integer.
> (This was already partially true, and has simply been made
> more consistent.)
>
> Further, we now throw an error in a situation that was previously
> unhandled: When a `_Future` is completed with *itself*.
> That would ensure that the future would never complete
> (it waits for itself to complete before it can complete),
> and may potentially have caused weird loops in the representation.
> In practice, it probably never happens. Now it makes the error
> fail with an error.
> Currently a private `_FutureCyclicDependencyError` which presents
> as an `UnsupportedError`.
> That avoids code like
> ```dart
> import "dart:async";
> void main() {
>   var c = Completer();
>   c.complete(c.future); // bad.
>   print("well!");
>   var d = Completer();
>   d.complete(c.future);
>   print("shucks!");
> }
> ```
> from hanging the runtime by busily searching for the end of a cycle.
>
> See https://github.com/dart-lang/sdk/issues/48225
> Fixes #48225
>
> TEST= refactoring covered by existing tests, few new tests.
>
> Change-Id: Id9fc5af5fe011deb0af3e1e8a4ea3a91799f9da4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244241
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

TBR=lrn@google.com,kustermann@google.com,sra@google.com,sigmund@google.com,nshahan@google.com

Change-Id: I455be5a04b4c346df26d4ded0fa7388baccb0f8c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247762
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-09 16:51:55 +00:00
Lasse R.H. Nielsen 69f32d6ad7 Refactor _Future.
This is a major rewrite of the `_Future` class,
which is the default implementation of the `Future` interface.

The main goal was to reduce the number of expensive type checks
in the internal passing around of data.
Expensive type checks are things like
* `is _Future<T>` (more expensive than just `is _Future`, the latter
  can be a single class-ID check.
* Covariant generic parameter checks (using `T` covariantly in a
  parameter forces a run-time type check).

Also removed some plain unnecessary casts and turned some
implicit casts from `dynamic` into `unsafeCast`s.

This seems to be an success, at least on very primitive benchmarks, according to Golem:
FutureCatchErrorTest    41.22% (1.9 noise)
FutureValueTest         46.51% (2.8 noise)
EmptyFutureTest         59.15% (3.1 noise)
FutureWhenCompleteTest  51.10% (3.2 noise)

A secondary goal was to clean up a very old and messy class,
and make it clearer for other `dart:async` how to interact
with the future.

The change has a memory cost: The `_FutureListener<S,T>` class,
which represents a `then`, `catchError` or `whenComplete`
call on a `_Future`, now contains a reference to its source future,
the one which provides the inputs to the callbacks,
as well as the result future returned by the call.
That's one extra memory slot per listener.

In return, the `_FutureListener` now does not need to
get its source future as an argument, which needs a covariant
generic type check, and the methods of `_Future` can be written
in a way which ignores the type parameters of both `_Future`
and `_FutureListener`, which reduces complex type checks
significantly.

In general, typed code is in `_FutureListener`, which knows both
the source and target types of the listener callbacks, and which
contains the futures already at that type, so no extra type checking
is needed.
The `_Future` class is mostly untyped, except for its "public"
API, called by other classes, which checks inputs,
and code interacting with non-native futures.
Invariants ensure that only correctly typed values
are stored in the untyped shared `_resultOrListeners` field
on `_Future`, as determined by its `_state` integer.
(This was already partially true, and has simply been made
more consistent.)

Further, we now throw an error in a situation that was previously
unhandled: When a `_Future` is completed with *itself*.
That would ensure that the future would never complete
(it waits for itself to complete before it can complete),
and may potentially have caused weird loops in the representation.
In practice, it probably never happens. Now it makes the error
fail with an error.
Currently a private `_FutureCyclicDependencyError` which presents
as an `UnsupportedError`.
That avoids code like
```dart
import "dart:async";
void main() {
  var c = Completer();
  c.complete(c.future); // bad.
  print("well!");
  var d = Completer();
  d.complete(c.future);
  print("shucks!");
}
```
from hanging the runtime by busily searching for the end of a cycle.

See https://github.com/dart-lang/sdk/issues/48225
Fixes #48225

TEST= refactoring covered by existing tests, few new tests.

Change-Id: Id9fc5af5fe011deb0af3e1e8a4ea3a91799f9da4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244241
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-06-09 15:32:33 +00:00
Alexander Markov 3e0abdbb98 Reland "[vm] Enable new implementation of async/async* in JIT mode"
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I5b8720b8ef5b8d28773d26c7e94c2e78d876c9d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247603
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-06-09 15:24:13 +00:00
Alexander Markov 3e10d8c833 Revert "[vm] Enable new implementation of async/async* in JIT mode"
This reverts commit b3544c44dc.

Reason for revert: avoid incompatibility between Dart->kernel compiler
and Dart VM during Dart and Flutter rolls (b/234850964).

TEST=ci

Original change's description:
> [vm] Enable new implementation of async/async* in JIT mode
>
> TEST=ci
>
> Issue: https://github.com/dart-lang/sdk/issues/48378
> Change-Id: I0fc069508cb1ce5648deb6604171dfdcd5bcb5c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246082
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=vegorov@google.com,kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,johnniwinther@google.com

Change-Id: I6157623857dbfa9bb07eb1f620d100f5b24314d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/48378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247243
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-06-07 17:57:30 +00:00
Alexander Markov b3544c44dc [vm] Enable new implementation of async/async* in JIT mode
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I0fc069508cb1ce5648deb6604171dfdcd5bcb5c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246082
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-02 23:40:15 +00:00
Liam Appelbe a8a29cffbb [ VM / Service ] Add libraryFilters to getSourceReport RPC
Bug: https://github.com/dart-lang/sdk/issues/48754
Change-Id: I42519d7dd751aa024860f940cbf51d2e38f7ea69
Tested: CI and new integration test
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241180
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2022-05-10 18:08:43 +00:00
Dan Field fe30c3f235 [vm] Expose whether extension stream has listeners, guard postEvent
This avoids json encoding that was otherwise happening even in product mode. JSON encoding shows up CPU profiling as taking significant time, particularly on low end devices.

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

Bug: https://github.com/dart-lang/sdk/issues/48860
Change-Id: I2cf4d949e85c0b23de01ec2033b04527d40c76fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242081
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Dan Field <dnfield@google.com>
2022-04-26 07:53:43 +00:00
Ben Konyi b036052077 Reland "[ Service ] Update VM service message to not reference Observatory"
This reverts commit ee5837aa7a.

Updated Intellij plugins have been published which support the new
message.

TEST=CQ

Change-Id: I81f6d878f036991a95cc1f58d3102015e77aa609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237741
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-03-17 23:15:57 +00:00
Tess Strickland 7fc9cca11e [gardening] Marking test that times out on ia32 debug as Skip.
We're getting shard timeouts now and again involving this timeout,
so skip it entirely before we resort to adding new shards.

TEST=Status file change.

Change-Id: I8dff4db13f7f6e742a3ff54b8401b1eea9f46556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236081
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-03-09 09:13:45 +00:00
Ben Konyi ee5837aa7a Revert "[ Service ] Update VM service message to not reference Observatory"
This reverts commit f9147d933e.

TEST=N/A

Change-Id: Idef34b70f1066ddf79d02588dfba7caeec443e7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234325
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-02-24 18:32:14 +00:00
Ben Konyi f9147d933e [ Service ] Update VM service message to not reference Observatory
See https://github.com/dart-lang/sdk/issues/46756

TEST=Existing

Change-Id: Ib71bf00d667369d7438a4547ae444951ec0979df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233504
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-18 20:53:52 +00:00
Nate Bosch 33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Ryan Macnak b6ab7350be [test] Inform status files about the new simulated architectures.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/37299
Bug: https://github.com/dart-lang/sdk/issues/38587
Change-Id: I6f1a749690b894b14f465d608f37acf62568cdef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231521
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-03 20:32:16 +00:00
Jens Johansen adb1dc9380 [VM] [CFE]: Make VM send over type information for expression compilation
Missing:
* Function types.
* Type variables in bounds, like "method<T, S extends T>() {}" and
  "method<T extends Foo<T>>() {}"

This is in many ways a follow-up to
https://dart-review.googlesource.com/c/sdk/+/212286

TEST=service and (cfe) expression suite tests added.

Change-Id: I20472b59ed73e9845f073e176d73b2c213f9407a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215760
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-01-28 07:49:21 +00:00
Ben Konyi 3d53bf57a0 [ Service ] Fix --log_service_response_sizes being enabled in tests by default
String.fromEnvironment doesn't return null when a variable isn't
defined, instead returning empty string by default. This was causing
service response size logging to be enabled for all tests.

TEST=N/A

Change-Id: Id05693d8a8898deee422e58f627e540cafe59aa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228682
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-18 19:20:05 +00:00
Ben Konyi 2db8f37cfa [ Service ] Add line/column information to SourceLocation objects
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>
2022-01-12 02:09:24 +00:00
Ben Konyi ea48265725 Reland "[ VM / Service ] Omit private fields from service responses by default"
Adds better error handling in DDS to prevent google3 breakages due to
Flutter binary update lag times.

This reverts commit 28e958febb.

TEST=N/A

Change-Id: Ida454f0ef3caeedd1b0326c37fef58d4b73557d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227620
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-01-11 23:35:28 +00:00
Ivan Inozemtsev 28e958febb Revert "Reland "[ VM / Service ] Omit private fields from service responses by default""
This reverts commit 91a496e5db.

Reason for revert: breaks hot reloads internally

Original change's description:
> Reland "[ VM / Service ] Omit private fields from service responses by default"
>
> This reverts commit 7d39d2dd51.
>
> TEST=N/A
>
> Change-Id: I2119c841719c77be5380857ce209532ed036bd0e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226322
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: I6e751343244a4788a1f080ea1aef5fdd18417109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227503
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2022-01-11 14:06:04 +00:00
Ben Konyi 4475267f70 [ VM / Service ] Add --log_service_response_sizes=<log.csv> debug option
Providing `--log_service_response_sizes` will cause the VM to log VM service
response sizes to the provided file in CSV format.

Also added `--service_response_sizes_directory` to the service test
runner to allow for collecting response size data for the entire service
test suite.

TEST=Local

Change-Id: I7aaf4ba936e2593e67d46ff9052e2130374ef461
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226805
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-07 21:22:56 +00:00
Ben Konyi 91a496e5db Reland "[ VM / Service ] Omit private fields from service responses by default"
This reverts commit 7d39d2dd51.

TEST=N/A

Change-Id: I2119c841719c77be5380857ce209532ed036bd0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226322
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-06 18:05:36 +00:00
Ben Konyi 0c071662a7 [ VM / Service ] Add support for streaming CPU samples with specific
user tags

TEST=cpu_sample_streaming_test.dart

Change-Id: Ia983217ae2a5da8c3252fafbed8197b4f4a20e2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224040
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-17 00:15:09 +00:00
Ben Konyi e3867c0512 [ Gardening ] Mark service tests as Slow for IA32 configurations
Fixes https://github.com/dart-lang/sdk/issues/47920

Fixed: 47920

TEST=N/A

Change-Id: I4cd05e0aaf8b257ecae2ee521b47b0028dd3c553
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224081
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-12-15 00:04:30 +00:00
Ryan Macnak 08fc11c44c Revert "[vm] Emit timeline events around virtual memory allocation / deallocation."
This reverts commit ab0d8dc3b1.

Reason for revert: Speculating this is the cause for hangs in Flutter's `test/integration.shard/timeline_test.dart: Can connect to the timeline without getting ANR from the application`.

Original change's description:
> [vm] Emit timeline events around virtual memory allocation / deallocation.
>
> TEST=ci
> Change-Id: I0b29e2e6f7f530e29af0962f1243d708a1ca2225
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220804
> Reviewed-by: Dan Field <dnfield@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

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

Change-Id: Ia8af447babd7291df4be746e8b8010242cbccc63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221861
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-12-01 23:21:46 +00:00
Ryan Macnak ab0d8dc3b1 [vm] Emit timeline events around virtual memory allocation / deallocation.
TEST=ci
Change-Id: I0b29e2e6f7f530e29af0962f1243d708a1ca2225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220804
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-11-29 23:06:34 +00:00
Michal Terepeta 7d39d2dd51 Revert "[ VM / Service ] Omit private fields from service responses by default"
This reverts commit 75abd86407.

Reason for revert: Breaks internal tests (http://b/207612278)

Original change's description:
> [ VM / Service ] Omit private fields from service responses by default
>
> Service responses and events previously could include "private"
> properties, which have names starting with "_". This change removes
> these properties from service objects unless explicitly requested via a
> private parameter.
>
> See go/smaller-dart-vm-service-responses for response size reduction
> data.
>
> TEST=Existing service suite
>
> Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I0b015baadfcdf4211426efa9a92804b163f88649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221280
Reviewed-by: Michal Terepeta <michalt@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-11-25 10:28:33 +00:00
Ben Konyi 75abd86407 [ VM / Service ] Omit private fields from service responses by default
Service responses and events previously could include "private"
properties, which have names starting with "_". This change removes
these properties from service objects unless explicitly requested via a
private parameter.

See go/smaller-dart-vm-service-responses for response size reduction
data.

TEST=Existing service suite

Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-11-24 00:34:31 +00:00
Ben Konyi 46f9ae9568 [ VM / Service ] Stream light-weight version of CpuSamples for CPU
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>
2021-11-18 19:45:26 +00:00
Ben Konyi 0cad0e7224 Reland "[ VM / Service ] Add setIsolatePauseMode RPC"
This reverts commit 6ae9f31081.

TEST=N/A

Change-Id: I98dcee3002f9f0882b1bbd5ad461d28ba2c874f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220485
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-11-17 16:17:24 +00:00
Ben Konyi 6ae9f31081 Revert "Reland "[ VM / Service ] Add setIsolatePauseMode RPC""
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>
2021-11-13 00:01:53 +00:00
Ben Konyi 5de4830a4e 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>
2021-11-12 23:24:08 +00:00
Siva Annamalai d21897b88d 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>
2021-11-11 23:32:42 +00:00
Ben Konyi cad8a34d83 [ 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>
2021-11-11 20:05:51 +00:00
Martin Kustermann 96d40d1caa [vm/concurrency] Remove --(no-)enable-isolate-groups flag usage in tests
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>
2021-11-04 18:57:21 +00:00
Vyacheslav Egorov feadec2dc6 [vm] Unskip coverage_closure_call_test in JIT
This test should only be skipped in AOT mode just like other
similar tests.

Create observatory_2 version of the test.

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

TEST=ci

Fixed: 47568
Change-Id: I64285d2347fe4c6cd76062a7a8d401f088082db7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218641
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-10-29 10:53:29 +00:00
Ben Konyi a9752ad140 [ Gardening ] Skip coverage_closure_call_test
Causing various timeouts and infra failures.

Related issue: https://github.com/dart-lang/sdk/issues/47568

TEST=N/A

Change-Id: Ifbe6760faf3029a021aee557f676b08c1779c577
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218560
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-10-28 21:00:27 +00:00
Ben Konyi 7d3d835bc9 Reland "[ VM / Service ] Add lookupResolvedPackageUri and lookupPackageUri RPCs"
This reverts commit 711fdcc0de.

TEST=uri_mappings_lookup_test.dart

Change-Id: I0a548ef0b5f1f0f6bc23ec72e0fe7dafc244c5d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218520
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-10-28 17:16:49 +00:00