Commit Graph

3601 Commits

Author SHA1 Message Date
Zachary Anderson b90106e6fd [Fuchsia] Quiet an spurious error message in the EventHandler
FW-223

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2955883003 .
2017-06-26 11:09:45 -07:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Zachary Anderson bad6b64062 [Fuchsia] EventHandler: epoll -> ports v2
This CL rewrites the EventHandler on Fuchsia to use
the low-level ports system call API instead of the
epoll() emulation in musl. This will allow the
Magenta team to remove the epoll() emulation and
the deprecated system call API it is based on.

The new ports API doesn't provide epoll()-like
edge-triggering that clients of the EventHandler
expect. Therefore, this CL emulates it by adding
a level of indirection through a new "IOHandle"
object, which the socket code now uses instead
of file descriptors. This is similar to what we do
on Windows. See the comment at the top of
eventhandler_fuchsia.cc for more details.

Fuchsia issue US-251

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2910853002 .
2017-06-23 10:41:21 -07:00
Siva Chandra a23178ee77 Load vmservice from a .dill file when generating AOT snapshots.
This will happen only if --dfe option is specified along with the
--kernel-binaries option.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2949323002 .
2017-06-23 09:39:18 -07:00
Siva Chandra 8b40507be3 Reland "Load service isolate from a .dill file."
This reverts commit e90aa9cb5f.

Because of 2883d7f416, it is expected that
this change will do better on the bots.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2952913002 .
2017-06-22 10:10:45 -07:00
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Ryan Macnak 1eee6d8af3 Mostly revert "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
This reverts commit 9ab39ae099.

Keep removal of bad assert in loader.dart.  Keep using script snapshot in cross builds.

We expect to use a checked-in SDK in the Fuschia build instead.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2951133002 .
2017-06-21 15:19:21 -07:00
Ben Konyi 86fdbde70a Added timeout parameter to RawSocket and Socket connect, which allows for the specification of a maximum time to wait for a valid connection to be established.
fixes #19120

R=zra@google.com

Review-Url: https://codereview.chromium.org/2946333002 .
2017-06-21 14:31:52 -07:00
Siva Chandra e90aa9cb5f Revert "Load service isolate from a .dill file."
This reverts commit b0c2a382ca as the
vm-kernel mac bots are unhappy.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2947243002 .
2017-06-21 13:46:17 -07:00
Siva Chandra b0c2a382ca Load service isolate from a .dill file.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2925203002 .
2017-06-21 12:16:44 -07:00
Terry Lucas 092cbd561d Support for IPV6 for observatory in Dartium.
R=rmacnak@google.com
BUG=62811100

Review-Url: https://codereview.chromium.org/2944303003 .
2017-06-20 19:32:01 -07:00
Ryan Macnak dd996fc4be [fuchsia] Make symbols in the Dart VM visible, so they are available to the profiler.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2946123002 .
2017-06-20 15:21:07 -07:00
Siva Chandra bac83e0973 Replace the --platform vm_option with --kernel-binaries option.
This new flag value specifies the directory in which the VM should look
up the platform.dill file. A future change will require the VM to load
another kernel binary from disk. This binary will also live in the same
directory that --kernel-binaries specifies. This way, we avoid adding a
different flag for each of the different binaries.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2933203004 .
2017-06-16 12:22:31 -07:00
Siva Chandra 65a5707189 Add a vmservice_sdk directory in runtime/bin.
This directory has a libraries.json file pointing to vmservice_io and
_vmservice in the source tree. The script tools/patch_sdk.dart has been
updated to use this new directory as the sdk directory when compiling
dart:vmservice_io. This way, to build vmservice_io.dill, we
do not need to copy the dart files pertaining to vmservice_io and
_vmservice.

Fixes #29859

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2938903003 .
2017-06-15 13:08:10 -07:00
Siva Annamalai 8b7af73daa 1. Dynamically compute the main closure that needs to be run by the main isolate
2. Get rid of _getMainClosure()
3. Adjust the AOT compiler to ensure it retains the function associated with
   the main closure without having to include '_getMainClosure()' in the list
   of embedder specified entry points
4. Get rid of the hack in kernel reader to do a delayed patch of
   '_getMainClosure()' in the builtin library.

BUG=
R=aam@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2933603002 .
2017-06-15 10:40:45 -07:00
Zachary Anderson 07725f3dfa [Fuchsia] Fix Platform.executable and Platform.resolvedExecutable
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2941873002 .
2017-06-15 09:05:54 -07:00
Ryan Macnak 9ab39ae099 Reapply "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
Add missing config to run_vm_tests.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2937503003 .
2017-06-13 08:49:00 -07:00
Ryan Macnak 3383c4ac25 Revert "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
This reverts commit 54e80a8c32.

