Commit graph

47300 commits

Author SHA1 Message Date
Rob Seymour
33cd10d745 Add JSON module graph to dist
Test: m json-module-graph dist nothing
Change-Id: I2a8a89cc5fb767365c9ba92dccc4509c41c6bbb5
2022-03-02 23:12:37 +00:00
Treehugger Robot
7afffe6af0 Merge "Allow UWB to use Rust in reference HAL" 2022-01-28 22:08:36 +00:00
Treehugger Robot
52ef4c3373 Merge "Limit JIT tier for javac" 2022-01-28 21:59:05 +00:00
Jared Duke
0849c14aea Limit JIT tier for javac
javac is generally a short-lived JVM invocation that doesn't greatly
benefit from deep JIT tiering. As such, favor faster startup time
by limiting to tier 1 JIT for javac execution. This should greatly
reduce overall CPU usage from Java compilation for an arbitrary
Android build (~20%), and deliver a small but modest improvement in
overall Java build times (~5%).

Representative incremental build times with this change:
  * real 18m3.507s
  * user 563m4.838s
and without:
  * real 19m11.909s
  * user 751m27.790s

Follow-up changes will apply similar flags for other short-lived JVM
build commands.

Bug: 205303544
Test: m
Change-Id: Ic6315b976063f4330902930a6cf5e5cb394c554c
2022-01-28 11:39:47 -08:00
Keyi Gui
0107901dec Merge "Add new file name to output inputs/outputs of actions of modules into a new file when m json-module-graph is executed." 2022-01-28 14:39:31 +00:00
Pedro Loureiro
e4c255cb04 Merge "Add special case for test-only module in configuredJars method" 2022-01-28 09:50:36 +00:00
kgui
67007248a5 Add new file name to output inputs/outputs of actions of modules into a new file when m json-module-graph is executed.
And also delete the logic in droidstubs to output JSONDataActions.

Test: local.

Change-Id: Ib5d6f1f69c16c41f128e481131775c7699f96464
2022-01-28 13:52:50 +08:00
Treehugger Robot
c7afdefa26 Merge "Add option to generate BTF debug info for bpf programs" 2022-01-28 01:51:05 +00:00
Chih-hung Hsieh
7892c6d76d Merge "Add tidy.md document" 2022-01-27 23:07:25 +00:00
Treehugger Robot
cd22b62add Merge "Revert "Reland "Enable hwasan use after scope detection.""" 2022-01-27 22:54:24 +00:00
Treehugger Robot
428d5ad909 Merge changes I728208ed,Ifdb50809
* changes:
  [cc] Add per-file OWNERS for cc/coverage.go
  [cc/coverage] Override/disable -Wframe-larger-than
2022-01-27 22:17:29 +00:00
Treehugger Robot
6bf833f428 Merge changes from topic "musl_rust"
* changes:
  Support building rust modules against musl libc
  Support genrules as CrtBegin and CrtEnd in rust
  Support multiple crtbegin and crtend dependencies
2022-01-27 21:39:18 +00:00
Connor O'Brien
2573965c5e Add option to generate BTF debug info for bpf programs
Add "btf" option that generates BTF debug info to support easier map
inspection. This is accomplished by passing the "-g" flag to clang
when compiling the BPF program.

The "-g" option also generates a number of DWARF debug sections which
are not necessary for loading BTF information, so strip these to avoid
increasing file size unnecessarily. bpfloader currently only supports
BTF info for maps, not programs, so we also strip the .BTF.ext section
containing program BTF info.

Bug: 203823368
Test: libbpf_load_test
Test: verify time_in_state.o includes .BTF section iff "btf: true" is
set
Test: verify time_in_state.o still loads if BTF is enabled
Change-Id: Ica25b253bace59d04130b0210350188399889bbe
Signed-off-by: Connor O'Brien <connoro@google.com>
2022-01-27 12:00:45 -08:00
Chih-Hung Hsieh
22c27e8458 Add tidy.md document
Test: make
Change-Id: Ic2198532be4135401faffdda34d0e108c57b241c
2022-01-27 11:02:17 -08:00
Pirama Arumuga Nainar
0d7d3e1647 [cc] Add per-file OWNERS for cc/coverage.go
Test: N/A
Change-Id: I728208ed9ef10e032fd12e495ba67121e4c849e5
2022-01-27 10:49:13 -08:00
Pirama Arumuga Nainar
f776c8c47c [cc/coverage] Override/disable -Wframe-larger-than
We can expect frame size increase with coverage instrumentation.

