Commit Graph

3172 Commits

Author SHA1 Message Date
Siva Annamalai bcea09162a Land https://codereview.chromium.org/2423893003/ for viettrungluu
TBR=zra

Review URL: https://codereview.chromium.org/2426833002 .
2016-10-17 16:57:02 -07:00
Vyacheslav Egorov f67ce21068 VM support for running Kernel binaries.
BUG=
R=asiva@google.com, fschneider@google.com

Review URL: https://codereview.chromium.org/2411823003 .
2016-10-15 22:48:46 +02:00
Ryan Macnak 3d00ecdc8f Reapply "Use a single file for app snapshots."
- Don't read script to check for an app snapshot if it is a pipe. Fixes loading source from a pipe.
 - Fix windows and fushsia builds.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2416973003 .
2016-10-14 09:57:54 -07:00
Ryan Macnak 6839a23240 Revert "Use a single file for app snapshots."
This reverts commit 4f8b16df3b.

Review URL: https://codereview.chromium.org/2410303008 .
2016-10-13 15:29:23 -07:00
Ryan Macnak 4f8b16df3b Use a single file for app snapshots.
For blobs, put all four pieces into a single file with a header describing their offsets.
For dynamic libraries, move the vm isolate and isolate pieces into the dynamic library as additional read-only sections.

