Commit graph

151 commits

Author SHA1 Message Date
Ryan Macnak
d366f9619a [vm] Toward deterministic builds.
- Remove random build-id.
 - Replace build time in embedded version string with commit time.
 - Remove timestamps from Observatory tarball.
 - Zero-initialize skipped bytes in snapshot streams.
 - Fix uninitialized fields in PatchClass, Script and Library.
 - Disable (under flag) random identity hashes and concurrent GC.

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I3e95de679c8372841cd27ca60df78d9b00ffbfe1
Reviewed-on: https://dart-review.googlesource.com/22901
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-23 00:07:56 +00:00
Alexander Aprelev
d822bdb797 Prefix scripts from core builtin libraries so the URIs are unique.
After https://dart-review.googlesource.com/c/sdk/+/7588 we ended up with two crypto.dart files in the core prebuilt libraries(io and _http), which caused problem with coverage tool that relied on the fact that script uris can uniquely identify files. https://github.com/dart-lang/coverage/issues/194 was filed to handle non-unique uris.
This CL ensures that core builtin libraries URIs stays unique by prefixing them with 'dart:' library prefix. This makes core builtin libraries scripts have names similarly structured to script names for other core libraries.

Bug:
Change-Id: I79960f4f24e6e958836df866365355584c28df27
Reviewed-on: https://dart-review.googlesource.com/11140
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-05 15:47:43 +00:00
Zach Anderson
783f1e8c04 [infra] Remove dependency on gyp
R=rmacnak@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/3003433002 .
2017-08-18 08:51:40 -07:00
Zach Anderson
0394d3a0cf [infra] Begin removing gyp
This CL begins removing gyp from Dart's tree.

Removing gyp will go in three stages:
1. Remove unused .gyp and .gypi files.
2. Translate *_sources.gypi files to *_sources.gni files
3. Remove //third_party/gyp from DEPS

This CL is stage 1.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2992593002 .
2017-08-04 22:19:35 -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
Jonas Termansen
742822af73 Fix runtime/tools/bin_to_assembly.py not setting symbol type and size.
The absence of symbol sizes broke build comparison that looks for and
ignores snapshots. Add symbol types for good measure to match the compiler
behavior.

Consider unknown operating systems to use as(1)-style assembly, which is
generally true. If an unknown operating system uses another syntax, the
generated files will fail to assemble and the porter should soon find
this script and add support for their operating system.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2939013002 .
2017-06-15 13:40:46 +02:00
Ryan Macnak
812c3423bc core-jit:
Adjust compilation trace format to be plain text friendly.
  Avoid writing functions we can't lookup in the trace.
  Fix tear off fuzzy matching.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2924013004 .
2017-06-08 16:04:29 -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
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
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
Erik Corry
fc2fcf9bc8 Add more safe points in compiler.
The Scavenge (young-gen) GCs on the main thread have to wait for other
threads to check in at a safe point. We were seeing big waits here, often
20ms, occasionally up to 180ms where the main thread is idling, waiting
for the optimizing compiler.  By adding more safe points the wait is
reduced and is now rarely over 10ms, often under 1ms.

This also changes the --verbose-gc output to be better aligned with the
column headings, and to add the time needed to get to
the safe point to the output, eg:

[ GC(784211551): Scavenge(new space), 18, 2.209, 76.009, 32768, 0, 32768, 32768, 0, 0, 144912, 154425, 152064, 154880, 0, 0, 46.984, 2.752, 7.407, 18.657, 0.033, 5421, 0, 0, 0, ]
                                                 ^^^^^^ Scavenge time                                                        ^^^^^^  safe point time.

R=vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2771013002 .
2017-03-31 11:19:46 +02:00
Jacob Richman
4360e99d18 Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Committed: 62be0eacfb
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-21 10:07:26 -07:00
Jacob Richman
62be0eacfb Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-20 22:19:22 -07:00
Jacob Richman
88f8aacd5f Re-apply rolled back CL to apply dartfmt to runtime.
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2759973004 .
2017-03-20 21:44:59 -07:00
Ryan Macnak
ea4744a06f Revert "Run dartfmt on all files under runtime."
This reverts commit 15f393f189.

The change caused many service test failures due to changed line numbers.

TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2762583003 .
2017-03-20 13:42:55 -07:00
Jacob Richman
15f393f189 Run dartfmt on all files under runtime.
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2751423005 .
2017-03-20 13:13:50 -07:00
Chris Bracken
c9442bb8a2 Unset GREP_OPTIONS when extracting processor count
If GREP_OPTIONS includes -n or --line-number, matches will be emitted
with a line number following the filename. Unset GREP_OPTIONS to ensure
we're getting expected output.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2721953004 .
2017-02-28 16:00:32 -08:00
Peter von der Ahé
00bed94e0c Fix various nits in VM patch files.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2705593002 .
2017-02-17 16:28:57 +01:00
Ryan Macnak
b6a9be6e39 Teach gen_snapshot how to create script snapshots if given a core snapshot to create them against.
Require an explicit --snapshot_kind option instead of inferring the desired snapshot kind from the combination of output file options.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2692223002 .
2017-02-15 14:28:35 -08:00
Florian Schneider
15a4d5d6d1 Windows: Link library sources into gen_snapshot/dart_bootstrap
This allows gen_snapshot and dart_bootstrap to run without having
a full SDK snapshot around.

The generated cc file looks like:

static const char source_array_1[] = {
 '\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
static const char source_array_2[] = {
 '\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
...

const char* dart::Bootstrap::core_source_paths_[] = {
 "dart:core",
 "/path/to/sdk/lib/core/core.dart",
 source_array_1,

 "annotations.dart",
 "/path/to/sdk/lib/core/annotations.dart",
 source_array_2,
...

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2668353004 .
2017-02-01 15:55:59 -08:00
Ryan Macnak
9eb216a495 Reapply "Create an app snapshot of the Dart front end."
Skip training on Windows, issue #28532.

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2665753002 .
2017-01-31 09:47:51 -08:00
Vyacheslav Egorov
a7ffe24177 VM: [Kernel] Switch to DFE for testing -c dartk configuration.
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2668503003 .
2017-01-31 18:25:02 +01:00
Vyacheslav Egorov
43a0500e37 VM: [Kernel] Fix bootstraping when Kernel isolate is used.
We must bootstrap from Kernel instead of Source when running with --dfe

BUG=
R=asiva@google.com, kustermann@google.com

Review-Url: https://codereview.chromium.org/2651633002 .
2017-01-30 20:52:59 +01:00
Ryan Macnak
728f460798 Revert "Create an app snapshot of the Dart front end."
This reverts commit 8c7111c967.
This reverts commit 27c8e59d2e.

Review-Url: https://codereview.chromium.org/2657123002 .
2017-01-26 17:42:25 -08:00
Ryan Macnak
8c7111c967 Create an app snapshot of the Dart front end.
R=asiva@google.com, hausner@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2655173002 .
2017-01-26 16:28:59 -08:00
Ryan Macnak
b46af1e75f Refactor snapshots pieces to include a section for loading instructions into the heap of a regular isolate.
Progress toward allowing each isolate to load a different snapshot.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2622053002 .
2017-01-23 10:25:02 -08:00
Zachary Anderson
375322d3ab GN: Add option to build with TSAN
fixes #28216

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2614493002 .
2017-01-03 14:37:27 -08:00
Kasper Lund
53dd819a4c Cleanup the kernel service implementation and avoid printing on the console when no tracing flags are provided.
R=kmillikin@google.com, hausner@google.com
BUG=

Review-Url: https://codereview.chromium.org/2570483003 .
2016-12-13 09:08:10 +01:00
Matthias Hausner
f5ab173c77 Add Kernel Isolate, second attempt
To run a script with the Dart->Kernel parser, use the -dfe option:

dart --dfe=runtime/tools/kernel-service.dart  --packages=/src/d2/sdk/.packages  foo.dart

The front end expects a directory named patched_sdk in the build directory (patched_sdk should be a sibling of the directory that contains the dart executable.)

Warning: using a debug build dart executable is very slow. It takes 2 minutes to run Hello World in a debug build, and about 7 seconds in a release build.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2558673002 .
2016-12-07 09:11:16 -08:00
Matthias Hausner
2ea399285a Revert "Add Kernel Isolate"
This reverts commit c9399fc557.

The change broke Dartium and Fuchsia.

BUG=

Review URL: https://codereview.chromium.org/2554953004 .
2016-12-06 14:17:09 -08:00
Matthias Hausner
c9399fc557 Add Kernel Isolate
To run a script with the Dart->Kernel parser, use the -dfe option:

dart --dfe=runtime/tools/kernel-service.dart  --packages=/src/d2/sdk/.packages  foo.dart

The front end expects a directory named patched_sdk in the build directory (patched_sdk should be a sibling of the directory that contains the dart executable.)

Warning: using a debug build dart executable is very slow. It takes 2 minutes to run Hello World in a debug build, and about 7 seconds in a release build.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2483373002 .
2016-12-06 12:23:09 -08:00
Zachary Anderson
63cb4565d7 Fuchsia: Adds a script to download the prebuild SDK
The Fuchsia world doesn't run gclient runhooks or use depot_tools so
the advice is to check in a custom script to pull the prebuilt SDK
from google storage.

R=asiva@google.com, phosek@chromium.org, rmacnak@google.com

Review URL: https://codereview.chromium.org/2541123006 .
2016-12-02 13:18:54 -08:00
Jonas Termansen
3676af3168 Ensure consistent file ordering in observatory tarball
R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/2545783002 .
2016-12-01 16:01:09 +01:00
Adam Barth
0ea1c155ae Fix the Fuchsia build
Python scripts need to be marked executable to run in the Fuchsia build.

TBR=zra@google.com
2016-10-27 09:59:58 -07:00
Vyacheslav Egorov
eb8c24e133 Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Vyacheslav Egorov
12968edb9c Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
This reverts commit 4e7a31262e.

Windows bots are broken now.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov
4e7a31262e Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov
cf7ff42e60 Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This reverts commit 2fed1c3905.

SDK builds are failing

TBR=zra@google.com

Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov
2fed1c3905 Merge more Kernel infrastructure from kernel_sdk SDK fork.
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
  Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
  not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.

- bring test script modifications that allow to test Kernel pipeline

BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Siva Annamalai
e9bd78fa8e Fix build break, set initial value for msan variable.
R=zra@google.com

Review URL: https://codereview.chromium.org/2388813003 .
2016-10-03 12:45:45 -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
5475ab6fbb Fuchsia: Builds run_vm_tests and a wrapper program for running it.
This CL adds rules to the GN build for building run_vm_tests for
Fuchsia. It also adds a wrapper program in
//runtime/bin/run_vm_tests_fuchsia.cc and a file containing the
output of 'run_vm_tests --list', //runtime/bin/fuchsia_vm_tests.txt.
The wrapper program and text file make it easier to run the tests
on Fuchsia, and should be able to go away once we are out of the
bootstrapping phase.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2187153003 .
2016-07-28 10:35:25 -07:00
Zachary Anderson
0fae540223 Add runtime/bin/thread_fuchsia that binds to fuchsia's pthreads
Fuchsia provides pthreads so the linux implementation almost works
except that fuchsia does not (currently) provide the clock_gettime clock
for CLOCK_THREAD_CPUTIME_ID.

Review URL: https://codereview.chromium.org/2154453002 .
2016-07-14 15:25:01 -07:00
Zachary Anderson
87e1fc7859 Add #! lines and +x scripts run by the build system
Landing https://codereview.chromium.org/2151053002/ for jamesr.

Review URL: https://codereview.chromium.org/2152913002 .
2016-07-14 12:46:57 -07:00
Siva Annamalai
53c20930d1 Add --packages option to gen_snapshot in order to accept package map files (see https://github.com/dart-lang/sdk/issues/26362)
BUG=26362
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2044673002 .
2016-06-06 17:12:20 -07:00
Zachary Anderson
a87fca4d0a Remove unused gyp variable
Review URL: https://codereview.chromium.org/1825233002 .
2016-03-22 14:31:54 -07:00
Zachary Anderson
27f5c1f81c Don't compile in root certs on Android.
This works by using SSL_CTX_load_verify_locations in
SecurityContext._trustBuiltinRoots() to specify
/system/etc/security/cacerts as the certificate directory.

This saves about 240KB from a stripped ProductAndroidARM build.

This has the drawback that SSL_do_handshake will synchronously
hit the filesystem looking for root certs during its trust evaluation.
We call SSL_do_handshake directly from the Dart thread so that Dart
code can be invoked from the "bad certificate" callback called by
SSL_do_handshake. If there was no need to support this callback,
it would be easier to move the handshake to the IOService thread, and
thus remove the compiled-in certs without the need for blocking IO
on the Dart thread.

R=whesse@google.com

Review URL: https://codereview.chromium.org/1811583003 .
2016-03-22 09:30:04 -07:00
Ivan Posva
8d18298fed - Remove Isolate::Flags structure and store flags directly in isolate.
- Make enable_asserts, enable_type_checks, error_on_bad_override and
  error_on_bad_type release mode flags only.

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1737693003 .
2016-02-25 18:06:56 -08:00
Ivan Posva
9c0c6cb5c2 Add product mode:
- Add PRODUCT define and build mode to gyp configurations.
- Add product mode to test harness.
- Start to unify list of flags.
- Allow flags to be constant for particular build configurations.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1663863002 .
2016-02-03 21:10:30 -08:00
Zachary Anderson
80f358dede Adds targets for simarmv6 and armv6
related #25562

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1624593002 .
2016-01-22 13:07:48 -08:00