Commit Graph

537 Commits

Author SHA1 Message Date
Ryan Macnak 3ad32e4287 [vm] Revert 1db1ac4863.
This feature was for Goma work that has been marked obsolete.

Bug: FL-48
Change-Id: I9997f8aefbe1d55f86cff2ab377166a0bce1ed53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101925
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-08 23:52:29 +00:00
Ryan Macnak 971f4845d7 [build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations.
Change some static_libraries to source_sets to make ODR violations link-time errors.

This is needed to enable (stop suppressing) -fvisibility=hidden in Fuchsia product builds.

Change-Id: I699cec8d4b516beab9cebf9db0a522a7ff99e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99822
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-22 20:15:43 +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
Ryan Macnak 9d376de55a [vm] Remove code collection.
Code collection interacts badly with
 - warming up compiled code
 - retaining pre-compiled code
 - code coverage
 - hot reload (deopting to an old version of a function)

Change-Id: Id269a6c3281e577d4f600f0c158af9e62f6b49ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99722
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-18 20:12:09 +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 fd9e32df56 Reland "Spawn isolates using platform kernel when using old ABIs"
This reverts commit 2a8117c341.

Reason for revert: I think it was actually https://dart-review.googlesource.com/c/sdk/+/98609 that caused the breakage

Original change's description:
> Revert "Spawn isolates using platform kernel when using old ABIs"
> 
> This reverts commit c3113b0818.
> 
> Reason for revert: Broke some tests, eg https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917089062837512336/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0
> 
> Original change's description:
> > Spawn isolates using platform kernel when using old ABIs
> > 
> > Bug: https://github.com/dart-lang/sdk/issues/36047
> > Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Commit-Queue: Liam Appelbe <liama@google.com>
> 
> TBR=asiva@google.com,liama@google.com
> 
> Change-Id: I33a714add2858752015dec38b8d973347a3ba79a
> 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/+/98684
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I8ce6b050f0c3aeb7ac4f15b83bbec0b3b0e909bd
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/+/98688
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 19:15:35 +00:00
Liam Appelbe 2a8117c341 Revert "Spawn isolates using platform kernel when using old ABIs"
This reverts commit c3113b0818.

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

Original change's description:
> Spawn isolates using platform kernel when using old ABIs
> 
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I33a714add2858752015dec38b8d973347a3ba79a
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/+/98684
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 17:47:26 +00:00
Liam Appelbe c3113b0818 Spawn isolates using platform kernel when using old ABIs
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 16:56:23 +00:00
Ben Konyi ac2c934563 Reland "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 638f13ff3d.

Change-Id: Ib5015539b1c93791c2469be6995789f8f0362806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97845
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-28 16:39:50 +00:00
Liam Appelbe c614b99ae1 [vm] Load kernel service from ABI versioned dill file
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: I7122e8f0c8841be462e0fa0b28a75ef693d85d20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97260
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-22 16:14:16 +00:00
Daco Harkes 638f13ff3d Revert "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 59525264e8.

Reason for revert: causes Flutter test observatory and protocol to deadlock.
Issue: https://github.com/dart-lang/sdk/issues/36232

Original change's description:
> [ VM / dart:isolate ] Added ability to set names for spawned isolates.
> 
> Fixes issue #34059
> 
> Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I5f2115a2ac394a8d4c7c175bc97f2b88b65fcb49
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97107
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-03-15 14:40:37 +00:00
Ben Konyi 59525264e8 [ VM / dart:isolate ] Added ability to set names for spawned isolates.
Fixes issue #34059

Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-14 22:23:09 +00:00
Ryan Macnak f7a36792b2 [vm] Fix memory leaks in --load_compilation_trace and --load_type_feedback.
Bug: https://github.com/dart-lang/sdk/issues/36208
Change-Id: I08142c1840a57fcd1023e7cd8bb26ab4039cfa9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96963
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-03-14 19:26:13 +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 d253642f25 [standalone] Fix isolate messages for processes that a creating an AppJIT snapshot.
The standalone embedder was sorting classes in the main isolate, but not child isolates, causing the CIDs to diverge.

Also fix a few isolate tests.

Bug: https://github.com/dart-lang/sdk/issues/33128
Bug: https://github.com/dart-lang/sdk/issues/36000
Change-Id: Ic21acb02eb623ae177ed242aa21b0e243775e369
Reviewed-on: https://dart-review.googlesource.com/c/93923
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-21 22:39:39 +00:00
Samir Jindel 4b28312282 [vm] Remove reference to vm/flag_list.h in runtime/bin/main.cc.
Change-Id: I3a18487a0ef7ed9d50d54f539b9a815eb334c6b9
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/91923
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-02-05 03:54:41 +00:00
Alexander Markov e64428a839 Revert "[vm] Cleanup Dart_Get/Set/HasStickyError API and use isolate's sticky error only as a backup for thread's sticky error"
This reverts commit b10f179608.

Reason for revert: failed service/* tests

Original change's description:
> [vm] Cleanup Dart_Get/Set/HasStickyError API and use isolate's sticky error only as a backup for thread's sticky error
> 
> Both thread and isolate have sticky error fields. Dart API was using
> isolate's sticky error, while Dart code was using thread's sticky error.
> There was a one-way move of a thread's sticky error into isolate
> when thread was unscheduled.
> 
> This causes a problem as error in the isolate may go unnoticed and
> repeated unscheduling/re-scheduling might end up overwriting the error
> in the isolate (which triggers the assertion).
> 
> To solve this problem, this CL:
> * Cleans up Dart API which manipulates isolate's sticky error, so
>   isolate's sticky error is never set directly.
> * When sceduling an isolate to a thread, sticky error is moved back from
>   isolate (if any).
> 
> With this changes, thread's sticky error is always used if thread is running,
> and isolate's sticky error is only used to hold sticky error while
> isolate has no thread.
> 
> Fixes https://github.com/dart-lang/sdk/issues/35590
> 
> Change-Id: I99b128cac363ca2df75f6e64c083b1ec36c866ce
> Reviewed-on: https://dart-review.googlesource.com/c/89442
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,zra@google.com,asiva@google.com

Change-Id: I15874575b6b8ddca618741c59c21d4e692c4dcab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/90127
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-01-18 01:41:18 +00:00
Alexander Markov b10f179608 [vm] Cleanup Dart_Get/Set/HasStickyError API and use isolate's sticky error only as a backup for thread's sticky error
Both thread and isolate have sticky error fields. Dart API was using
isolate's sticky error, while Dart code was using thread's sticky error.
There was a one-way move of a thread's sticky error into isolate
when thread was unscheduled.

This causes a problem as error in the isolate may go unnoticed and
repeated unscheduling/re-scheduling might end up overwriting the error
in the isolate (which triggers the assertion).

To solve this problem, this CL:
* Cleans up Dart API which manipulates isolate's sticky error, so
  isolate's sticky error is never set directly.
* When sceduling an isolate to a thread, sticky error is moved back from
  isolate (if any).

With this changes, thread's sticky error is always used if thread is running,
and isolate's sticky error is only used to hold sticky error while
isolate has no thread.

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

Change-Id: I99b128cac363ca2df75f6e64c083b1ec36c866ce
Reviewed-on: https://dart-review.googlesource.com/c/89442
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-01-17 23:27:13 +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
Alexander Aprelev 7d14785115 This relands "Load isolate from parent's kernel in Isolate.spawn calls.".
Original PR was reverted because it broke hot-reload bots. This CL adds steps to initialize kernel_service compiler for child isolate. Compiler is needed to support hot-reload request. Child isolate's compiler is created from full kernel file produced by main isolate's compiler. Changes since original PR are pkg/vm/bin/kernel_service.dart in pkg/vm/lib/incremental_compiler.dart.

Further this CL changes kernel fingerprint calculation for interface types so it calculates the hash of the canonical names themselves, rather than indices(that might change from one compilation to another).

This reverts commit 63fd8f63e6.

Change-Id: I6fe5b2ef99f209b32cd4087dfd1c8cac229c2d8b
Reviewed-on: https://dart-review.googlesource.com/c/87265
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2018-12-14 23:45:57 +00:00
Liam Appelbe 63fd8f63e6 Revert "Load isolate from parent's kernel in Isolate.spawn calls."
This reverts commit e143a52531.

Reason for revert: Broke all the reload-kernel bots.

Original change's description:
> Load isolate from parent's kernel in Isolate.spawn calls.
> 
> Bug: https://github.com/dart-lang/sdk/issues/6610
> Change-Id: Icd6e1c5d6d4b64b611fc58333c051a8a9a50679d
> Reviewed-on: https://dart-review.googlesource.com/c/85724
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: Ie9c305256da9b6478153b99502d0c63b0f43a3e6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/6610
Reviewed-on: https://dart-review.googlesource.com/c/86082
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2018-12-04 20:26:24 +00:00
Liam Appelbe e143a52531 Load isolate from parent's kernel in Isolate.spawn calls.
Bug: https://github.com/dart-lang/sdk/issues/6610
Change-Id: Icd6e1c5d6d4b64b611fc58333c051a8a9a50679d
Reviewed-on: https://dart-review.googlesource.com/c/85724
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-12-04 18:02:55 +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
Vyacheslav Egorov f185012d20 [gardening] Integrate Crashpad with run_vm_tests.
Change-Id: Ia18b5e22cefe1fb4dfa8d8ed9361789304eb8acc
Reviewed-on: https://dart-review.googlesource.com/c/81826
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-10-29 15:11:16 +00:00
Vyacheslav Egorov dbd413e07c [testing] Update couple of tests to avoid issues with deleting temp dir.
Avoid starting Crashpad handler for subprocesses in these tests.

Change-Id: Icdd2295441c266d49a72dd707126f4bb23682527
Reviewed-on: https://dart-review.googlesource.com/c/81604
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-10-26 11:59:28 +00:00
Vyacheslav Egorov 9d58cae979 [vm] Prevent Crashpad handler from inheriting stdout/stderr.
Change-Id: I8ad809729e164fc05a0912a459772f10255aaefe
Reviewed-on: https://dart-review.googlesource.com/c/81416
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-10-25 17:03:53 +00:00
Vyacheslav Egorov 2c83eb550e [vm] Integrate dart binary with Crashpad on Windows.
dart binary would instantiate CrashpadClient if DART_CRASHPAD_HANDLER
and DART_CRASHPAD_CRASHES_DIR environment variables are set.

- DART_CRASHPAD_HANDLER should contain the path to the crashpad_handler
binary that would handle the crash and write minidump;
- DART_CRASHPAD_CRASHES_DIR should contain the path to the crashpad database
which would be used to store minidumps.

Rewrite --copy-crash-dumps support on windows to use Crashpad integration
instead of editing Windows registry.

Embedding crashpad required to roll a new zlib version because Crashpad
depends on the zlib. This version of zlib is buildable with its own
BUILD.gn so our custom BUILD.gn is removed.

Change-Id: I048aad16b234e1d750f0a24782b04e3b6e19703d
Reviewed-on: https://dart-review.googlesource.com/c/81007
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-10-24 13:30:16 +00:00
Alexander Markov 74792f4b9c Revert "[vm] Revert service isolate setup in main.cc"
This reverts commit 0eb5dbffac.

Reason for revert: the root cause of crashes is fixed, so
there is no need in the workaround anymore.

Change-Id: Ifc3b5027193c2d5db4a43f451996607b9558fe78
Reviewed-on: https://dart-review.googlesource.com/c/80540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-22 20:51:48 +00:00
Alexander Aprelev a53172cd47 [vm] Print isolate sticky_error during shutdown to let user know of unhandled exceptions.
Given
```
import 'dart:isolate';
import 'dart:async';

void func(_) {
  throw new Exception('bad news');
}

void main() {
  ReceivePort receivePort;
  receivePort = new ReceivePort()..listen((_) { receivePort.close(); throw "more bad news"; } );
  Isolate.spawn(func, [], onExit: receivePort.sendPort);
}
```

Before this change only 'more bad news' will be printed on the stderr, after this change both 'bad news' and 'more bad news' will be printed out.

Before:
```
$ out/ReleaseX64/dart $DH/exc.dart

Unhandled exception:
more bad news

```

After:
```
$ out/ReleaseX64/dart $DH/exc.dart

Isolate is shutting down with the error: Unhandled exception:

Exception: bad news
Unhandled exception:
more bad news
```

Bug: https://github.com/dart-lang/sdk/issues/26626
Change-Id: Ief15f254837d9a02b93a6da655051fccf7c3dd2e
Reviewed-on: https://dart-review.googlesource.com/c/52680
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-10-17 17:12:47 +00:00
Alexander Markov 0eb5dbffac [vm] Revert service isolate setup in main.cc
This CL reverts part of the
https://github.com/dart-lang/sdk/commit/e70a7aab8a60a18947c68b95189632ab6420d83a
which is related to service isolate setup in CreateAndSetupServiceIsolate.
Apparently that change caused flaky crashes/timeouts on dartkb/release bot.

Change-Id: Ibbdf89d1e461b59e41c6a8c3f98cdc8ccaedc2d1
Reviewed-on: https://dart-review.googlesource.com/c/80265
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-10-16 22:54:15 +00:00
Zach Anderson 58c90dc488 [vm] Fix bytecode in core-jit for simarm64
simarm64 doesn't support --enable_interpreter, so we need
another way to get bytecode into the core-jit snapshot.
For this it makes sense to use --use_bytecode_compiler
since we'll need to switch to the bytecode-only pipeline
at some point anyway.

Change-Id: I761acd0439663cb488c3d2143cbaa8f96f9a0a4b
Reviewed-on: https://dart-review.googlesource.com/c/79180
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-10-11 17:59:15 +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
asiva e70a7aab8a [VM] Dead code removal
- Remove dead code around creation of service isolate in gen_snapshot.cc
- Create service isolate from the core snapshot
- exclude sources from platform dill file (saves about 2.5MB in size)

Change-Id: Ic4f382e23b1df84abdc94cfe0d1ea2b5df315c11
Reviewed-on: https://dart-review.googlesource.com/c/79141
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-10 23:19:24 +00:00
Ryan Macnak c8bda47d88 [standalone] Fix memory leaks when kernel isolate fails to launch from an app snapshot.
For example, due to VM shutdown.

Bug: https://github.com/dart-lang/sdk/issues/32187
Bug: https://github.com/dart-lang/sdk/issues/32616
Change-Id: I6e7e7ab6ee4986a0e8aabf2b0100e19369c9cea2
Reviewed-on: https://dart-review.googlesource.com/c/78622
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-10-08 22:43:09 +00:00
Zach Anderson b4b02a6bde [vm] Include bytecode in core-jit and app-jit snapshots
when the --enable_interpreter flag is passed to gen_snapshot/dart.

Change-Id: I6e9481e1793e4c97fd6b14b56e55aafcb044fc23
Reviewed-on: https://dart-review.googlesource.com/c/78150
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-10-08 19:51:10 +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
Ben Konyi ccf2366398 [ VM ] Exported functionality used by Flutter engine to public headers
Change-Id: Ia00487506d34c15c18f60c866b61d97242b2af95
Reviewed-on: https://dart-review.googlesource.com/77014
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-09-28 21:13:52 +00:00
asiva 76470aca47 [VM] use coresnapshot when initializing an Isolate
- use core snapshot when initializing an isolate (CorelibIsolateStartup benchmark moves from 39s to 2s)
- remove use_dart_frontend flag from the isolate specific flags
- the script snapshot API functions now return an error

Change-Id: Ia562e007fdbfd1d3ebd8e1a0c8feee238bada00b
Reviewed-on: https://dart-review.googlesource.com/76709
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-09-27 00:55:07 +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
Alexander Markov 19e2040f35 [vm] Cleanup the ability to specify entry points via JSON and text files
Entry points files (both JSON and text) are replaced with
@pragma("vm:entry-point") annotations.

This change removes obsolete:
* --embedder_entry_points_manifest option in gen_snapshot;
* --entry-points option in gen_kernel and frontend_server;
* --print_precompiler_entry_points VM option;
* 'entry_points' argument in Dart_Precompile() API.

Change-Id: I503f50f51df27e8e9635388c013058686b3b6ff1
Reviewed-on: https://dart-review.googlesource.com/75793
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-09-21 16:51:48 +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
asiva 0a29264117 [VM] Remove vm_platform from the dart binary
- Remove vm_platform from the dart binary
- kernel isolate always compiles in strong mode

Change-Id: I4e3973fdaee0bda1c43244ea04673f253eaae249
Reviewed-on: https://dart-review.googlesource.com/65788
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-08-24 15:45:04 +00:00
asiva d1bd887d03 [VM/SDK] Switch kernel isolate to run in Dart 2 mode
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: Iccca3233f6cb8d6b307b4cf1ca3262f293f794a6
Reviewed-on: https://dart-review.googlesource.com/70841
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-21 20:28:06 +00:00
asiva 1f5f197e90 [VM] Do not start the kernel isolate when doing an app JIT snapshot training run if a kernel file is specified as the application.
Change-Id: Ib2d57accfb369676d907b0811b8c689dd1d5efbe
Reviewed-on: https://dart-review.googlesource.com/70782
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-20 21:32:21 +00:00
Vyacheslav Egorov 032037681e Revert "[VM/SDK] Switch kernel isolate to run in Dart 2 mode"
This reverts commit 499761f0da.

Reason for revert: crashes when building SDK, red bots, broken Flutter 3xHEAD bot

Original change's description:
> [VM/SDK] Switch kernel isolate to run in Dart 2 mode
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
> Reviewed-on: https://dart-review.googlesource.com/70461
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

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

Change-Id: Ibf6d526fb5132b766f063fcf873cde661ae895d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/70516
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-08-19 19:58:32 +00:00
asiva 499761f0da [VM/SDK] Switch kernel isolate to run in Dart 2 mode
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
Reviewed-on: https://dart-review.googlesource.com/70461
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-18 22:50:09 +00:00