Test: N/A
Change-Id: Ifdb50809c83939ded5a26804aa0ae9404eb1a107
2022-01-27 10:47:55 -08:00
Pirama Arumuga Nainar
1785fcb171 Merge "[rust/coverage] Remove obsolete WAR to pass -z,start-stop-gc" 2022-01-27 18:37:40 +00:00
Pirama Arumuga Nainar
7ac26891cf Merge "[docs] Add README for native code coverage" 2022-01-27 18:29:12 +00:00
Trevor Radcliffe
13ae63c7e3 Merge "Remove res and assets in androidmk if default" 2022-01-27 14:53:14 +00:00
Sam Delmerico
2882dcb74b Merge "product variables are consumed via soong injection" 2022-01-27 14:31:08 +00:00
Sam Delmerico
af20c7cad1 Merge "build device binary for java_test_host" 2022-01-27 14:30:39 +00:00
Pirama Arumuga Nainar
2b34678ce2 [docs] Add README for native code coverage
Publish internal doc at go/android-native-coverage-local-workflow to
AOSP so it's available publicly.

Also add OWNERS for this file.

Test: N/A
Change-Id: I8d25e840b83294e90743d1cb8ff8d86a4579e34a
2022-01-27 05:16:45 +00:00
Yi Kong
a86875eefb Merge "Add tests for afdo.go" 2022-01-27 04:27:28 +00:00
Florian Mayer
fd337b3963 Revert "Reland "Enable hwasan use after scope detection.""
This reverts commit 0edaddf2ce.

Reason for revert: b/http://b/214007768

Change-Id: I60a2e3a5386601992fcb5632c142dd28bdb611b2
2022-01-27 03:31:28 +00:00
Pirama Arumuga Nainar
668da23096 [rust/coverage] Remove obsolete WAR to pass -z,start-stop-gc
Bug: http://b/199203503

Rust's llvm-project source now includes  https://reviews.llvm.org/D97448
and we no longer need this workaround.

Test: m unicode-xid_test_src_lib and verify __llvm_prf_data section is
      present.
Change-Id: I0387bd3af8bfc765f3aba3b309bfbc7ef49d565d
2022-01-26 21:39:49 +00:00
Sam Delmerico
b3342ce580 build device binary for java_test_host
This commit adds support for a java_host_test that requires a target
binary to run. If the binary has host and target variants and is added
as a dependency in the `data` attribute, then the host variant is used.
Instead, we need a way to force the use of the target variant.

Bug: 182919153
Test: add code from aosp/1647282/1 && atest AuthFsHostTest
Change-Id: I68a6259b41a5e6809e1b82eec3122ffdf5067f56
2022-01-26 19:57:27 +00:00
Sam Delmerico
5c32bbf910 product variables are consumed via soong injection
Currently the list of product variables and whether they are arch-variant is
hard-coded. Instead, we can generate this data from the Soong Product_variables
struct and use soong_injection to consume it in Bazel.

Bug: 209801976
Test: m bp2build && build/bazel/ci/mixed_libc.sh
Change-Id: I8a91030950407a10832765f15eb010899d73da26
2022-01-26 19:26:09 +00:00
Liz Kammer
91ee673ccd Merge "Reverse order of tag and android module checks" 2022-01-26 18:53:40 +00:00
Pedro Loureiro
561c7765de Add special case for test-only module in configuredJars method
Same pattern used for com.android.sdkext / test_framework-sdkextensions

Test: m nothing
Test: also tried this with related CLs that make use of this
functionality

Bug: 195732042
Change-Id: I5adfb0e8650e2e262bf646e56b29965798d0a42f
2022-01-26 18:48:07 +00:00
Treehugger Robot
2d305010af Merge "[cc/tidy] Disable cert-err33-c" 2022-01-26 10:34:58 +00:00
Yi Kong
d5954a2a92 Add tests for afdo.go
Bug: 79161490
Test: presubmit
Change-Id: I686b5226aad5011ab30a0a105f8c7866cd610502
2022-01-26 17:46:33 +08:00
Yi Kong
3440d0d474 Merge "Sampling PGO deprecation" 2022-01-26 05:43:42 +00:00
Wei Li
a61dbd457e Merge "Add bp2build support for property "compressible" of apex module." 2022-01-26 01:37:09 +00:00
Treehugger Robot
f73658bdc6 Merge "[NFCI] Change llvm-ar '-format' to be '--format'." 2022-01-26 00:53:36 +00:00
Pirama Arumuga Nainar
5fc137b63b [cc/tidy] Disable cert-err33-c
Bug: http://b/216364337

