Commit graph

65 commits

Author SHA1 Message Date
Siva Annamalai af550c9b6c Revert "Revert "1. Remove unused dart debugger API entrypoints which are not used anymore""
This reverts commit e76ea5b604.

1. Remove unused dart debugger API entrypoints which are not used anymore
   as this API has been deprecated and dartium was the last user.

2. Some unit tests are using some of these API entrypoints, so moved them
   over to a test file which will be linked into run_vm_tests

Change-Id: I5a486b98e4b97eb4df2e58d9cc0ba603e96c2e32
Reviewed-on: https://dart-review.googlesource.com/11180
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-10-04 20:19:22 +00:00
Siva Annamalai e76ea5b604 Revert "1. Remove unused dart debugger API entrypoints which are not used anymore"
This reverts commit c30918f11e.

Bug:
Change-Id: I6d5f037868a967a9f4fcabc1ecb20f34e957036a
Reviewed-on: https://dart-review.googlesource.com/8403
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-26 02:20:55 +00:00
Siva Annamalai c30918f11e 1. Remove unused dart debugger API entrypoints which are not used anymore
as this API has been deprecated and dartium was the last user.

2. Some unit tests are using some of these API entrypoints, so moved them
   over to a test file which will be linked into run_vm_tests

Change-Id: I3343b23d082400da3c803cf81ea80dfaa5e426cf
Reviewed-on: https://dart-review.googlesource.com/7942
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-09-26 01:00:01 +00:00
George Kulakowski 7800d2a995 Rename Magenta to Zircon, along with related abbreviations
Change-Id: Ic4215ceb00f5a60d21ec1398fd398a9f78a9eb94
Reviewed-on: https://dart-review.googlesource.com/6100
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-15 14:54:18 +00:00
Zachary Anderson 734beef062 [infra] Translate _sources.gypi files to _sources.gni files
Also deletes code that becomes dead as a result.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2996903002 .
2017-08-14 21:54:36 -07:00
Zachary Anderson 80f096fb6c Add missing config to libdart_jit
It was dropped by mistake by an earlier commit and broke the Flutter
build.

R=aam@google.com

Review-Url: https://codereview.chromium.org/2984503002 .
2017-07-17 15:35:58 -07:00
Zachary Anderson fa859c507f Add libdart PRODUCT targets for Fuchsia's dart_runner
R=rmacnak@google.com

dart:hello_dart.dartx memory footprint: 6292k -> 5572k
Review-Url: https://codereview.chromium.org/2975343002 .
2017-07-15 21:43:50 -07:00
Ryan Macnak be95b916dd GN: Change the default meaning of dart_target_arch from current_cpu to target_cpu.
Update args.gn for the simulator builds to compensate.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2980023002 .
2017-07-13 14:59:35 -07:00
Zachary Anderson b3200f4664 [Fuchsia] Routes timeline events to Fuchsia's tracing app
This CL routes timeline events to Fuchsia's tracing app when the
following arguments are passed to the VM:

--systrace_timeline
--timeline_recorder=systrace
--timeline_streams=[some streams here]

I'll add these arguments to the Flutter engine for Fuchsia after this
CL lands.

TO-367

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2977513002 .
2017-07-11 14:12:27 -07:00
Zachary Anderson 1a8174b08d Exclude Observatory assets from PRODUCT build dart, dart_precompiled_runtime
This CL also removes some compiler flags that increase space somewhat
that help the profiler find symbols, which isn't included in a PRODUCT
build.

Before:
zra@zach:~/dart/sdk$ ls -la out/ProductX64/exe.stripped/
-rwxr-x--- 1 zra eng  9693064 Jun 29 14:52 dart
-rwxr-x--- 1 zra eng  7391080 Jun 29 14:52 dart_precompiled_runtime

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

After:
-rwxr-x--- 1 zra eng  6809424 Jun 29 15:11 dart
-rwxr-x--- 1 zra eng  3299120 Jun 29 15:11 dart_precompiled_runtime
Review-Url: https://codereview.chromium.org/2964133002 .
2017-06-30 08:09:37 -07:00
Ryan Macnak f1b7e8ed8c Add gdb helper functions for creating a handle and using ToCString with RawObjects.
Improves gdb debugging when Object::Handle() is optimized away.

Replace some intermediate static_libraries with source_sets to fix export issue.