Review-Url: https://codereview.chromium.org/2940513002 .
2017-06-12 15:19:23 -07:00
Ryan Macnak 54e80a8c32 [fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries.
Build another varient of dart_bootstrap targeting the host architecture to ensure reasonable Observatory build times.

Remove assert assuming a root script, which does not exist when gen_snapshot builds core snapshots.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2924173005 .
2017-06-12 14:33:10 -07:00
Zachary Anderson a834e6dcf3 Update Fuchsia-specific code to use the new MX_ error names
R=zra@google.com

Review-Url: https://codereview.chromium.org/2935483002 .
2017-06-09 13:19:54 -07:00
Zachary Anderson 3df91e0701 [Fuchsia] Use the trusted certs in the image
R=bkonyi@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2934523003 .
2017-06-09 13:18:09 -07:00
Ben Konyi 033c18472d Revert "Removed SecurityContext.alpnSupported, as ALPN is now supported on all platforms. Also updated CHANGELOG.md to announce its removal."
This reverts commit 4b6fa0d5fb.

BUG=
R=kevmoo@google.com

Review-Url: https://codereview.chromium.org/2928013002 .
2017-06-08 14:32:41 -07:00
Alexander Aprelev d86cb763b9 Add comma to the license so it matches license header in other files, doesn't result in new license text added in Flutter license inventory.
See https://github.com/flutter/engine/pull/3755.

BUG=
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2927703007 .
2017-06-08 12:19:30 -07:00
Ben Konyi 4b6fa0d5fb Removed SecurityContext.alpnSupported, as ALPN is now supported on all platforms. Also updated CHANGELOG.md to announce its removal.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2926153004 .
2017-06-07 15:15:58 -07:00
Siva Annamalai 6656404ad6 1. Restructure code to enable reloading when a kernel dill file is specified on the command line instead of sources.
2. Read the platform dill file at startup not for every isolate creation

3. Store the memory representation of kernel program in isolate data so that it is deleted when the isolate is shutdown

R=aam@google.com

Review-Url: https://codereview.chromium.org/2927493002 .
2017-06-07 13:42:20 -07:00
Ryan Macnak 22b72a845c gen_snapshot:
- Don't try to mmap an empty file.
  - Use correct filename for mapping errors.
  - Don't set the root library for core-jit snapshots.
  - Accept hyphen variants of options for entry points and compilation traces.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2928663002 .
2017-06-06 14:31:48 -07:00
Ben Konyi 0e164c043f Fixed memory leak in SetTrustedCertificates in SecurityContext
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2923163004 .
2017-06-06 14:02:52 -07:00
Ben Konyi 644862bf96 Ported SecureSocket to use BoringSSL on OSX and iOS. This included registering a callback with BoringSSL using SSL_CTX_set_cert_verify_callback, which overrides the BoringSSL certificate verification process, in order to verify certificates against the system's root certificates and then proceed to let BoringSSL handle the rest of the SSL session. In addition, this change includes refactoring to share BoringSSL code that used on all platforms.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2903743002 .
2017-06-06 12:52:57 -07:00
Ryan Macnak 74f3d1bd9c Add Dart_Save/LoadCompilationTrace.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2922913004 .
2017-06-05 16:56:21 -07:00
Siva Annamalai 4b8cc6b205 Reorganize the CreateIsolateAndSetupHelper code to make it more readable and facilitate further changes to start the service isolate from a kernel IR file.
BUG=
R=rmacnak@google.com, sivachandra@google.com

Review-Url: https://codereview.chromium.org/2918033002 .
2017-06-02 10:43:34 -07:00
Siva Annamalai f436b4986c Related to issue 27860
- Removed code which stored the source code paths for core and
  builtin libraries.

BUG=27860
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2921513002 .
2017-06-01 11:11:09 -07:00
Ryan Macnak 7f7689750f Stop passing removed parameter to create_snapshot_bin.py to fix GYP/Dartium build.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2913983003 .
2017-05-31 17:04:38 -07:00
Ryan Macnak 76df24b076 CoreJIT snapshots without training.
Only include OSR and field guards in the features descriptor for JIT code to avoid gen_snapshot and dart having different default values.

Disabled since core snapshots with code break tests with non-default flags for type checks, assertions, strict errors, OSR, or field guards.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2902313004 .
2017-05-31 13:49:12 -07:00
Ryan Macnak 3f03d305b4 GN: Build snapshot assembly files w/r/t current_toolchain.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2909383002 .
2017-05-30 15:19:17 -07:00
James Robinson d32e55e17b [fuchsia] Replace use of epoll with mx_ primitives in process_fuchsia
process_fuchsia.cc has the ability to drain stdout, stderr, and exit
status from a child process. It was using epoll to multiplex these
streams which worked but required complicated emulation in libc which
we'd like to unwind as well as some tricky locking. This replaces the
epoll with a direct mx_object_wait_many() call that waits on the
Magenta handles backing the streams.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2903373003 .
2017-05-30 13:59:07 -07:00
Zachary Anderson 9779e2db96 [Fuchsia] Calculate RSS using new task stat fields
mem_committed_bytes is deprecated and will go away.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2906943002 .
2017-05-26 15:15:50 -07:00
Siva Annamalai 4de9d71629 - Process the Dart_kCanonicalizeUrl tag in both VMparser and Kernel modes.
- Add assertion for tag to be Dart_kScriptTag in Kernel mode.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2906603003 .
2017-05-25 17:29:59 -07:00
Siva Annamalai 286dd51948 Changes to make isolate reload functionality work with the --dfe option.
R=aam@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2894773004 .
2017-05-25 15:40:44 -07:00
Ryan Macnak 14ec8fa979 Use assembly instead of C array literals to link the core snapshot into the VM.
Allows for including instructions.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2901163002 .
2017-05-24 14:38:15 -07:00
Zachary Anderson 61300d19c6 [dart:io] Re-limit the number of IO Service ports per Isolate
Previous change removed the limit, but this causes too many
threads to be spawned at the same time on Windows, which
crashes the VM. This change restores the limit, but continues
use of the free-list approach, which still avoids the blocking
problem fixed by the previous change.

fixes #29702

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2903013002 .
2017-05-24 10:22:26 -07:00
Zachary Anderson 3310e0cebd [dart:io] Remove collisions from IO Service port dispatch
This change prevents IO Service requests from colliding on the same
IO Service port. If requests can collide, a request that could otherwise
be serviced immediately can become blocked on a request that is blocked.

To avoid collisions, this change maintains a free list of IO Service
ports. If the free list is empty, we allocate a new IO Service port.

R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2903593004 .
2017-05-23 23:58:07 -07:00
Siva Annamalai ae57eca504 Read builtin source files directly only under a flag which is off by default.
BUG=27860
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2903693003 .
2017-05-23 18:14:00 -07:00
Vyacheslav Egorov 13f5616ef6 VM: Fix snapshoting slow-down caused by 99c6a18a1b.
Only reload packages map when we are actually doing the isolate reload.

Snapshotting creates and destroys and loader object every time it loads a dart
file - which means kInitLoader is on the hot path and we should avoid rereading
packages map.

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

Review-Url: https://codereview.chromium.org/2901093002 .
2017-05-23 22:01:45 +02:00
Zach Anderson 299c5f15fd [windows] Don't set/restore the code page if it's already been set
Fixes some messy ninja output during the build.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2894353002 .
2017-05-22 15:02:24 -07:00
Alexander Aprelev ddab610d53 Revert "Revert "Use Kernel frontend from run_vm_tests.""
This reverts commit 530a0df8f3.

This relands https://codereview.chromium.org/2881953002/ that had to be reverted because it caused Dartium build regression. Now fix for Dartium build on mac is in place with Dartium order file update(https://codereview.chromium.org/2887183003) and corresponding Dartium DEPS rollforward(https://codereview.chromium.org/2888283003/).

BUG=https://github.com/dart-lang/sdk/issues/28264
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2898743003 .
2017-05-22 15:00:30 -07:00
Zachary Anderson 81e428fd39 [infra] Assembles the SDK using GN rather than create_sdk.py
This has a few advantages:
- We can track dependencies more precisely
- ninja can assemble things in parallel as they're ready rather than
  sequentially all at once.
- It is easier to customize SDKs depending on target platform, e.g.
  Fuchsia.

This CL also has a number of cleanups:
- Defining is_fuchsia and is_fuchsia host so we don't always have to check
- Piping through toolchain overrides in more places
- Fixing bugs in copy_tree.py, not using list_files.py, which is broken on Windows

related #29558

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2848943003 .
2017-05-20 23:30:09 -07:00
Siva Annamalai 7aed6c0a74 Minor code reorg to ensure we don't include parts of the Library tag handler in the precompiled runtime builds.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2896523003 .
2017-05-19 13:41:23 -07:00
Siva Annamalai 92a516e703 Pull loader.[cc|h] file out of libdart_builtin rule and instead include it in each of the targets (dart|gen_snapshot|dart_bootstrap) that need it. It is not needed in dart_precompiled_runtime but to really remove it from there some refactoring of main.cc is needed. This CL does not address that.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2887153006 .
2017-05-19 13:27:43 -07:00
William Hesse 530a0df8f3 Revert "Use Kernel frontend from run_vm_tests."
This reverts commit d91f228766.
The commit causes a failure in
tools/build/mac/verify_order _ChromeMain "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}":
unordered symbols in out/Release/Chromium Framework.framework/Versions/A/Chromium Framework:

BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2884383005 .
2017-05-18 10:41:45 +02:00
Alexander Aprelev d91f228766 Use Kernel frontend from run_vm_tests.
With this change one can run run_vm_tests and pass to it reference to kernel parser snapshot. For example,

out/DebugX64/run_vm_tests --dfe=out/DebugX64/gen/kernel-service.dart.snapshot Debugger_RemoveBreakpoint

As this represents first step, this change enables only tests in debugger_test.cc to run with kernel frontend. There will be follow-up cls that enable all of the VM tests to use kernel frontend.

BUG=https://github.com/dart-lang/sdk/issues/28264
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2881953002 .
2017-05-17 21:25:56 -07:00