summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-07-23Set MODULE_BUILD_FROM_SOURCE to disable module prebuilts when buildingMartin Stjernholm
linux_bionic targets. They can otherwise cause duplicate install rules in Soong in --skip-make mode. Test: env DIST_DIR=out/linux_bionic ./art/tools/dist_linux_bionic.sh \ -j40 com.android.art.host com.android.support.apexer Bug: 194171329 Ignore-AOSP-First: Fixes problem in sc-dev - will cherry-pick to AOSP. Change-Id: I91d31e258ddad255344fbde111ed8b1ac1423921
2021-06-26Initialize fragment_ and verbose_ fields in hiddenapi.ccPaul Duffin
Bug: 179354495 Test: m out/soong/hiddenapi-stub-flags.csv - make sure that no errors or warnings about missing information are output when building fragments. Merged-In: I9628dad3325c4626bdf997fac25b70898e6177b5 Change-Id: I9628dad3325c4626bdf997fac25b70898e6177b5 (cherry picked from commit 2d97dc11b72543ed2fbb7a03b063b8fd1b06fd3a)
2021-06-26Allow hiddenapi list to be more lax when run on a fragmentPaul Duffin
When run on a fragment of the bootclasspath the hiddenapi list is not given a complete set of classes so it needs to ignore missing classes. This change adds the --fragment option to do that. It also adds a --verbose option which can be added to log the warnings anyway to make it easier to debug issues that arise with it. This does not risk changing the flags as the stub-flags.csv files created with the --fragment option are compared with the monolithic out/soong/hiddenapi/hiddenapi-stub-flags.txt file which is not run with this option to ensure that they match. Bug: 179354495 Test: m out/soong/hiddenapi-stub-flags.csv - make sure that this does not change the file. Merged-In: I7dac41b5afe8a6d1b2faaff4f4a33c7a5dfe012d Change-Id: I7dac41b5afe8a6d1b2faaff4f4a33c7a5dfe012d (cherry picked from commit 0c7a5fc09f54b25adc8ba225db2b6aeacbce0f7d)
2021-06-25Add flag for clamping hidden api listAndrei Onea
Allow clamping the hidden api list to a max value; if an API is restricted for a newer SDK, transform it into a regular unsupported API. This change is laying out the groundwork to ensure that older platforms do not receive dex code updated that has unknown hidden api flags - e.g. if the hidden api encode step uses '--max-hiddenapi-level=max-target-q', then the resulting dex code will not exhibit undefined behavior with respect to hidden api access when running on R devices, and any newer 'max-target-r' APIs will be marked as 'unsupported'. Test: mma test-art-host-gtest-art_hiddenapi_tests Bug: 172453495 Merged-In: I710c440c8429081096d8a417f164c0e01c97ecd9 Change-Id: I710c440c8429081096d8a417f164c0e01c97ecd9 (cherry picked from commit a6b3b297bdd70ad3e915a48b02a7c7cf5f204e05)
2021-05-26Rename setters to conform Android API guidelinesNikita Iashchenko
Bug: 184654804 Test: m droid Merged-In: I6ae5dd363bdb32cea6acd9dab7afbd4579fb0c4c Change-Id: I6ae5dd363bdb32cea6acd9dab7afbd4579fb0c4c
2021-05-25Support modularization in "hiddenapi list" toolPaul Duffin
Previously, the "hiddenapi list" tool assumed that it was generating flags for the whole bootclasspath and so did not need to differentiate between classes that are provided by the bootclasspath fragment and classes that are simply used by it. That meant that it would output flags for this bootclasspath fragment plus all the other parts of the bootclasspath on which this depends. e.g. When generating the flags for i18n it would also output the flags for art too. This change adds the --dependency-stub-dex option to specify those dex files that contain the API stubs provided by other bootclasspath fragments and used by this one. A file specified in the --dependency-stub-dex option is treated in a similar way to the files added to the --boot-dex but its members are ignored when generating the output file. Bug: 179354495 Test: - enable hiddenapi processing in migrate packages/modules/RuntimeI18N m out/soong/hiddenapi/hiddenapi-flags.csv - the previous command will verify that the I18N's generated all-stubs.flags matches the subset of monolithic flags that overlap. - check the I18N's generated all-stubs.flags to make sure it is complete. Merged-In: I7307500eff1141d161625ec69696802ff3ab82a9 Change-Id: I7307500eff1141d161625ec69696802ff3ab82a9 (cherry picked from commit 6d8d68efbe2101e2d5fdf078556cbc1f286c37c7)
2021-05-25Ignore empty stub dex jarsPaul Duffin
Some modules do not provide APIs for all API surfaces, e.g. sdk-extensions does not provide any public APIs, only system and above. That means that the public stub dex jars are empty of classes*.dex files. This change prevents "hiddenapi list" from failing in that situation. Bug: 179354495 Test: - migrate packages/modules/SdkExtensions to use bootclasspath_fragment - add the fragment to the platform-bootclasspath m out/soong/hiddenapi/hiddenapi-flags.csv - the previous command will verify that the SdkExtensions' generated all-stubs.flags matches the subset of monolithic flags that overlap. - check the SdkExtensions' generated all-stubs.flags to make sure it is complete. Merged-In: Ib2f18b5ba4adec21b783a274fda8a3b797609f35 Change-Id: Ib2f18b5ba4adec21b783a274fda8a3b797609f35 (cherry picked from commit 496b9b43c987a2d769d0c178ee1d88cd92da84d9)
2021-05-20Disable most ART source modules when ART prebuilts are enabled.Martin Stjernholm
After libdexfile_external was merged into libdexfile, libdexfile is an APEX stub when prebuilts are enabled, and that cannot be used to build libart and all the other internal modules that depend on it. This CL: - Changes art_defaults to disable native modules when building from prebuilts. Some other modules that depends on them, like the art-script sh_binary, also get disabled. - Consolidates the makefile sections that are disabled when building from prebuilts so that only a small bit is still enabled then. - Temporarily removes the prebuilt for libctstiagent and activates its source even when prebuilts are used, to work around sdk_version problem (b/187288515). - Removes explicit "enabled: true" in a couple of places that would override the inherited flag that lets us disable them in builds from prebuilts. - Makes some Soong defaults available to libcore. Cherry-picked from https://r.android.com/1711019. Test: m checkbuild Test: art/build/build-art-module.sh --skip-apex packages/modules/ArtPrebuilt/update-art-module-prebuilts.py \ --local-dist out/dist/ --skip-apex m SOONG_CONFIG_art_module_source_build=false droid m SOONG_CONFIG_art_module_source_build=false checkbuild Bug: 172480615 Change-Id: Ief60b933cd6273fc8b85fe7637b99ba1b78505f6 Merged-In: Ief60b933cd6273fc8b85fe7637b99ba1b78505f6
2021-05-13Move CollectorsTest#counting_largeStream to expected failures.Nicolas Geoffray
Test: run-libcore-tests Change-Id: Ic179c20073c82dfc3439465d057d04f2b8aa8039
2021-05-12Make various native modules depend on art_defaults.Martin Stjernholm
To be able to do changes in art_defaults to affect all native code in the ART module. (Note that art_debug_defaults does not imply art_defaults.) Test: Presubmits Bug: 172480615 Change-Id: Ib1a43358fe0f85f601a8606969a10d50a25f0b31
2021-05-11Revert "Add tests to expected failures."Hans Boehm
This reverts commit 06b173cd2e6663eda0e3d3af23ad153b26e88877. Reason for revert: aosp/1699345 is a proper fix. Change-Id: If2ac5352edf630212b4e68f4fe4722030116c618
2021-05-10Reduce libcore parallelism for hostDavid Srbecky
Temporary fix to get the tests green again. Test: run-libcore-tests.py --mode=host Change-Id: Ib52db885dcdc7e41d9ddeeea389e3e0ec7a343c6
2021-05-07Increase JDWP test timeout.David Srbecky
Bug: 187141551 Change-Id: If617fab517b4017e749be64378b1c9aa2fee0a5b
2021-05-06Also add magic "sorted" symbol to create_minidebuginfoDavid Srbecky
Bug: 110133331 Test: check the symbol exists with readelf/etc Change-Id: I7619ff2a001d61bf3106e6e8b38c407af7dea32d
2021-05-06buildbot-build.sh: Invert installclean flagDavid Srbecky
Change-Id: Ie5e15ae67ca29e4f90e9dd3a1fdead8920e76783
2021-05-05Disable live-lock kill daemon for tests.David Srbecky
I think this might be causing "no devices/emulators found" issues in our long running gcstress tests if adbd gets killed. Bug: 187295147 Bug: 142039427 Test: art/tools/buildbot-sync.sh Change-Id: I0b5de3cd13cfde35f031f632760aa1dd679baf0d
2021-05-05Add tests to expected failures.Nicolas Geoffray
Test: libcore.libcore.util.NativeAllocationRegistryTest Bug: 160885166 Change-Id: If338aba2fc6d272751e953d7a83798ea0afac4ca
2021-05-04run-libcore-tests.py: Extend error regexDavid Srbecky
Add another vogar pattern to look for. (to be included in the final summary) Test: run-libcore-tests.py --mode=host Change-Id: I634e271638b814c9155a1d4e402f1b565b335409
2021-05-04Fix run-libcore-tests exclusions for fugu.David Srbecky
Don't include libcore_debug_failures.txt on fugu debug. as it has duplicate entries with libcore_fugu_failures.txt. This is odd, but it is what the bash script used to do. Change-Id: Ia7ebf48ac84f4f7b08f8868345c61e1207cd0e04
2021-05-02buildbot-build.sh: Convenience tweaks for local use.David Srbecky
Pass environment to installclean to avoid build regeneration. Hide the verbose banner for the installclean step. Add command-line argument to opt-out from the installclean. Bug: 142039427 Test: buildbot-build.sh --no-installclean --host Change-Id: Iad3882fe5eb6eb6110e0a63bd15500ebc7ef3a95
2021-04-30Tweak run-libcore-tests.py output formatting.David Srbecky
Test: art/tools/run-libcore-tests.py --mode=host Change-Id: Idfd90344f815c06d66428f211c2a91f473044c44
2021-04-29Update provideLibs from system/etc/linker.config.pb.Martin Stjernholm
Test: art/test/testrunner/testrunner.py --target --64 --optimizing Bug: 130340935 Change-Id: Id067576db68556b3f6237ae888e22b855ce0ecb7
2021-04-29Support non-flattened APEXes in the sync script.Martin Stjernholm
Using OVERRIDE_TARGET_FLATTEN_APEX in a full platform tree isn't straightforward any more. Test: art/tools/buildbot-build.sh --target && \ art/tools/buildbot-teardown-device.sh && \ art/tools/buildbot-cleanup-device.sh && \ art/tools/buildbot-setup-device.sh && \ art/tools/buildbot-sync.sh Test: art/tools/buildbot-sync.sh Change-Id: I4f189b22ccbd5cdf066052253e2df8a9fb7d1452
2021-04-28Run libcore tests in parallelDavid Srbecky
Bug: 142039427 Test: run-libcore-tests.py --mode=host Test: run-libcore-tests.py --mode=device Change-Id: Idc36d8402d80ea3901784bb0196b1b11123f1efd
2021-04-28Remove RETURN_VOID_NO_BARRIER byte-code.David Srbecky
Unused and obsolete quickened byte-code. Bug: 170086509 Test: test.py -b --host --64 Change-Id: I1e917c189da7bf64418412522676dc6b081d5c0b
2021-04-28run-libcore-tests.py: Fix hash-bang to work on LUCI bots.David Srbecky
Change-Id: I66e3a4715e9940c2c67f24065dde5db83120e27c
2021-04-27Create persistent named cache directory in LUCI.David Srbecky
The existence of this directory has no effect on its own. The second step will be to use it for builds on LUCI. Bug: 142039427 Change-Id: Ie8f60b3e5cd6cb4c21c2a39967f903481783ec66
2021-04-27Rewrite run-libcore-tests.sh in pythonDavid Srbecky
Bug: 142039427 Test: run-libcore-tests.sh --mode=host Test: run-libcore-tests.sh --mode=device Change-Id: I9d90fa97a0b1540b80d358ce7482012202a62687
2021-04-26Fix issue with Partial LSE and casts/instanceofAlex Light
If PartialLSE encounters an instanceof or check-cast before the escapes it could not correctly handle it. Due to how java language code is typically developed and compiled this is generally not a problem but could lead to incorrect codegen on release builds or DCHECK failures on debug builds. This fixes the issues by (1) causing partial LSE to consider check-cast and instance-ofs to be escaping. This also updates the instruction simplifier to be much more aggressive in removing instance-of and check-casts. Test: ./test.py --host Bug: 186041085 Change-Id: Ia513c4210a87a0dfa92f10adc530e17ee631d006
2021-04-25buildbot-build.sh: Enable build of both host and target.David Srbecky
This is useful for local builds. Bug: 142039427 Test: art/tools/buildbot-build.sh --host Test: art/tools/buildbot-build.sh --target Test: art/tools/buildbot-build.sh Change-Id: Ifef756a3d3c5272f2e96895c330296fc61eb15df
2021-04-23Add installclean step to buildbot-build.shDavid Srbecky
Ensure that there are no files left over from previous build. Bug: 142039427 Test: art/tools/buildbot-build.sh --host Change-Id: If9772fb5f0ec12fbe68e009f706a799d8ba2d084
2021-04-23Ensure consistent build configurationPaul Duffin
This change stops removing the out/soong/dexpreopt.config file and the DexpreoptGlobalConfig entry in the out/soong/soong.variables file as doing so leads the Soong being passed inconsistent configuration, where the Config.productVariables.BootJars (and UpdatableBootJars) contains a full list of boot jars but the corresponding fields in the dexpreopt.GlobalConfig are empty. Bug: 186195980 Test: DIST_DIR=out/bionic-dist ./art/tools/dist_linux_bionic.sh -j80 com.android.art.host com.android.support.apexer --skip-soong-tests Change-Id: I1e34268a596565a2db173b6c26021ef2d618c0a7
2021-04-22Static libunwindstack has a static dependency on libasync_safe.Martin Stjernholm
Cf. https://cs.android.com/android/platform/superproject/+/master:system/unwinding/libunwindstack/Android.bp;l=100;drc=7b46d3741e3915091fec30877f46a6e8327db6bb Test: env TARGET_PRODUCT=armv8 TARGET_BUILD_VARIANT=eng \ ./art/test/testrunner/run_build_test_target.py -j80 \ art-linux-bionic-x64-zipapex Test: env TARGET_PRODUCT=armv8 TARGET_BUILD_VARIANT=eng \ ./art/test/testrunner/run_build_test_target.py -j80 \ art-linux-bionic-x64 Bug: 185984634 Change-Id: If9a832c34fee64516bd15c8c86c5ab567714ca5a
2021-04-14Extend gcstress timeoutsOrion Hodson
More succeeding stack unwinds slows gcstress tests and results in timeout failures on the bots. Bug: 185305054 Test: manual Change-Id: I08bfc276aede58699166535ff738fdf59d074ee2
2021-04-13Make bisect_profile more resiliant to user inputAlex Light
We would not check that the user actually enters a response. This could cause the bisect to fail prematurely. Test: manual Change-Id: I6b9ab373e74a6594158c42ebe11b242eabfd0921
2021-04-13Fix pylibdexfileAlex Light
pylibdexfile dynamically links to libdexfiled. This updates pylibdexfile to match recent changes to libdexfiled that (intentionally) broke backwards compatibility. Test: ./art/tools/bisect_profile.py --apk ~/imgur.apk --output-source bad-compile.txt bad-compile.prof Bug: 183942773 Bug: 123517037 Change-Id: Ie03f40041912e154996f5fbd0557da2d571b77fc
2021-04-13tools: refine inclusion of debug failures to avoid fuguOrion Hodson
Fugu expectations overlap with debug expectations which vogar then rejects because of duplicates. Test: art/tools/run-libcore-tests.sh --mode=device --debug -- libcore.java.math.BigIntegerTest Bug: 181968447 Change-Id: Ic73932108b9949e2b0b06eae2e251f94b3cae63d
2021-04-13Update ART generator tools to use python3.Vladimir Marko
Test: buildbot-build.sh --target Test: m cpp-define-generator-test && out/host/linux-x86/testcases/cpp-define-generator-test/cpp-define-generator-test Change-Id: I73018df1e531c37d21397c2ffa35238e3df76d65
2021-04-12Merge libdexfile_external into libdexfile (reland 2).Martin Stjernholm
To reduce the number of DSO's. libdexfile_external only adds a few small functions on top of libdexfile, and it's still only those functions that are available in the APEX stubs. Also rename libdexfile_external_static to libdexfile_static, for consistency. Since libdexfile now has stubs, we need to add test_for properties to avoid linking against the stubs in tests. This relands https://r.android.com/1666119 that got submitted out of order from https://r.android.com/1664026 - prerequisite changes now submitted with https://r.android.com/1671709. Test: Flash and boot with userdebug and eng to try both release and debug modules. Test: art/tools/buildbot-build.sh {--target,--host} Test: art/build/apex/runtests.sh Test: mmm art Bug: 143978909 Change-Id: I6de99052d6d8a9d01d748baabbbcecfe1f4509dc
2021-04-12tools: ignore BigIntegerTest failures for debug device testsOrion Hodson
Tests are timing out. Test: art/tools/run-libcore-tests.sh --mode=device --debug -- libcore.java.math.BigIntegerTest Bug: 181968447 Change-Id: I10d45f0266c64f0f41333a9021fd2eb94a7f2c07
2021-04-11Add a --test-exec flag to bisect_profile.pyAlex Light
Often one has a small script that can tell whether a bisection has the target behavior or not. Add a --test-exec flag to allow bisect_profile.py to drive itself using a non-zero exit to indicate that the interesting behavior is present and a 0 exit to indicate it is not. Test: ./art/tools/bisect_profile.py --apk ~/GoogleExtServices.apk --test-exec './art/tools/compile-jar.py --profile-file bad.prof --arch arm64 ~/GoogleExtServices.apk --force-allow-oj-inlines -j1' --output-source bad.txt bad.prof Change-Id: I2fbaf15da8177953ad0051274ee974e6c0e9f503
2021-04-09Revert "Merge libdexfile_external into libdexfile (reland)."Ulyana Trafimovich
Revert "Rename libdexfile_external_static to libdexfile_static (..." Revert "Rename libdexfile_external_static to libdexfile_static (..." Revert submission 1666119-libdexfile-noext-2 Reason for revert: broken build 7270939 on aosp-master on full-eng Reverted Changes: I582e49ae7:Merge libdexfile_external into libdexfile (reland)... Iaa6a90f41:Rename libdexfile_external_static to libdexfile_st... I4315189b2:libdexfile_external is replaced by libdexfile (rel... Ia065119c2:Rename libdexfile_external_static to libdexfile_st... Bug: 184929782 Change-Id: Ie69a73f4f0f745ab988e627c568f4ccb83fd1c71 Test: forrest build for aosp-master on full-eng
2021-04-09Merge libdexfile_external into libdexfile (reland).Martin Stjernholm
To reduce the number of DSO's. libdexfile_external only adds a few small functions on top of libdexfile, and it's still only those functions that are available in the APEX stubs. Also rename libdexfile_external_static to libdexfile_static, for consistency. Since libdexfile now has stubs, we need to add test_for properties to avoid linking against the stubs in tests. This relands https://r.android.com/1643424 with leaving out dex_file_ext.cc on Windows (cf. build issue b/184239856): mapped_file.h brings in windows.h in Windows builds, which has several defines that are incompatible with dex internals (e.g. CONST). Test: Flash and boot with userdebug and eng to try both release and debug modules. Test: art/tools/buildbot-build.sh {--target,--host} Test: art/build/apex/runtests.sh Test: mmm art Test: m TARGET_PRODUCT=full TARGET_BUILD_VARIANT=eng checkbuild Bug: 143978909 Change-Id: I582e49ae797744837849db056cef2fbeacc0681e
2021-04-01Revert "Merge libdexfile_external into libdexfile."Nikita Ioffe
Revert "libdexfile_external is replaced by libdexfile." Revert "Rename libdexfile_external_static to libdexfile_static." Revert "Rename libdexfile_external_static to libdexfile_static." Revert "Allow dependencies from platform variants to APEX modules." Revert submission 1658000 Reason for revert: Breaks full-eng build: b/184239856 Reverted Changes: I4f8ead785:Avoid internal APEX stubs for libsigchain and clea... I68affdf69:Allow dependencies from platform variants to APEX ... I54b33784e:Rename libdexfile_external_static to libdexfile_st... Id68ae9438:libdexfile_external is being replaced by libdexfil... I12ac84eb4:libdexfile_external is replaced by libdexfile. If05dbffc8:Rename libdexfile_external_static to libdexfile_st... Ia011fa3a8:Merge libdexfile_external into libdexfile. Change-Id: I9064dd8debe2f385782c8cc6c1830e4cc5cb7221
2021-04-01Merge libdexfile_external into libdexfile.Martin Stjernholm
To reduce the number of DSO's. libdexfile_external only adds a few small functions on top of libdexfile, and it's still only those functions that are available in the APEX stubs. Also rename libdexfile_external_static to libdexfile_static, for consistency. Since libdexfile now has stubs, we need to add test_for properties to avoid linking against the stubs in tests. Test: Flash and boot with userdebug and eng to try both release and debug modules. Test: art/build/apex/runtests.sh Bug: 143978909 Change-Id: Ia011fa3a86509839ea0d80ad5fcad67ee5ce68d9
2021-03-31Improve compile-jar.pyAlex Light
Misc improvements to compile-jar.py Add a '--add-bcp' option for appending jars to the BCP. Make --profile-file support binary profile files. Fix non-host arch boot-image arguments Test: ./art/tools/compile-jar.py --profile-file bad_compile.prof --arch arm64 ~/no.nrk.mobil.radio_10922_base_split.apk --compiler-filter=speed-profile --dump-stats -j1 --force-allow-oj-inlines Change-Id: Iac4190c806ae2043ff574e8a9c409163aebd4ef3
2021-03-31Increase the timeout value of Libcore tests for gcstress non-debug configs.Roland Levillain
Increase the per-test timeout value passed to Vogar by script `tools/run-libcore-tests.sh` for gcstress non-debug configurations from 900 seconds (15 minutes) to 1200 seconds (20 minutes), to allow long Libcore tests (like `libcore.java.lang`) to finish on slower devices like bonito (Pixel 3a XL). Test: Rely on the ART Buildbot (LUCI) Bug: 158195843 Change-Id: I9353d8a072ddfcbdb01cb4eba228fbcdd01596ee
2021-03-27Remove QUICK bytecodes.David Srbecky
Remove the deprecated unofficial (not part of the spec) bytecodes. This frees the 16 bytecodes for future use. Bug: 170086509 Test: m test-art-host-gtest Test: test.py -r -b --host Change-Id: I9f6d8a2c21b88f883c8fdc1eb67b24620f313d56
2021-03-24Improve nterp -> compiled code transitions.Nicolas Geoffray
Use an unused bit in the access flags of an ArtMethod (0x00200000) to store the information a method only takes ints or references and returns an int, a reference, or a long. This avoids the need to fetch the shorty in nterp when doing a call. Test: test.py Test: 821-many-args Bug: 112676029 Change-Id: Ie657ccf69c17c1097dc2a97f18e3093ef3be391b
2021-03-23Add a fast path for nterp entrypoint to avoid fetching the shorty.Nicolas Geoffray
When all parameters are references, we don't need to look at the shorty. Use the 0x00100000 flag in the modifiers which is free for non-native methods. Test: test.py Bug: 112676029 Change-Id: Ied9a253f7f7230045dd13188a5b806fb1d6d019d