R=regis@google.com, vegorov@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2957843002 .
2017-06-29 14:31:44 -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
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
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 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
Zachary Anderson 135b1907ee [Fuchsia] Grab the number of malloc'd bytes from jemalloc
This allows us to report the "native heap memory" value in
the Observatory for VMs running on Fuchsia.

This change also renames the flag --enable-malloc-hooks to
--profiler-native-memory to better reflect what the flag
does. (In the future we may also want to rename
--profiler to --profiler-cpu.)

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2829833003 .
2017-04-19 15:51:02 -07:00
Ryan Macnak 00c2af904f GN: Remove dead target 'libdart' and dead flag 'dart_experimental_interpreter'.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2819453002 .
2017-04-12 16:05:37 -07:00
Ryan Macnak 42ec925a9e GN: Add libdart_jit and dart_api.
libdart_jit is always the JIT, unlike libdart which is either the JIT or AOT runtime depending on dart_runtime_mode. Clients of libdart will be updated to explicitly choose libdart_jit or libdart_precompiled_runtime.

dart_api allows libraries such as tonic or intermediate components of the Flutter engine to be agnostic as to whether they're in a JIT or AOT runtime, allowing the final executable making the choice without having to deal with a conflicting dependency brought in by a library.

Remove dead libdart_embedder_noio.

Replace all used of dart_nosnapshot* with dart_nosnapshot_with_precompiler*. We don't care about binary size of their clients, so it's better to have fewer targets.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2814513003 .
2017-04-10 13:44:25 -07:00
Ryan Macnak 9575657668 AOT compiler changes for dart_content_handler:
- Move some misplaced entry points from the vm list to the standalone embedder list.
 - Add missing libdart_with_precompiler to GN.
 - Add ability to reference the root library in treeshaking roots without knowing its URI (as ::).

R=zra@google.com

Review-Url: https://codereview.chromium.org/2786483002 .
2017-03-29 10:12:05 -07:00
Ryan Macnak 9f2668c998 Set TARGET_OS_* from GN, falling back to HOST_OS_*.
Use TARGET_OS_* instead of HOST_OS_* to decide on the assembly variant to use. Allows, say, a gen_snapshot compiled for a Mac to target Android when generating AOT as assembly.

R=fschneider@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2757783003 .
2017-03-20 14:48:28 -07:00
Ben Konyi f679b3c3e5 Reintroducing MallocHooks changes with fix for hooks being called when in execvpe after a fork while the MallocHooks lock is held by a thread that may no longer exist.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2647283004 .
2017-01-30 09:55:20 -08:00
Martin Kustermann 4e34234c28 Add support for configurable -OX optimization levels for debug builds
Can be used via -dX or --debug-opt-level=X, e.g.

  tools/gn.py --mode=debug --arch=x64 -d0

R=vegorov@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2645323002 .
2017-01-24 17:36:37 +01:00
Zach Anderson 7730809f36 Revert "Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit."
This reverts commit 7bf5d87017.

The lock introduced by this change in MallocHooksState is held across
a fork(), which causes deadlock in the child when execvpe() fails and
tries to acquire the lock when freeing memory.

Review-Url: https://codereview.chromium.org/2647793005 .
2017-01-20 23:52:31 -08:00
Ben Konyi 7bf5d87017 Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2643303003 .
2017-01-20 15:26:58 -08:00
Ben Konyi c9a4374ed9 Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
This reverts commit 5290052550.

Revert "Fixed segfault in Remove method."

This reverts commit 203f1ba222.

BUG=
TBR=zra@google.com

Review-Url: https://codereview.chromium.org/2647763003 .
2017-01-19 15:17:29 -08:00
Ben Konyi 5290052550 Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
Fixed build issues from original submission.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2623613003 .
Review-Url: https://codereview.chromium.org/2644903003 .
2017-01-19 13:15:56 -08:00
Ben Konyi 10686766cd Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
This reverts commit bcd7ba1056.

TBR=zra@google.com

BUG=

Review-Url: https://codereview.chromium.org/2645973002 .
2017-01-19 12:14:19 -08:00
Ben Konyi bcd7ba1056 Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2623613003 .
2017-01-19 12:09:07 -08:00
Florian Schneider bef4967ea1 Remove dart_noopt and related parts from the VM.
dart_noopt is not needed anymore because we have testing
and builbot integration of the real precompilation pipeline in place now.

