Commit Graph

3172 Commits

Author SHA1 Message Date
Ryan Macnak bea7be00e1 [test] Check for determinism from the kernel compiler.
Fix leak when generating incremental kernel files.

Bug: https://github.com/dart-lang/sdk/issues/35092
Change-Id: Iaa112150501dd17d943a3747db3cacd2ee4464d2
Reviewed-on: https://dart-review.googlesource.com/c/84301
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-11-14 01:30:43 +00:00
Ryan Macnak cb522bfcd2 [vm] Update Windows synchronization code to CONDITION_VARIABLEs and SRWLOCKs.
Use CRITICAL_SECTIONs for dart::bin::Monitor as the event handler requires a recursive monitor.

Requires Vista or later.

Bug: https://github.com/dart-lang/sdk/issues/35029
Bug: https://github.com/dart-lang/sdk/issues/35118
Change-Id: I1e96c5b428257649a45d26a979fba53a10f02151
Reviewed-on: https://dart-review.googlesource.com/c/20901
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-11-09 18:44:49 +00:00
Jonas Finnemann Jensen 8146725731 Return 403 and 405 from observatory server
With this change untrusted `origin` header or method not allowed will
return 403 and 405 respectively. Before this change it returned 200 with
an empty body. Returning proper error codes helps users debug their
setup and figure out what is wrong.

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

Change-Id: I60c75ee2e33882f98fd9a020d33d459e74febf29
Reviewed-on: https://dart-review.googlesource.com/c/69308
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-11-08 17:03:11 +00:00
Ryan Macnak 03e2be624a [gen_snapshot] Default to --deterministic.
Fix Scavenger to use the right heap verification entry point.

Bug: https://github.com/flutter/flutter/issues/23958
Change-Id: I37892e0cbfd276d81acfeb802b582c469a219eaa
Reviewed-on: https://dart-review.googlesource.com/c/83466
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-11-08 00:39:50 +00:00
Dan Field 50418e07a1 Fix multicast_ttl patch for windows - previous patch made incorrect
call for setsockopt on Windows machines.


collapse if block


move raw_datagram_socket_test to standalone_2


update test, check for success


fix windows


Fix bug in TTL logic for IPv6

Change-Id: I7940e2e1a3c355ebef752f951464e5ade96d2153
Reviewed-on: https://dart-review.googlesource.com/c/83360
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-07 18:26:04 +00:00
Ben Konyi 1dabf0d19c [ VM / dart:io ] Removed usage of std::make_unique as C++14 is not supported in google3
Change-Id: I615bcb89ef2dec2e745a4d321a13a0a131ba7485
Reviewed-on: https://dart-review.googlesource.com/c/83230
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-11-07 01:07:23 +00:00
Zach Anderson f3d21a8c0d Revert "Fix bug in TTL logic for IPv6"
This reverts commit ffe2116c27.

Reason for revert: Windows test failures on the bots.

Original change's description:
> Fix bug in TTL logic for IPv6
> 
> This was introduced by my previous CL - there is existing logic to set
> the TTL for multicast that works for IPv4 and IPv6, this patch ensures
> the correct call is made.
> 
> Change-Id: I8db7325ca79eb38c9de6d6e431231ed2ec1b0f47
> Reviewed-on: https://dart-review.googlesource.com/c/82023
> Reviewed-by: Zach Anderson <zra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

TBR=zra@google.com,asiva@google.com,dnfield@google.com

Change-Id: I06abb9f1aac638ab31541d66b55a3f5a29b0e5a9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/82885
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-05 21:16:45 +00:00
Dan Field ffe2116c27 Fix bug in TTL logic for IPv6
This was introduced by my previous CL - there is existing logic to set
the TTL for multicast that works for IPv4 and IPv6, this patch ensures
the correct call is made.

Change-Id: I8db7325ca79eb38c9de6d6e431231ed2ec1b0f47
Reviewed-on: https://dart-review.googlesource.com/c/82023
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-05 19:00:16 +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
asiva e6d3a45b6a [VM] Fix for issue 34839 Service isolate hangs during shutdown if
the VM exits before the Observatory server has a chance to
     start listening.

Bug: 34839
Change-Id: I2a5dfe69a197fe054dd041af3ea4e07da736b226
Reviewed-on: https://dart-review.googlesource.com/c/81381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-27 00:45:59 +00:00
Samir Jindel e23acaaf90 [vm/aot] Fix obfuscation.
Test Plan:

Make vm-kernel-precomp-obfuscate-linux-release-x64-try green, ensuring status file changes
reflect design gaps and not bugs.

Tested locally that obfuscated Flutter Gallery runs.

Change-Id: Ifcdc334de58f43c310e15b58dbcf6fe1597206f2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/81009
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-26 13:00:33 +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
Ben Konyi 2cf0ca381c [VM] Added cleanup for Dart IO API
Change-Id: Iab9f567ef3d4310ee9511fa5ce375b7ccf200ef5
Reviewed-on: https://dart-review.googlesource.com/c/81442
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-10-25 21:13:43 +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 82c1f2aaa8 [vm] Eliminate dart_zlib_path from BUILD files
TBR=zra@google.com