This check warns when return values of standard-library functions
(including fprintf, snprintf) are not checked. Some of these warnings
turn to error when tidy_checks_as_errors in Android.bp.

Disable this for now and follow-up after compiler update to disable or
fix individual instances.

Test: Build with new compiler
Change-Id: I5af89b3f9cea4961c69708c51d22c510d478405b
2022-01-25 15:45:06 -08:00
Trevor Radcliffe
82cf9a7d4b Remove res and assets in androidmk if default
Test: new tests in androidmk_test and bpfix_test. Ran against file.
Fixes: 209019903
Change-Id: I5fc9005302c006b3205b4cbd04cef7c2aca40bc8
2022-01-25 23:10:21 +00:00
Matthew Maurer
2f90708221 Allow UWB to use Rust in reference HAL
Bug: 216358770
Change-Id: If0be032a248f6258232e2e47c489983b5416c536
2022-01-25 22:40:12 +00:00
Wei Li
f034cb4d7b Add bp2build support for property "compressible" of apex module.
Bug: 214466457
Bug: 207551677
Test: b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Test: b test //build/bazel/tests/apex:build.bazel.examples.apex.minimal_apex
Test: b test //build/bazel/tests/apex:build.bazel.examples.apex.minimal_capex

Change-Id: I6bf12c1b0c52d4486968bb430a67a3c3110766db
2022-01-25 19:42:43 +00:00
Mitch Phillips
ed0dd76eaa [NFCI] Change llvm-ar '-format' to be '--format'.
Upcoming versions of the toolchain (at least when I was locally testing)
drop support for the single-dashed argument type. Fixing this ahead of
time as to hopefully avoid the toolchain-release-blocking bug in future
:).

Bug: N/A
Test: Build the platform.
Change-Id: Ia2c6dcb19556f1979f9a6ecfd3a0ec58fb73e36e
2022-01-25 10:35:50 -08:00
Yi Kong
470f76f589 Sampling PGO deprecation
Everything is now switched over to AFDO, let's deprecate sampling PGO.

Keep the code around for a little while longer in case anything needs to
revert back.

Test: presubmit
Change-Id: Ibd838bbd0e1157343fcdc2eca40de5b99126fe6f
2022-01-26 02:34:34 +08:00
Jooyung Han
620dc3f4f9 Merge "Linkerconfig with namespace contribution" 2022-01-25 16:01:31 +00:00
Treehugger Robot
efdc4f4d42 Merge "Allow static binaries to enable AFDO" 2022-01-25 08:35:03 +00:00
Jooyung Han
e5b0a0a4a0 Linkerconfig with namespace contribution
APEX can contribute search paths to linker namespaces.

Bug: 216208308
Test: linkerconfig_diff_test
Change-Id: I3f9b85d7a491b9ac841b0e454c707b4d6c150654
2022-01-25 17:13:15 +09:00
Sorin Basca
eb76d218e9 Merge "Revert^2: "Setting Java 11 as the default version"" 2022-01-25 05:51:25 +00:00
Yi Kong
88e632e263 Allow static binaries to enable AFDO
The static() property is true for both static libraries and static
binaries. We should allow static binaries to enable AFDO.

Test: Enable AFDO for linker
Change-Id: I409fc9f764ea878f01dc42bb2e5c075219403009
2022-01-25 05:22:01 +00:00
Yi Kong
a1f50efd3a Merge "OWNERS: native toolchain team owns afdo.go" 2022-01-25 05:21:29 +00:00
Colin Cross
e32f093120 Support building rust modules against musl libc
Add a rust toolchain for musl libc, use std library built from source,
and add default dependencies on musl libc.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ic5ff4487db9693aeb08a13405f4d18465eecdc4b
2022-01-24 17:33:05 -08:00
Colin Cross
018cbebd71 Support genrules as CrtBegin and CrtEnd in rust
Musl will use a genrule output as a linker script in CrtBegin,
support genrules as Crt* dependencies.

This is equivalent to Ie384089d26459797d0b4b5fef84846507fc508ad
in cc.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ibc08fdcff7a6bca2a1ec05b781ce929080e211bd
2022-01-24 17:33:05 -08:00
Colin Cross
fe605e14ee Support multiple crtbegin and crtend dependencies
Musl libc with an embedded linker uses multiple crtbegin dependencies,
convert rust's CrtBegin and CrtEnd to lists.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ie843801e87b1f38ace84502d9e4f938a92ec1fa2
2022-01-24 17:33:05 -08:00
Liz Kammer
fe813c53a5 Merge "Delete toolchain_library" 2022-01-24 21:45:36 +00:00