Fixes #24569
Fixes #25726
Fixes #25845

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2624393002 .
2017-01-11 16:55:55 -08:00
Ryan Macnak ccd6cc7fc5 Change GN debug builds to use -O2, which is the value used by GYP.
Running the language tests in debug mode, I got the following times
GYP -O2 1:50
GN -O1 4:48
GN -O2 1:55

R=zra@google.com

Review-Url: https://codereview.chromium.org/2614003003 .
2017-01-09 09:09:40 -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
Zachary Anderson 566ed7ff55 GN: Fix armsimdbc target. Add armsimdbc64
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2596333002 .
2016-12-22 10:24:24 -08:00
Zachary Anderson 8606013647 GN: Removes libdart_nosnapshot_precompiled_runtime
It doesn't make sense, and building its build is broken.

Review URL: https://codereview.chromium.org/2504343002 .
2016-11-16 08:57:17 -08:00
Zachary Anderson c1b08a0b97 GN: Try to fix Linux build on bots
Review URL: https://codereview.chromium.org/2449213003 .
2016-10-26 10:48:14 -07:00
Zachary Anderson c1313a5ec7 Format GN files and add a presubmit check that GN is properly formatted
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2451613005 .
2016-10-26 08:50:54 -07:00
Zachary Anderson 4ab6c33d9a Enable GN ASAN builds for Linux
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2392403002 .
2016-10-05 13:43:29 -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
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
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
Florian Schneider 9a68bad6fd During generation of the version.cc file, read the current Git hash.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2206953004 .
2016-08-03 14:16:39 -07:00
Ryan Macnak 8fef08717f GN: Don't complain about dart_runtime_mode == "profile" + dart_debug (AOT with asserts).
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2168263002 .
2016-07-22 09:58:23 -07:00
Zachary Anderson e27b49fc80 [fuchsia] GN build support for Fuchsia OS and fuchsia_test target
This adds a GN target for the 'fuchsia_test' executable and teaches
the GN build about is_fuchsia. Key differences:

*) There's not currently a dart:io implementation for Fuchsia
*) Fuchsia's toolchain currently doesn't support (or need) ldl or lpthread
*) Fuchsia's buildconfig doesn't currently set the is_asan variable

Review URL: https://codereview.chromium.org/2149953003 .
2016-07-14 15:01:30 -07:00
Ryan Macnak 85cdc0eac2 Don't assume we want the iOS ABI if running simarm on Mac and the EABI otherwise.
Allow controlling the target ABI by defining TARGET_ABI_IOS or TARGET_ABI_EABI.  If neither is defined, default to the previous behavior.

Make Linux, Mac, Android and iOS agree on the value of PreferredCodeAlignment for all architectures.

BUG=http://dartbug.com/26464
R=zra@google.com

Review URL: https://codereview.chromium.org/1982613003 .
2016-05-17 15:03:54 -07:00
Chinmay Garde 269bcf9bf8 GN file updates to support using dbc.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1953173002 .
2016-05-05 17:08:03 -07:00
John McCutchan 0cfd4f5cd5 GN Build fixes for Flutter + gen_snapshot fix
1. Add "dart_runtime_mode" GN argument. This is an enum with three valid values: "release", "profile", and "develop".
   *) "release" builds product precompiled-runtime.
   *) "profile" builds non-product precompiled-runtime.
   *) "develop" builds non-product non-precompiled-runtime.

2. Remove the redundant "dart_product" GN argument.

3. Kill all *precompiled_runtime static library variants and the related config.

4. Always include the precompiler in gen_snapshot.

5. Support multiple --embedder_entry_points_manifest arguments to gen_snapshot.

6. Update our test harness to use gen_snapshot and pass the same kinds of command line arguments the Flutter folks are using.

7. ASSERT that both DART_PRECOMPILED_RUNTIME and DART_PRECOMPILER are not set at the same time.

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

Review URL: https://codereview.chromium.org/1903583002 .
2016-04-22 07:00:03 -07:00
Zach Anderson a7295bbb2a Fixes DBC build for Mac
Also, adds an option to the GN build for DBC

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1910453003 .
2016-04-20 14:38:49 -07:00
Ryan Macnak d1c044c5a1 Enable DART_PRECOMPILER on all platforms so AOT compilation can be used on Android
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1899953002 .
2016-04-18 17:03:11 -07:00