Change-Id: I7b93a03ef958c7dcb454769be945d0e3bed90b39
Reviewed-on: https://dart-review.googlesource.com/c/81360
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-10-24 18:06:43 +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
Zach Anderson 91b5862c1e [vm] Add core-jit-all snapshot kind to gen_snapshot
This is for comparing with including bytecode in the core-jit
snapshot.

Change-Id: I51f98df5c4845ee3bf69438a059eddbd87b02e06
Reviewed-on: https://dart-review.googlesource.com/c/80263
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-10-18 17:23:04 +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
Dan Field 055ce6f101 fix syntax error on android
Change-Id: Ibb16959dd31ea2e43de5ffc796bd93181f9fc6a7
Reviewed-on: https://dart-review.googlesource.com/c/80461
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 05:31:55 +00:00
Dan Field 130f57f7f3 missing include for android
Change-Id: I00cbf15b059d2a56ddf271a2c309bc210679bd7c
Reviewed-on: https://dart-review.googlesource.com/c/80460
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 04:44:35 +00:00
Dan Field 8fb17e0b6a Missing import for some linux builds
Change-Id: I29c605a5fb6626db7e1ae5ab31b5ef46328833d3
Reviewed-on: https://dart-review.googlesource.com/c/80402
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 02:50:02 +00:00
Dan Field 6e23c3b3cb Support SO_REUSEPORT and IP_MULTICAST_TTL for datagram sockets.
mDNS queries (and many other local queries) should be allowed to set
their TTL to 255.  This patch enables that on all platforms.