Automatically detect if the script argument is an app snapshot and initialize the VM appropriately, similar to automatic detection of script snapshots.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2405393002 .
2016-10-13 14:33:56 -07:00
Siva Annamalai aae051e4c3 Fix for issue 27567 (inconsistent handling of invalid -D options
BUG=#27567
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2409263004 .
2016-10-12 18:42:30 -07:00
Florian Schneider ecb818a991 AOT: Add missing native entry points for secure sockets.
These are only accessed from native code on MacOS/iOS.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2419653002 .
2016-10-12 13:04:22 -07:00
Zachary Anderson 7ace8dc4f7 [fuchsia] fix uninitialized field in the event handler
R=asiva@google.com

Review URL: https://codereview.chromium.org/2399283003 .
2016-10-07 11:16:57 -07:00
Ryan Macnak ad32e93c05 Include optimized code in JIT app snapshots.
R=asiva@google.com

Review URL: https://codereview.chromium.org/2397853003 .
2016-10-07 10:34:57 -07:00
Siva Annamalai 42c58c5c2d - fix some cases where we are using uninitialized memory
- use attribute 'no msan' on NativeEntry::ReturnValueIsError function
  as msan doesn't seem to track the return slot being set by a native
  function
- vsnprintf seems to have issues with msan so unpoison the allocated
  memory buffer everytime vsnprintf is used to suppress the error.

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2383293003 .
2016-10-05 16:54:18 -07:00
John McCutchan 8b37da82ef Support paths which are encoded with base64 in http put devfs server code
- [x] Add a new header 'dev_fs_path_b64' which is used over 'dev_fs_path' when present.
- [x] 'dev_fs_path_b64' expects the path encoded as UTF8 and then BASE64.
- [x] Add unit test case.

BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2386123005 .
2016-10-04 15:31:09 -07:00
Zach Anderson 9a6797e6ba GN build on windows
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2385643004 .
2016-10-04 09:19:07 -07:00
Siva Annamalai d30d056951 disable use of tcmalloc if msan is enabled during the build.
R=zra@google.com

Review URL: https://codereview.chromium.org/2384903002 .
2016-10-03 11:28:52 -07:00
Zachary Anderson 7c784cea9f Linux create_sdk GN build for host
This CL enables GN builds of all targets from dart.gyp
on Linux for the host (i.e. ia32, x64).

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2379803002 .
2016-09-29 13:23:00 -07:00
Chinmay Garde cfbf1a511e CoreServices is not available on iOS. Don't add it as a dependency.
R=zra@google.com

Review URL: https://codereview.chromium.org/2378953003 .
2016-09-29 11:05:27 -07:00
Zachary Anderson 27784381b2 Add tcmalloc to GN build
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2367723004 .
2016-09-23 15:24:54 -07:00
Siva Annamalai 12f86594ec Add --parse-all option in order to benchmark and measure the scanner/parser performance.
R=hausner@google.com

Review URL: https://codereview.chromium.org/2327693002 .
2016-09-23 15:20:39 -07:00
Zachary Anderson a76aa4e70c Throw an ArgumentError if the port is out of range
fixes #27416

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2361373003 .
2016-09-23 11:12:54 -07:00
Zachary Anderson 7e1b7e54d7 Starting work on full GN build
This change:
- Sucks in gn binaries
- Sucks in a version of llvm that the GN build likes
- Adds tools/gn.py to invoke gn
- Adds a root BUILD.gn and .gn file
- Removes chrome boilerplate we don't need
- etc.

This lets us do a standalone build of the 'runtime'
target for x64, ia32, arm, arm64, mips, and the
simulators on Linux, and arm and arm64 on Android.

It does not include tcmalloc, and hasn't been tested
on Mac or Windows. That work and more cleanup of
chrome boilerplate will come in follow-up CLs.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2350583002 .
2016-09-23 07:47:36 -07:00
Zachary Anderson 94c96ac42c Added a target for a host version of the dart executable.
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2351743004 .
2016-09-21 19:05:06 -07:00
James Robinson 8a53ba91de Stop using deprecated (names of) magenta syscalls.
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/2355953004 .
2016-09-20 15:55:51 -07:00
Ryan Macnak fb127ddf4a Standalone: Add missing tree-shaker root.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2356953002 .
2016-09-20 14:44:05 -07:00
Zachary Anderson 43231d9ff4 Pull boringssl generated source from boringssl_gen
Dart and Flutter engine both need to have the code generated for
boringssl under //third_party/boringssl. To avoid having two
copies of this code, this CL removes it from the Dart repo and
instead pulls it from a github repo that Flutter engine can
share.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2354623003 .
2016-09-20 08:46:44 -07:00
William Hesse 0695b1db3a Remove package root target and support scripts
BUG=https://github.com/dart-lang/sdk/issues/23565
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2346163005 .
2016-09-20 13:32:50 +02:00
Zachary Anderson 509e6f3eb3 Fixes Dartium build
R=asiva@google.com

Review URL: https://codereview.chromium.org/2345773004 .
2016-09-16 13:52:45 -07:00
Zachary Anderson 139db22be5 Use OS-provided trusted root certs on Linux
First, the look for trusted root certificates
in standard locations on the file system
(/etc/pki/tls/certs/ca-bundle.crt followed by
/etc/ssl/certs), and only if these do not exist
will we fall back on the compiled-in trusted root
certificates. This behavior can be overridden
with the new flags --root-certs-file and
--root-certs-cache.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2346683003 .
2016-09-16 09:08:51 -07:00
Zachary Anderson 44a04f18f9 Use tcmalloc on Linux
Statically linking in the tcmalloc code is enough
to override the built-in malloc. I have this set up to
exclude the code for collecting heap profiles in a
Product build. There's still about a 230KB increase in
binary size, though. I think this isn't a big problem
since right now this is enabled only for server Linux.

product binary size:
before x64: 9569600
after  x64: 9807840
increase: 238240 (2.5%)

before ia32: 9122836
after  ia32: 9360944
increase: 238108 (2.6%)

before mips: 9418680
after  mips: 9640940
increase: 222260 (2.4%)

InitialRSS:
product:
before x64: 6307840
after x64:  7430144
increase: 1122304 (17.8%)

release (--no-profiler)
before x64: 7843840
after x64:  9207808
increase: 1363968 (17.4%)

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

Review URL: https://codereview.chromium.org/2316813002 .
2016-09-16 08:24:54 -07:00
Zachary Anderson e2d269225b [fuchsia] Add InitialRSS to status list, add missing launchpad call.
R=asiva@google.com

Review URL: https://codereview.chromium.org/2337883004 .
2016-09-13 10:49:17 -07:00
Ryan Macnak fcda790b9c Fix bad origin check.
localhost.malicious.com is not localhost.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2298943004 .
2016-09-09 16:34:03 -07:00
James Robinson b56b355ca7 Update for mx_object_get_info() changes.
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/2319363002 .
2016-09-07 16:29:56 -07:00
Zach Anderson 245b330548 Fix run_vm_tests for Windows
related #27250

Review URL: https://codereview.chromium.org/2312293002 .
2016-09-06 10:57:35 -07:00
Zach Anderson a695975d00 Fixes run_vm_tests Windows shutdown problem
related #27250

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2311283002 .
2016-09-06 10:10:40 -07:00
Carlo Bernaschina 4b328e442f Added service protocol cross-origin access from localhost for http requests
Related to https://github.com/dart-lang/sdk/commit/e6e61332d6ec7c3bd6c92fa7496282174db521a7

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2308083002 .
2016-09-02 13:59:56 -07:00
Carlo Bernaschina 62114cee60 Added service protocol cross-origin access from localhost for http requests
Related to https://github.com/dart-lang/sdk/commit/e6e61332d6ec7c3bd6c92fa7496282174db521a7

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2295343006 .
2016-09-02 11:17:11 -07:00
James Robinson 713b392e6b Fix build: mx_handle_get_info -> mx_object_get_info.
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/2308673002 .
2016-09-02 11:00:00 -07:00
Zachary Anderson 4024fe154a GN: Relativize occurrances of //dart
The Dart root in the Dart tree is at //, not //dart.
But in the Dart tree we can refer to the root with
a relative path.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2301833003 .
2016-09-01 13:35:44 -07:00
Siva Annamalai 780ef51215 Add missing dependency in the rule which generates io_gen.cc
R=jsimmons@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2305483002 .
2016-09-01 10:21:16 -07:00
Zach Anderson 62f9ac3cb9 Fix mac dartium build
Review URL: https://codereview.chromium.org/2291253002 .
2016-08-30 09:53:51 -07:00
Zachary Anderson b990bc3794 Fix native extension lookup
This CL allows native extension lookup to defer to the platform's
library lookup (e.g. dlopen) when the library cannot be found next to
the importing Dart library. It also allows dart-ext: to accept an
absolute path to the native library.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2285223003 .
2016-08-30 09:31:47 -07:00
James Robinson a55ead5775 [fuchsia] Fix build for new sysroot
Fixing build as various syscalls have moved out of runtime so it needs
to depend on lib-magenta

BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2296463002 .
2016-08-29 15:07:46 -07:00
Zachary Anderson 50d321085c Fix -O0 compilation errors
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2289993002 .
2016-08-29 14:57:51 -07:00
Zachary Anderson 682a4d0036 Use different directory names in directory tests
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2292593002 .
2016-08-29 10:40:00 -07:00
Carlo Bernaschina 7bdb33a766 Log exceptions in vmservice post()
Fixes=https://github.com/dart-lang/sdk/issues/27172

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2287603004 .
2016-08-26 15:36:31 -07:00
Zachary Anderson b4a69e922d [fuchsia] Some directory operations
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2281223002 .
2016-08-26 14:30:50 -07:00
Zach Anderson 419aa6972e Fix directory test for windows
Review URL: https://codereview.chromium.org/2280793002 .
2016-08-25 14:44:20 -07:00
Zach Anderson d706680c74 Fix directory test on mac
Review URL: https://codereview.chromium.org/2281733002 .
2016-08-25 13:42:54 -07:00
Zachary Anderson 6963e6f440 [fuchsia] Fix process launching. Update statuses.
R=asiva@google.com, mcgrathr@chromium.org

Review URL: https://codereview.chromium.org/2277313002 .
2016-08-25 12:57:10 -07:00
Zachary Anderson 720ebb4a9c Adds some tests for dart::bin::Directory.
R=asiva@google.com

Review URL: https://codereview.chromium.org/2277883005 .
2016-08-25 12:47:41 -07:00
Ryan Macnak aa38062a23 Add WebSocket.addUtf8Text to allow sending pre-encoded text without a round-trip UTF-8 conversion.
Use it to implement the vm-service, where in particular we are concerned about the space overhead of the conversion leading to the process being killed on iOS.

Closes #27129

R=johnmccutchan@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/2260073002 .
2016-08-24 16:15:07 -07:00
Zachary Anderson 57bff322cd Ignore non-UTF8 strings in the environment
R=asiva@google.com

Review URL: https://codereview.chromium.org/2273053002 .
2016-08-24 10:10:41 -07:00