This allows bloaty to attribute functions (but not variables) written in assembly to their source file. Which in turn allows the binary_size visualization to group, e.g., all the boringssl crypto kernels under boringssl instead of them all appearing at the top level.
Change-Id: I6f601f44931d6c3d2fe2018a43804b070643fba5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486520
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Drop libprotobuf dependency and update compile_perfetto_protos
to rely on externally provided protoc and protozero_plugin.
This is done because protoc does not build with our current
toolchain and fixing this build requires rolling new protobuf,
protobuf_gn and perfetto. Which also pulls more external dependencies
like abseil.
Regenerate Perfetto *.pbzero{.cc,.h}, *.dart files
TEST=ci
Change-Id: I11a32aa07e810b48ac12502e526bbaee6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482781
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
- copy sanitizer runtime when using ubsan;
- avoid use of winnt.h CONTAINING_RECORD since it triggers ubsan "member access within null-pointer of type" error, use our copy which uses `offsetof`;
- have default virtual destructor in `ValueObject` to avoid ubsan complains about "insufficient space for an object of type 'dart:ValueObject'" at NoTemporaryAllocator use/declaration site;
- have virtual destructor in ZoneAllocated to avoid ubsan complains about "not having enough space to allocate object" at new RegExpEmpty() instantiation site;
- avoid using crashpad with ubsan as it causes dartvm to exit with error code 3;
- switch to windows, mac-friendly `[[gnu::no_sanitize(check)]]` from `__GNUC__` and `__has_feature` checks.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/62267
Change-Id: I8b922a8da329af276d4cefaa88fb841cc0457124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469840
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
We bumped NTDDI_VERSION to Windows 10 but have not updated WINVER in
the same way making them diverge for no good reason.
FWIW NTDDI_VERSION should probably be set by winver config, but I am
not going to fix that now.
Change-Id: I53cdf1cde40aa50911aa1311ca15705d6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471181
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This CL tries to address version skew issues which occur in internal
monorepo which we created by checking in *.pbzero.h files into
runtime/vm/protos/*. These files refer to protozero internal headers,
which in the internal monorepo come from a shared Perfetto dependency
which does not necessarily match the version we pinned in our DEPS and
used to generated these files.
This version skew caused problems for the Perfetto team, see
https://github.com/google/perfetto/pull/3195
To resolve this change layout of our repo to allow us to depend on the
shared Perfetto entirely - including its version of *.pbzero.h headers.
We change include paths in the VM source to
#include "third_party/perfetto/protos/..."
which match location of these headers in the internal monorepo.
To make the code compile in the normal SDK checkout we shift location of
Perfetto and checked in code:
* Perfetto source moves from third_party/perfetto to
third_party/perfetto/src.
* Generated code moves from runtime/vm/protos into
third_party/perfetto/protos.
Note: experiments show that *.pbzero.h files tree-shake very well and
you pay only for things that you use. That means depending on *.pbzero.h
files generated from full message definitions rather than our manually
tree-shaken versions does not actually increase the size of the VM
binaries. We could switch our external build to do the same but this
would make protoc a build time dependency, which seems excessive.
TEST=ci
Change-Id: I724b9d9304be83302a5d83c2337154b36a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454260
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Sanitizers can pickup configuration and suppressions via
special symbols in the binary (e.g. __*_default_suppressions and
__*_default_options). We have a bunch of stale files in the
buildroot which showed how to do it, but none of these were
actually used by the build process.
Update our BUILDCONFIG.gn to actually link this code into
the binaries and clean it up leaving behind only one relevant
suppression for TSAN.
Additionally fix libplatform targets - libdart_platform_no_tsan was
accidentally disabling TSAN for the whole libplatform by adding
no_tsan_config into public_configs instead of extra_configs.
This is needed to unblock landing https://dart-review.googlesource.com/c/sdk/+/444983
TEST=manually with the referenced CL to verify that suppressions work
Cq-Include-Trybots: luci.dart.try:vm-tsan-linux-release-x64-try,vm-tsan-linux-release-arm64-try
Change-Id: Id4e8a5b89c665cf5d89b18c4f5881ef31c3c9396
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445941
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
- split the Dart CLI tool out of the VM into it's own embedder which
runs in AOT mode. The pure Dart VM executable is called 'dartvm' and
has no Dart CLI functionality in it
- the Dart CLI executable parses the CLI commands and invokes the rest
of the AOT tools in the same process, for the 'run' and 'test'
commands it execs a process which runs 'dartvm' to run
- 'dart hello.dart' execs the 'dartvm' process and runs 'hello.dart'
- the Dart CLI is not generated for ia32 as we are not shipping a
Dart SDK for ia32 anymore (support to execute the 'dartvm' for ia32
architecture is retained)
- the Dart CLI tool is not built in the internal Dart SDK builds
TEST=ci
Some performance improvement numbers
'dart format pkg/dartdev' goes from 1.17 secs to 0.22 secs
'dart doc pkg/dartdev' goes from 100.2 secs to 66.6 secs
'dart fix pkg/dartdev' goes from 19.3 secs to 14.5 secs
Change-Id: I66984a26cb2ab014b34dc1873f1f3d2884e13518
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364202
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Specify package_config.json when running DDC JIT snapshot training.
This allows the build to succeed in environments where the running
compiler would go searching for the package_config.json and find
one in some parent directory. This should fix local web engine
builds in Flutter which likely broke when the repo was migrated to a
pub workspace.
Change-Id: Ifb5b6357cbf40f04069020ab1b4aee099d0945ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438602
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Turns out that dart compile exe --depfile produces
depfile which does not work with ninja because
it uses absolute path to the output file
instead of using relative path.
So we can't use it directly and need to fix
depfile.
TEST=manually
Change-Id: I1aadfd5079cc38d392933f9afe333f63407bb295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435680
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
The name has always been annoying because it did not add strong typing. And now there aren't variants of the VM platform to distinguish.
Leave a copy at the old name to not immediately break illegal uses.
TEST=ci
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,flutter-frontend-try,flutter-linux-try
Change-Id: Ie76fa7f16940aa1ba8d582eb5197f0ae55dc8938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429828
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This reverts commit ad9a13a1c1.
Reason for revert: breaks Debian arm32 package
Original change's description:
> [build] Update to Focal sysroot.
>
> Our minimum supported version is Jammy, which Fuchsia doesn't have a CIPD package for, but at least we no longer need to use a different sysroot for different architectures.
>
> Change-Id: I90f37797c2f2f79886df85d6b7ed9903270e8c2a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433561
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I532c6052ba9bfe271f34bc18f6120eb80df98d6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433922
Auto-Submit: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Our minimum supported version is Jammy, which Fuchsia doesn't have a CIPD package for, but at least we no longer need to use a different sysroot for different architectures.
Change-Id: I90f37797c2f2f79886df85d6b7ed9903270e8c2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433561
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Switch build to use Clang. This somewhat degrades FFI testing, but reduces build time by roughly half or one hour.
Cq-Include-Trybots: luci.dart.try:pkg-win-release-arm64-try,vm-aot-win-debug-arm64-try,vm-aot-win-release-arm64-try,vm-win-debug-arm64-try,vm-win-release-arm64-try
Change-Id: Ie267942e99934312b228cfadcd6d5b8477f855c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This is a reland of commit 7ae1d75869
TEST=manual, no watchOS SDK on bots yet.
Original change's description:
> watchOS target os
>
> - add support for --os=watchos | --os=watchos_simulator
> - do not depend on perfetto if dart_support_perfetto is false
> - change the default value for dart_support_perfetto to !is_watchos
>
> To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
>
> TEST=manual, no watchOS SDK on bots yet.
>
> Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
> Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Change-Id: I2b50f7eb4da173627aeb4833b88a08712b278d9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425523
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This reverts commit 7ae1d75869.
Reason for revert: breaks flutter build
Original change's description:
> watchOS target os
>
> - add support for --os=watchos | --os=watchos_simulator
> - do not depend on perfetto if dart_support_perfetto is false
> - change the default value for dart_support_perfetto to !is_watchos
>
> To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
>
> TEST=manual, no watchOS SDK on bots yet.
>
> Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
> Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I4bede9ede04ac3c533b8ff7ae2f1adbd84eb2397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425262
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
- add support for --os=watchos | --os=watchos_simulator
- do not depend on perfetto if dart_support_perfetto is false
- change the default value for dart_support_perfetto to !is_watchos
To minimize changes and to avoid modifying third-party zlib BUILD file, is_watchos implies is_ios for now.
TEST=manual, no watchOS SDK on bots yet.
Cq-Include-Trybots: luci.dart.try:vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Change-Id: If2130068ef546162a07a9ba53f94b11ff25fb565
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Ninja may be run with a large --jobs value to run more C/C++ compilation actions in parallel on remote workers. The dart and gen_snapshot actions during the build should in this case remain limited to the number of cores on the machine to avoid a coincident memory usage that is too high.
When running in the Dart tree with RBE, limit this by changing the RBE exec_strategy away from racing. Otherwise, use a pool to limit the concurrency of this action type.
TEST=build.py --no-rbe -j1000
Bug: https://github.com/flutter/flutter/issues/164591
Change-Id: Ia5e5615d0067b34d49871f26ead074cb891baf70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423562
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Copied from http://go/dart-reviews/421761 with the essential fix to
make it work.
1) Add the env to select the right readelf.
2) Remove the removal of arch/, it's referred by meta.json.
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try,vm-fuchsia-release-arm64-try
Bug: b/407890258, b/338009514
Change-Id: Ib7ae646e57082d310d3d76ca16834faefb888201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421881
Auto-Submit: Zijie He <zijiehe@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
HWASAN tags stack regions (and stack pointers) with 0,
but also selectively tags some stack allocations with
non-zero tags. These tags need to be cleared when
allocation goes out of scope so that stack can be
later safely reused - otherwise stale tags confuse
HWASAN instrumentation later.
This CL teaches Exceptions::JumpToFrame to do that.
CL also adds basic build changes to support building
with HWASAN, though I don't wire it into CI for now
as it can only really run on Android ARM64
TEST=manually on Android phone and on internal tests
Bug: b/374433249
Change-Id: I678443dc1de693c999a226bee0d71a6f3582d4f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421180
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>