Commit graph

49 commits

Author SHA1 Message Date
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
asiva ac520f984d [ VM / CLI ] Add --verbosity to VM options
The verbosity option allows for specifying the CFE output verbosity

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

TEST=existing tests compile_test.dart and run_test.dart have new tests

Change-Id: I3d4e50811f84650aacf774ddb370a6eb765b9b24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181100
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-01-26 03:01:58 +00:00
Sigurd Meldgaard f3fe9dc3b3 Reland "Improve handling of disable-dartdev-analytics"
This is a reland of 58860f4814

Original change's description:
> Improve handling of disable-dartdev-analytics
>
> This is second try of https://dart-review.googlesource.com/c/sdk/+/171284
> that was reverted to to faulty logic in main_options.
>
> Some other refactorings are piggy-backed along.
>
> TestProject.runSync no longer takes a 'command' argument. It was anyway
> often not an argument.
>
> Also stop the messy handling of pub arguments. It is no longer needed.
>
> BUG: https://github.com/dart-lang/sdk/issues/44135
> Change-Id: I49abf5810d9ea262409ba9d93f0471037cb8a753
> TEST=The VM change is tested via all the pkg/dartdev/test/command/* tests that invoke dart with the --no-analytics flag.
> TEST=Furthermore manual test that the --no-analytics flag is passed to dartdev.
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174261
> Reviewed-by: Jonas Jensen <jonasfj@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

Change-Id: I725662f578d061f87171ceffe9aff3de83688f58
TEST=Furthermore run the vm-kernel-precomp-obfuscate-linux-release-x64-try trybot
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174473
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-12-04 14:22:10 +00:00
Sigurd Meldgaard 97baa6efd1 Revert "Improve handling of disable-dartdev-analytics"
This reverts commit 58860f4814.

Reason for revert: Broke bots. Will investigate.

Original change's description:
> Improve handling of disable-dartdev-analytics
>
> This is second try of https://dart-review.googlesource.com/c/sdk/+/171284
> that was reverted to to faulty logic in main_options.
>
> Some other refactorings are piggy-backed along.
>
> TestProject.runSync no longer takes a 'command' argument. It was anyway
> often not an argument.
>
> Also stop the messy handling of pub arguments. It is no longer needed.
>
> BUG: https://github.com/dart-lang/sdk/issues/44135
> Change-Id: I49abf5810d9ea262409ba9d93f0471037cb8a753
> TEST=The VM change is tested via all the pkg/dartdev/test/command/* tests that invoke dart with the --no-analytics flag.
> TEST=Furthermore manual test that the --no-analytics flag is passed to dartdev.
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174261
> Reviewed-by: Jonas Jensen <jonasfj@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

TBR=bkonyi@google.com,sigurdm@google.com,jonasfj@google.com

Change-Id: I754bcebdcfc595158b04d431662b65bf25f5b89d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174466
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-12-01 13:11:16 +00:00
Sigurd Meldgaard 58860f4814 Improve handling of disable-dartdev-analytics
This is second try of https://dart-review.googlesource.com/c/sdk/+/171284
that was reverted to to faulty logic in main_options.

Some other refactorings are piggy-backed along.

TestProject.runSync no longer takes a 'command' argument. It was anyway
often not an argument.

Also stop the messy handling of pub arguments. It is no longer needed.

BUG: https://github.com/dart-lang/sdk/issues/44135
Change-Id: I49abf5810d9ea262409ba9d93f0471037cb8a753
TEST=The VM change is tested via all the pkg/dartdev/test/command/* tests that invoke dart with the --no-analytics flag.
TEST=Furthermore manual test that the --no-analytics flag is passed to dartdev.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174261
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-12-01 10:25:55 +00:00
Ben Konyi 267db1871c [ VM ] Fix memory leak in main_options.cc
Caused by changes in ffc36db613 which
removed memory cleanup.

TEST=Existing tests surface the problem with ASAN enabled.

Change-Id: I4880a459e5421c754574778ad097984f2e47d885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-11-04 22:33:27 +00:00
Alexander Aprelev 340f78eab3 [vm/io] Add a test for nonblocking ssl certification evaluation.
This is follow-up to a6dafabb88.

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

Change-Id: I4da732ab08235a1f549d45c7fa5fb87db672e2aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166701
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-10-12 15:06:52 +00:00
Ryan Macnak 30897929fc [vm] Fix warnings in GCC 9.3.0 and XCode 12.0.
Bug: https://github.com/flutter/flutter/issues/66203
Change-Id: Ifff0c211e2ecdcb56d62c273a471fc05bbae9c37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161602
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-09-21 22:02:32 +00:00
Ben Konyi f0d88cc96d Reland "[ Service / DDS ] Advertise DDS as the VM service, bump version to 4.0"
This reverts commit ed120c3c80.

Change-Id: I445f4bb2dafaad3ce2daa3ae42efe1723f9b1abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160660
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-03 15:20:14 +00:00
Liam Appelbe 79cec0e864 [vm] Delete ABI infrastructure
Change-Id: I26d455d96c87010293a6dcb9f6c0eecfcaf3c816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157102
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-06 19:55:12 +00:00
Ben Konyi 501c807266 [ VM / DartDev ] Update argument handling for 'run' command
Previously the help messages for 'dart run' were output by a secondary
VM spawned solely to print the VM's help message. However, this help
message was not consistent with those found for other DartDev commands.

With this change, the 'run' command:

- Uses package:args to create a help message consistent with other
 DartDev commands.

- No longer accepts arbitrary options and is instead restricted to a
 subset of common flags. Passing a VM flag which is not included in
 this subset of commands will result in an argument error if passed
 *after* the 'run' command. Other VM flags can be passed immediately
 following 'dart' and before the DartDev command.

- No longer outputs the VM verbose options when invoked with '--help
 --verbose'. VM verbose options and the original VM help message can
 be viewed by running 'dart --help --verbose'. This makes uncommon
 VM flags used for development less visible to regular users.

- Now properly forwards the subset of VM options accepted by 'run' to
 the VM (e.g., 'dart run --observe --no-pause-isolates-on-exit foo.dart'
 would have ignored '--no-pause-isolates-on-exit').

Change-Id: Ie56b767cc21e6af3630c742458a6c3e9f7418250
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155841
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-31 21:41:10 +00:00
Ben Konyi 95d55e2bbb Revert "[ VM / DartDev ] Disable DartDev by default, allow for enabling via --enable-dart-dev"
This reverts commit f6a82443e4.

Change-Id: Icd2050126f6e7442ac3e99219548c93196933861
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154829
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-20 18:17:28 +00:00
Ben Konyi f6a82443e4 [ VM / DartDev ] Disable DartDev by default, allow for enabling via
--enable-dart-dev

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

Change-Id: I107ff86a65c20317d8813769bdf78b92bb6cb145
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154822
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-07-17 20:21:59 +00:00
Martin Kustermann 39577ea564 [vm] Remove (unused & deprecated) --package-root parameter from VM binaries and from tests (Platform.packageRoot always returns null)
Closes https://github.com/dart-lang/sdk/issues/41245

Change-Id: Idd7526199b4c2479297c58b05bc13efcb79d01e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152321
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-24 18:17:53 +00:00
Ben Konyi 82de6e0854 [ VM / DartDev ] Forward --enable-experiment=... to DartDev
VM portion of https://github.com/dart-lang/sdk/issues/42339

Change-Id: I97fa7ec0847aa4ed75fc5aaab2d75c1ca514aa66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151890
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-23 17:49:02 +00:00
Ben Konyi 444490d640 Reland "[ VM / DartDev ] Run all debugging sessions via 'dart run'"
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>
2020-05-13 19:58:56 +00:00
David Morgan 964f966c0c Revert "[ VM / DartDev ] Run all debugging sessions via 'dart run'"
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>
2020-05-13 07:13:35 +00:00
Ben Konyi 604a366065 [ 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>
2020-05-12 19:53:11 +00:00
Ben Konyi c800b26816 [ VM / DartDev ] Make DartDev help message the default when running dart --help
Running the standalone VM in the following ways will result in the
DartDev help message being shown:

- `dart`
- `dart --help`

The following will output the VM help message:

- `dart run`
- `dart help run`
- `dart --help --verbose` (includes verbose VM flags)
- `dart help run --verbose` (includes verbose VM flags)
- `dart run --verbose` (includes verbose VM flags)

The original standalone VM behavior can be restored by providing the --disable_dart_dev flag.

Change-Id: I67cf015d62366efdfd8bf9b215d4319fd5af3f46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144497
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-04-27 22:39:06 +00:00
jonahwilliams 96ff3276f4 [vmservice] allow fallback on port bind failure
Work towards https://github.com/flutter/flutter/issues/46724

Background:

on the latest versions of iOS today, we have to use mdns to discover the observatory port and authentication code. For a variety of reasons this can fail, leaving us with no way to connect.

An alternative approach is to specify the observatory port and disable the authentication code. If binding to this port fails, however, we would still like to attempt connecting with mdns.

Overview:

This adds a new flag to the dart SDK, --enable-service-port-fallback. This amends the behavior of the vmservice with a specified port. After failing to bind 3 times to a non-zero port, update the port selection to 0.

Results:

Tested locally two dart VMs with the same specified port:

```
jonahwilliams@jonahwilliams0:~/Documents/engine/src/out/host_debug_unopt$ ./dart --enable-service-port-fallback --observe=8080 example.dart
Observatory server failed to start after 1 tries
Falling back to automatic port selection

vm-service: isolate(2785434094928835)  'main' has no debugger attached and is paused at exit.  Connect to Observatory to debug.
Observatory listening on http://127.0.0.1:45663/62A5IHjmv9E=/
```
Change-Id: I582ab402a457330928e5b490f9718fcd52b56720
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133434
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2020-01-28 23:36:14 +00:00
Jonah Williams cdeb9a7a8c Revert "[vmservice] allow fallback on port bind failure"
This reverts commit 6ff7e9ebad.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [vmservice] allow fallback on port bind failure
> 
> Work towards https://github.com/flutter/flutter/issues/46724
> 
> Background:
> 
> on the latest versions of iOS today, we have to use mdns to discover the observatory port and authentication code. For a variety of reasons this can fail, leaving us with no way to connect.
> 
> An alternative approach is to specify the observatory port and disable the authentication code. If binding to this port fails, however, we would still like to attempt connecting with mdns.
> 
> Overview:
> 
> This adds a new flag to the dart SDK, --enable-service-port-fallback. This amends the behavior of the vmservice with a specified port. After failing to bind once to a non-zero port, update the port selection to 0.
> 
> Results:
> 
> Tested locally two dart VMs with the same specified port:
> 
> ```
> jonahwilliams@jonahwilliams0:~/Documents/engine/src/out/host_debug_unopt$ ./dart --enable-service-port-fallback --observe=8080 example.dart
> Observatory server failed to start after 1 tries
> Falling back to automatic port selection
> vm-service: isolate(2785434094928835)  'main' has no debugger attached and is paused at exit.  Connect to Observatory to debug.
> Observatory listening on http://127.0.0.1:45663/62A5IHjmv9E=/
> ```
> 
> Change-Id: I371583edcb603325428f1cb760992e39b9f3b6dc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130441
> Commit-Queue: Jonah Williams <jonahwilliams@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Change-Id: I337b2d549e33ef9c616c276a48ce894a14b1c317
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133327
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2020-01-24 21:47:34 +00:00
jonahwilliams 6ff7e9ebad [vmservice] allow fallback on port bind failure
Work towards https://github.com/flutter/flutter/issues/46724

Background:

on the latest versions of iOS today, we have to use mdns to discover the observatory port and authentication code. For a variety of reasons this can fail, leaving us with no way to connect.

An alternative approach is to specify the observatory port and disable the authentication code. If binding to this port fails, however, we would still like to attempt connecting with mdns.

Overview:

This adds a new flag to the dart SDK, --enable-service-port-fallback. This amends the behavior of the vmservice with a specified port. After failing to bind once to a non-zero port, update the port selection to 0.

Results:

Tested locally two dart VMs with the same specified port:

```
jonahwilliams@jonahwilliams0:~/Documents/engine/src/out/host_debug_unopt$ ./dart --enable-service-port-fallback --observe=8080 example.dart
Observatory server failed to start after 1 tries
Falling back to automatic port selection
vm-service: isolate(2785434094928835)  'main' has no debugger attached and is paused at exit.  Connect to Observatory to debug.
Observatory listening on http://127.0.0.1:45663/62A5IHjmv9E=/
```

Change-Id: I371583edcb603325428f1cb760992e39b9f3b6dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130441
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-01-24 20:28:15 +00:00
Samir Jindel a846098c18 [vm] Enable ELF loader to read snapshots from memory without any backing file.
Also build Dart_LoadELF_Fd on Linux as well to get minimal coverage for Fuchsia.

Change-Id: I4be3eeae3e4559e95413fd60a26b9e6d2edabb32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127644
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-12-10 12:26:05 +00:00
Samir Jindel 43329adf84 [vm/aot] Remove uses of blobs from tests and scripts.
Change-Id: I03ccdba1f45ddb1b6774557d55b8fd47f87c7dd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121842
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-07 14:06:07 +00:00
Ben Konyi 0a5d6a5263 [ VM / Service ] Add --write-service-info=<filename> flag to allow for writing VM service connection information to a file
Fixes https://github.com/dart-lang/sdk/issues/38418

Change-Id: I6dfaa4c510d571a5b4efd7c4b6d1933fc1f46c81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117581
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-17 20:34:12 +00:00
Ben Konyi cf4444b803 Revert "[ VM / Service ] Temporarily disable VM service auth codes by default"
This reverts commit 98fc8ac7ff.

Change-Id: I4f9c1da8f216039017d954931d141fd267d71508
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99761
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-18 21:21:18 +00:00
Ben Konyi 98fc8ac7ff [ VM / Service ] Temporarily disable VM service auth codes by default
Change-Id: Ia14e7d4eeb680a02482f700ce06f76bc0edab594
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99187
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-11 21:27:12 +00:00
Ben Konyi 15b11b0183 [ VM / Service / Observatory ] The VM service now requires an authentication code by default.
Previously, a valid web socket connection would use the following URI:

`ws://127.0.0.1/ws`

Now, by default, the VM service requires a connection to be made with a
URI similar to the following:

`ws://127.0.0.1:8181/Ug_U0QVsqFs=/ws`

where `Ug_U0QVsqFs` is an authentication code generated and shared by the
service.

This behavior can be disabled with the `--disable-service-auth-codes`
flag.

Change-Id: I288aac58e3ba9d35dca8071f3f7e7a073896c271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98433
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-09 22:57:29 +00:00
Liam Appelbe 5a5b58db7e Reland "[vm] Allow running with the latest ABI dill files."
This reverts commit 69ff056b51.

Reason for revert: Relanding with fix.

Original change's description:
> Revert "[vm] Allow running with the latest ABI dill files."
>
> This reverts commit 35c4af445b.
>
> Reason for revert: Broke a bunch of tests, eg:
> https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917088905682853152/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0
>
> Original change's description:
> > [vm] Allow running with the latest ABI dill files.
> >
> > To support this, we need to download the current version during gclient
> > sync, and change the way the --use-abi-version flag is processed so that
> > there's a distinction between the current version and the flag being
> > unset (-1). Also bump the oldest supported ABI version.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/36047
> > Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
> > Commit-Queue: Liam Appelbe <liama@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
>
> TBR=asiva@google.com,liama@google.com
>
> Change-Id: I40f83fcc7f9d785353fb05d4296376ec04af8309
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98700
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I909fd649eb41911a7b15e682b669708ebe083c8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98690
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2019-04-04 22:45:25 +00:00
Liam Appelbe 69ff056b51 Revert "[vm] Allow running with the latest ABI dill files."
This reverts commit 35c4af445b.

Reason for revert: Broke a bunch of tests, eg:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917088905682853152/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0

Original change's description:
> [vm] Allow running with the latest ABI dill files.
> 
> To support this, we need to download the current version during gclient
> sync, and change the way the --use-abi-version flag is processed so that
> there's a distinction between the current version and the flag being
> unset (-1). Also bump the oldest supported ABI version.
> 
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I40f83fcc7f9d785353fb05d4296376ec04af8309
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98700
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 18:12:18 +00:00
Liam Appelbe 35c4af445b [vm] Allow running with the latest ABI dill files.
To support this, we need to download the current version during gclient
sync, and change the way the --use-abi-version flag is processed so that
there's a distinction between the current version and the flag being
unset (-1). Also bump the oldest supported ABI version.

Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-04 16:55:03 +00:00
Liam Appelbe 724d956fd4 Move use_abi_version from vm directory to bin
I need to access the flag in bin/main.cc, so it can't be in the vm directory

Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ib19a1b4d89295449b25f7753b2a39f6232c004e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97122
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-15 22:35:25 +00:00
Ryan Macnak 580e5731d6 [vm] Test compilation traces, type feedback, reused instructions.
Improve error for failure to reuse instructions.

Change-Id: I38b30a0da508f686d73dffebbf5893d6c939f19a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95940
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-03-13 23:36:06 +00:00
Ryan Macnak 8da53e3120 [vm] Add Dart_SaveTypeFeedback and Dart_LoadTypeFeedback.
Change-Id: I8c20271b20638972b28299f0488e7f3dd37f8797
Reviewed-on: https://dart-review.googlesource.com/c/88604
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-01-10 01:04:11 +00:00
Vyacheslav Egorov 040ef6aabb [gardening] Lower core rlimit to 0 if test is expected to crash.
We do not archive core dumps generated by tests that are expected
to crash - so there is no need to generate those dumps.

It seems that generating core dumps is very slow on Mac and causes
timeouts.

Fixes #35275

Remove Timeout expectations from Crashing tests

Change-Id: I36c89fd583a6a94521560544163f02414cbbf41a
Reviewed-on: https://dart-review.googlesource.com/c/85680
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-11-30 11:15:06 +00:00
Ryan Macnak 235a918233 [vm] Remove Dart_LoadScript, Dart_LoadLibrary, Dart_LoadSource, etc.
Change-Id: I9c19625702f1df48c03de2eb3a0f7bb581d2e0b3
Reviewed-on: https://dart-review.googlesource.com/c/79140
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-11 00:38:37 +00:00
Ryan Macnak cc28d2caaa [standalone] Remove code for --snapshot-kind=app-aot from main.cc.
This code was only used for dart_bootstrap, which has been removed.

Change-Id: I62f26a97058569724fdb2eb7344132a9e23b4207
Reviewed-on: https://dart-review.googlesource.com/c/78147
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-10-05 00:36:53 +00:00
Ryan Macnak 2f25dcda16 [vm] Remove script snapshots.
Change-Id: I5bc692b754c0909de4aa5f05af81b074578b16f4
Reviewed-on: https://dart-review.googlesource.com/76706
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-26 22:49:27 +00:00
asiva 355c73d4ee [VM] Remove support for option --no-preview-dart-2
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2

Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-09-24 20:38:08 +00:00
asiva cd3ddede99 Move flags strong/sync-async/reify-generic-functions back to global vm flags (they are not set as isolate specific flags).
Change-Id: I4d5cba4f5ac657a0834e3755312147cff1fbc001
Reviewed-on: https://dart-review.googlesource.com/71426
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-09-07 21:22:13 +00:00
Zach Anderson 27c79f9459 [vm] Propagate more UTF8 conversion errors
Change-Id: I8d4f3a892a51bed8b922961bd74bcad727f66508
Reviewed-on: https://dart-review.googlesource.com/73280
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-09-06 02:23:21 +00:00
Zach Anderson 00e3109368 [VM] Adjust flags for creating depfiles
Currently, the VM can create depfiles when writing out a snapshot.
The snapshot file is the output file for the depfile. This change
allows creating a depfile when not writing out a snapshot. It
accomplishes this by adding a new flag --depfile_output_filename,
which allows the user to supply the output filename for the depfile,
which would otherwise be ambiguous when we are not creating a snapshot.

This change also adds the flag --depfile, which
--snapshot_depfile is now an alias of.

related #34026

Change-Id: I45eee463c499fc542e577d805b7ef9911ccb72a7
Reviewed-on: https://dart-review.googlesource.com/67420
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-07-31 17:09:31 +00:00
asiva 544358304d [VM]
- Add --preview-dart-2 option back as a nop
- Temporarily treat --checked as an alias for --enable-asserts in Dart2
  mode so that google3 test scripts don't need to change.

Change-Id: I3a7d9f9e73d86bc8db247dfcb4e84440258949f6
Reviewed-on: https://dart-review.googlesource.com/62445
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-06-27 17:33:50 +00:00
asiva bc7220a4fd [VM] Turn dart2 on by default on the command line VM
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations

Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-18 22:31:32 +00:00
asiva 4b1180a39d [VM] When --preview-dart-2 option is specified make the options
'--snapshot_kind=script --snapshot=xyz'
produce a kernel dill file which is the equivalent of a script
snapshot in Dart2 world.

Change-Id: I7ba66eb86d9ecdfe1426b8b22b8d673598c4b71f
Reviewed-on: https://dart-review.googlesource.com/52740
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-02 23:19:47 +00:00
Ryan Macnak 0cc70c4a7c [vm] Support for sharing parts of an app snapshot.
In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.

Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.

Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-27 17:42:16 +00:00
Ryan Macnak 3b7199fe63 [standalone] Only allow one outstanding load when running with --deterministic.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I3349d6cc1779ef4470262e65dff7410397cb12de
Reviewed-on: https://dart-review.googlesource.com/51161
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-16 18:31:28 +00:00
Ryan Macnak 340995ec5d Remove unused Dart_SaveJITFeedback.
Change-Id: I6b4ce6b8f18ff2788b22873044572b2a81b7b7ef
Reviewed-on: https://dart-review.googlesource.com/30624
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-10 01:29:39 +00:00
Zachary Anderson d7845c6a6f [standalone] Clean up command line argument parsing
fixes #30534

Change-Id: I5e721e5d24de32f0cb85f7bd96890913cf788f81
Reviewed-on: https://dart-review.googlesource.com/4608
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-09-11 18:58:39 +00:00