On macOS in particular, a system service reserves the mDNS port. The
socket option SO_REUSEPORT is required in addition to SO_REUSEADDR to
successfully bind there; the flag is also supported on Linux, so this
patch allows it to be used there as well (but prints an error message if
it's used on any other platform).

I could use some guidance as to tests for this - is it support availble
for running tests only on specific platforms?

Bug: https://github.com/dart-lang/sdk/issues/34799 and
Change-Id: I29b620d8ec04343f356a8171bae3d385ddfa9564
https://github.com/dart-lang/sdk/issues/34782
Reviewed-on: https://dart-review.googlesource.com/c/80082
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 01:48:52 +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
Alexander Markov 1d0d9f1d3f [vm] Fix heap corruption while reading "kernel list" file
This heap corruption caused sporadic failures of
pkg/vm/test/incremental_compiler_test test.

Change-Id: I7b35efc2db321ff0bce992ccfe3e5ace9ed07599
Reviewed-on: https://dart-review.googlesource.com/c/79473
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-10-13 00:39:04 +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
Vyacheslav Egorov 3fe3106489 [gardening] Fix leaks in run_vm_tests binary detected by ASAN.
Change-Id: I8a7f008ad7d25111b0c9da7a2e65f489edce7900
Reviewed-on: https://dart-review.googlesource.com/c/79260
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-10-11 16:52:14 +00:00
Alexander Markov 3cf0008b13 [vm/bytecode] Remove dependencies on ASTs when running with bytecode
Also, enable dropping ASTs from kernel files when testing in dartkb mode.

Change-Id: Iec82f1b76e3b8a9eb692de325d7645d8f271e03e
Reviewed-on: https://dart-review.googlesource.com/c/79087
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-11 15:11:26 +00:00
Martin Kustermann 5c9a8d8cb5 [VM] Add $target_gen_dir/gen_kernel_bytecode.dill.d to outputs of GN action, to ensure directory is created before action is run
This fixes flaky build failures on our bots.

To reproduce the original issue:
  % rm -rf out/DebugX64
  % tools/build.py -mdebug -ax64 gen_kernel_bytecode_dill
  output: Error: Unable to open snapshot depfile: .../out/DebugX64/gen/runtime/bin/gen_kernel_bytecode.dill.d

This change seems to force GN to create the parent directory of outputs before
running the action.

Change-Id: Ia388f423d7724516bc6f00cd39bed19533587f39
Reviewed-on: https://dart-review.googlesource.com/c/79202
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-10-11 09:44:12 +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
asiva 26cab0a4db [VM/IO] The exit code handler thread should not try to get the exit codes for detached child processes. Currently we end up in a tight loop in the exit code handler when detached processes are created.
Change-Id: I0eb207c4421d9e22e62ffd5a53478cf1553a3188
Reviewed-on: https://dart-review.googlesource.com/c/78701
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-08 23:22:19 +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
Ryan Macnak 33485f8ef2 [standalone] Fix leak when the kernel service produces a compile-time error.
Bug: https://github.com/dart-lang/sdk/issues/32187
Change-Id: If845eec40fe013120455ac851395ee215a3ce0d2
Reviewed-on: https://dart-review.googlesource.com/c/78623
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-08 22:41:36 +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
asiva af57d2a0eb [VM] Remove dead code associated with flag '--error-on-bad-override'
- Remove all dead code associated with flag '--error-on-bad-override' which is currently running only under !FLAG_strong which is not valid anymore
- Not removing the flag from flag_list for now as it is used in a number of tests and removing it from all these places would be a big change, it would be a NOP flag
- removed some dead code in 'loader.dart' which was invoked from the tag handler

Change-Id: I5474b51b4dee7471e80b4081e55b996f1d75612f
Reviewed-on: https://dart-review.googlesource.com/c/78382
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-10-08 04:44:24 +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
asiva c6254163dc Fix source filter in built rule.
Change-Id: I91167e012b48ae2c25e4f4d6edf14e86767affed
Reviewed-on: https://dart-review.googlesource.com/c/78146
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-10-04 20:32:26 +00:00
Todd Eisenberger cbf97be4e7 [fuchsia] Switch to new fdio API names
Change-Id: Ib11fad17ddc04dad641a457f0a6db1e39d1f1c06
Reviewed-on: https://dart-review.googlesource.com/77700
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-10-03 18:28:27 +00:00
asiva 30aa464f77 [VM] Remove 'corelib' and 'dart-io' sources generation into C++ arrays
- Remove all code that generates the corelib and dart:io library sources into C++ arrays and link them into dart_bootstrap
- Remove the executable dart_bootstrap and all uses of it
- Remove bootstrap_nolib.cc and builtin_nocore.cc
- Remove the Dart 1 code in core lib bootstrap path

Change-Id: Ifd33496204285a08b42fe09e39428e7a92b416b6
Reviewed-on: https://dart-review.googlesource.com/c/77241
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-02 23:27:05 +00:00
Ben Konyi 07a8496919 [VM] Allow for Dart_SetVMFlags to be called again after Dart_Cleanup
Change-Id: Icf07258cfb05a987e0a439277a59825c06f993b2
Reviewed-on: https://dart-review.googlesource.com/77486
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-10-02 00:33:37 +00:00
Ben Konyi 07852532e3 [ VM ] Additional cleanup in Dart_Initialize and Dart_Cleanup
Change-Id: I6dc02b3d9de16cc176eb97613bc0c7f0bb9b16eb
Reviewed-on: https://dart-review.googlesource.com/77013
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2018-09-28 23:18:59 +00:00
Ryan Macnak 4a51268890 [gen_snapshot] Restore support for --snapshot_kind=vm-aot-assembly; update docs.
Disable broken analyzer training runs.

Bug: https://github.com/dart-lang/sdk/issues/34616
Change-Id: Ib2bb022f5b095bcd29451741aa4ed557d2f78c17
Reviewed-on: https://dart-review.googlesource.com/77228
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-28 21:43:04 +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 d9de98e164 [VM] Delete some dead code in gen_snapshot.cc
Change-Id: I26428cab1fb6cf9a0bb243716cf483ededd394bc
Reviewed-on: https://dart-review.googlesource.com/76800
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-09-27 17:36:53 +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
Ben Konyi 3c4c62d79a Reland "[VM] Dart_Initialize no longer crashes after Dart_Cleanup"
This is a reland of 519ee905f9

Original change's description:
> [VM] Dart_Initialize no longer crashes after Dart_Cleanup
> 
> Change-Id: I3cfdab9553aad045f024b6f9aec0b40b08234007
> Reviewed-on: https://dart-review.googlesource.com/75786
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

Change-Id: Icdd901bf1ab0b675cc5f1497061a2b7b8a05d956
Reviewed-on: https://dart-review.googlesource.com/76561
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-09-26 17:54:45 +00:00
Ryan Macnak 86430cb46a [vm] Extend AppJIT capability of gen_snapshot.
- Add generation of AppJIT snapshots (from a trace rather than a training run).
 - Add generation of AppJIT snapshots under the constraint of not generating a new instructions segment.
 - Remove generation of script snapshots (no longer used by Flutter).

Change-Id: I2a7cb4b7cd681fae5d33bc896107b3ea903f35d1
Reviewed-on: https://dart-review.googlesource.com/75390
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Stanislav Baranov <sbaranov@google.com>
2018-09-25 23:44:29 +00:00
Ben Konyi b6284b41e3 Revert "[VM] Dart_Initialize no longer crashes after Dart_Cleanup"
This reverts commit 519ee905f9.

Reason for revert: Seeing multiple crashes on Windows

Original change's description:
> [VM] Dart_Initialize no longer crashes after Dart_Cleanup
> 
> Change-Id: I3cfdab9553aad045f024b6f9aec0b40b08234007
> Reviewed-on: https://dart-review.googlesource.com/75786
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,zra@google.com

Change-Id: I33ad79dbc3fcf44f93612ff63bd2d8431f6067c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/76342
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-09-25 02:17:37 +00:00