summaryrefslogtreecommitdiff
path: root/dexoptanalyzer
AgeCommit message (Collapse)Author
2021-09-27Better isolate standalone ART gtests on device.Roland Levillain
Standalone ART gtests used to be installed in the same directory on device (`/data/local/tmp/nativetest`), which could be a race condition. In particular, some ART gtests are run as root (e.g. `art_standalone_dexoptanalyzer_tests`) and create the `/data/local/tmp/nativetest` directory with `root` ownership/permissions, preventing any subsequent ART gtest not run as root (e.g. `art_standalone_cmdline_tests`) from installing its artifacts in that directory. To prevent these issues, use a different directory on device (under `/data/local/tmp`) per standalone ART gtest. (cherry picked from commit d8c0ac264f606bf0c69781388ca6048eb0a4b55f) (cherry picked from commit 58a79873e94dbe4a168221fc95b641dbf8cd3e3e) Test: atest art_standalone_dexoptanalyzer_tests \ && atest art_standalone_cmdline_tests Test: atest art_standalone_\*_tests Bug: 194403904 Bug: 162834439 Change-Id: I141c1676382b078c1441e5782b3dc77affafa3fc Merged-In: I141c1676382b078c1441e5782b3dc77affafa3fc
2021-08-13Add `Sdk31ModuleController` support to ART run-tests and gtests.Roland Levillain
This in order to run these tests only if the device under test is SDK version 31 (Android 12) or above. Test: m mts && mts-tradefed run commandAndExit mts-art Bug: 195178963 Bug: 184696655 Bug: 181724969 Ignore-AOSP-First: API level 31 not in AOSP yet Change-Id: I4bb6405281809863562e5bbbfc1189f227f2508d
2021-08-03ART Apex: prefer "first" to "prefer32" multilib option for toolsOrion Hodson
This makes the tools in a 32/64-bit APEX into 64-bit binaries when previously they were 32-bit. This change is to support 64-bit only devices. We currently build two flavors of the ART APEX: a 32-bit only variant and a combined 32/64-bit variant. Devices using latter support 64-bit. The size impact on the uncompressed APEXes is: +------------+-----------------+-----------------+-----------------+ | ISA Family | Old size, bytes | New size, bytes | Change | +------------+-----------------+-----------------+-----------------+ | Arm | 58,212,352 | 58,339,328 | 126,976 (+0.2%) | | Intel | 72,073,216 | 72,073,216 | 0 (+0.0%) | +------------+-----------------+-----------------+-----------------+ (cherry picked from commit 0e8585342b1b26a0ec33421f9d4ab16cb9851ce4) Bug: 194800665 Test: art/build/apex/runtests.sh Test: odsign_e2e_tests Merged-In: If23ea3bc3f14c948c032bb3726a125dfdd8069f4 Change-Id: I3de7f0cff236b4de38bef49bfaf10c9f25849db5
2021-07-13Add support for standalone ART gtests to MTS.Roland Levillain
This change: - adds standalone ART gtests to test suite `mts-art`; - adds `MainlineTestModuleController` support to standalone ART gtests. This in order to have these tests run in a Mainline context only when the ART Module (either `com.google.android.art` or `com.android.art`) is installed on the test device. (cherry picked from commit 6a2e6893290eac83f59dac4ec5bc10abf985ae10) Test: m mts && mts-tradefed run commandAndExit mts-art Test: m mts && mts-tradefed run commandAndExit mts-art-shard-00 Bug: 193218514 Bug: 167385698 Change-Id: I97d9c00b7c10debff8c63e4ae75f90da02be271c Merged-In: I97d9c00b7c10debff8c63e4ae75f90da02be271c
2021-07-12Uncouple ART gtests from the ART APEX.Roland Levillain
Introduce standalone versions of ART gtests on target, not bundled with the ART APEX. So far ART gtests have always been built as debug artifacts (and linked against ART debug libraries). Make some adjustments in some of these tests so that they can also work as non-debug artifacts and be used with the Release ART APEX (which contains only non-debug artifacts). Newly added tests: * `art_standalone_cmdline_tests` * `art_standalone_compiler_tests` * `art_standalone_dex2oat_tests` * `art_standalone_dexdump_tests` * `art_standalone_dexlist_tests` * `art_standalone_dexoptanalyzer_tests` * Note: Requires root access to the device. * `art_standalone_libartbase_tests` * `art_standalone_libartpalette_tests` * `art_standalone_libdexfile_support_tests` * `art_standalone_libdexfile_tests` * `art_standalone_libprofile_tests` * `art_standalone_oatdump_tests` * `art_standalone_odrefresh_tests` * `art_standalone_profman_tests` * Note: Requires root access to the device. * Note: Some tests (2 out of 37) are failing in multi-ABI contexts and have been temporarily disabled. * `art_standalone_runtime_compiler_tests` * `art_standalone_runtime_tests` * Note: Some tests (16 out of 686) are failing and have been temporarily disabled. * Note: Some tests (4 out of 686) are failing in multi-ABI contexts and have been temporarily disabled. * `art_standalone_sigchain_tests` Tests not added: * `art_standalone_dexanalyze_tests` * Reason: ART binary `dexanalyze` is not part of the Release ART APEX. * `art_standalone_dexdiag_tests` * Reason: ART binary `dexdiag` is not part of the Release ART APEX. * `art_standalone_dexlayout_tests` * Reason: ART binary `dexlayout` is not part of the Release ART APEX. * `art_standalone_imgdiag_tests` * Reason: ART binary `imgdiag` is not part of the Release ART APEX. Tests not added (but present in AOSP): * `art_standalone_libartservice_tests` * Reason: Test `art_libartservice_tests` does not exist in this branch. * `art_standalone_libarttools_tests` * Reason: Test `art_libarttools_tests` does not exist in this branch. (cherry picked from commit f040914a122be86e280efe5e31af1168f2b7c72e) Test: atest -a art_standalone_cmdline_tests Test: atest -a art_standalone_compiler_tests Test: atest -a art_standalone_dex2oat_tests Test: atest -a art_standalone_dexdump_tests Test: atest -a art_standalone_dexlist_tests Test: atest -a art_standalone_dexoptanalyzer_tests Test: atest -a art_standalone_libartbase_tests Test: atest -a art_standalone_libartpalette_tests Test: atest -a art_standalone_libdexfile_support_tests Test: atest -a art_standalone_libdexfile_tests Test: atest -a art_standalone_libprofile_tests Test: atest -a art_standalone_oatdump_tests Test: atest -a art_standalone_odrefresh_tests Test: atest -a art_standalone_profman_tests Test: atest -a art_standalone_runtime_compiler_tests Test: atest -a art_standalone_runtime_tests Test: atest -a art_standalone_sigchain_tests Test: atest -a art_standalone_\*_tests Test: m art_chroot && atest ArtGtestsTargetChroot Bug: 193218514 Bug: 162834439 Bug: 162734417 Change-Id: I8beda9159d48c4ca495698357dc3bd95e3ff84d5 Merged-In: I8beda9159d48c4ca495698357dc3bd95e3ff84d5
2021-06-18Be more prescise in the profile analysisCalin Juravle
Distinguish between: - compile - don't compile because we don't have enough delta (standard case) - don't compile because all profiles are empty This will help us be more precise in the compilation strategy and avoid re-compiling verified dex files when the profile is empty. Also, this CL fixes dexoptanalyzer tests. We needed to generate odex files instead of oat files in the dalvik-cache when testing the functionality. That's because during tests, the parent directory of the apk is always writable and OatFileAssistant will believe that it needs to select the odex files despite having an oat file. The fix caught issues in the downgrade test, which were also addressed. Test: gtest Bug: 188655918 Change-Id: Id8370541f73465b32dc91aeacf2ba4dc2656c290 (cherry picked from commit 86fef6a8bf321edde046b739df4a732e602bcab5)
2021-06-14odrefresh: enable loading of system_server image filesOrion Hodson
Fix check in ValidateBootImageChecksum() to account for image files with multiple components which exists for boot-framework when compiling on device. Update logic for only_load_system_executable to be only_load_trusted_executable and treat /system and the ART APEX data directory as trusted. Add test to check .art,.odex,.vdex files derived from the system_server classpath are mapped when the ART module updates. Add test to check .art,.oat,.vdex files for the boot class path extensions are present in the zygote processes. (cherry picked from commit 094b1cfc9fa9e1c02238a2352c190be1746f5622) Fix: 180949581 Test: atest com.android.tests.odsign.OnDeviceSigningHostTest#verifyGeneratedArtifactsLoaded Merged-In: I3114fc6393402d8da2eb16ba756ab5fab713dc20 Change-Id: I493b2eaa99d27a865ced77745debdeaff16b7d6a
2021-04-19Revert "Revert "Integrate ClassLoaderContext check in ↵Nicolas Geoffray
OatFileAssistant::GetBestOatFile."" This reverts commit 656fdcd7f2aa9920ecd464dbb59d284e17969baa. Bug: 176960283 Reason for revert: Racy code fixed in https://android-review.googlesource.com/c/platform/art/+/1678727 Change-Id: I7561aa8fad060bd076006dd4b1fbffc076834635
2021-04-17Revert "Integrate ClassLoaderContext check in OatFileAssistant::GetBestOatFile."David Srbecky
This reverts commit c8fe6517faf91b45683cddff3c15e08e489e12e9. Reason for revert: Breaks 1002-notify-startup (flaky) Test: "art/test.py -r --host -t 1002" in a loop Bug: 176960283 Change-Id: I4f5467efa5a1e09452b28b86b183791e4105b19e
2021-04-15Integrate ClassLoaderContext check in OatFileAssistant::GetBestOatFile.Nicolas Geoffray
This reduces some code duplication between OatFileManager::OpenDexFilesFromOat and GetDexoptNeeded. It also gives the chance for OatFileAssistant and GetDexoptNeeded to find the real best oat file. Test: test.py Bug: 176960283 Change-Id: Id366aef7a9e91833d8edaea965abda4cfdcd8455
2021-03-19Add min_sdk_version for ART module.Nicolas Geoffray
Bug: 180399951 Test: m Change-Id: I5e2a1ddc3063be26c602bf4db8e6b77f2d54b656
2021-03-02[LSC] Add LOCAL_LICENSE_KINDS to artBob Badour
Added SPDX-license-identifier-Apache-2.0 to: adbconnection/Android.bp benchmark/Android.bp build/Android.bp build/Android.cpplint.mk build/Android.gtest.mk build/apex/Android.bp build/boot/Android.bp build/sdk/Android.bp cmdline/Android.bp compiler/Android.bp dalvikvm/Android.bp dex2oat/Android.bp dexdump/Android.bp dexlayout/Android.bp dexlist/Android.bp dexoptanalyzer/Android.bp disassembler/Android.bp dt_fd_forward/export/Android.bp imgdiag/Android.bp libartbase/Android.bp libartpalette/Android.bp libartservice/Android.bp libartservice/tests/Android.bp libarttools/Android.bp libdexfile/Android.bp libelffile/Android.bp libnativebridge/Android.bp libnativebridge/tests/Android.bp libnativeloader/Android.bp libnativeloader/test/Android.bp libnativeloader/test/Android.mk libprofile/Android.bp oatdump/Android.bp odrefresh/Android.bp perfetto_hprof/Android.bp profman/Android.bp runtime/Android.bp simulator/Android.bp test/001-HelloWorld/Android.bp test/001-Main/Android.bp test/002-sleep/Android.bp test/004-InterfaceTest/Android.bp test/004-SignalTest/Android.bp test/004-UnsafeTest/Android.bp test/004-checker-UnsafeTest18/Android.bp test/006-args/Android.bp test/007-count10/Android.bp test/009-instanceof/Android.bp test/010-instance/Android.bp test/011-array-copy/Android.bp test/012-math/Android.bp test/013-math2/Android.bp test/014-math3/Android.bp test/015-switch/Android.bp test/016-intern/Android.bp test/017-float/Android.bp test/018-stack-overflow/Android.bp test/019-wrong-array-type/Android.bp test/020-string/Android.bp test/021-string2/Android.bp test/022-interface/Android.bp test/025-access-controller/Android.bp test/026-access/Android.bp test/027-arithmetic/Android.bp test/028-array-write/Android.bp test/029-assert/Android.bp test/030-bad-finalizer/Android.bp test/033-class-init-deadlock/Android.bp test/034-call-null/Android.bp test/035-enum/Android.bp test/036-finalizer/Android.bp test/037-inherit/Android.bp test/038-inner-null/Android.bp test/039-join-main/Android.bp test/040-miranda/Android.bp test/041-narrowing/Android.bp test/043-privates/Android.bp test/044-proxy/Android.bp test/045-reflect-array/Android.bp test/046-reflect/Android.bp test/047-returns/Android.bp test/048-reflect-v8/Android.bp test/049-show-object/Android.bp test/050-sync-test/Android.bp test/051-thread/Android.bp test/052-verifier-fun/Android.bp test/053-wait-some/Android.bp test/054-uncaught/Android.bp test/055-enum-performance/Android.bp test/058-enum-order/Android.bp test/059-finalizer-throw/Android.bp test/061-out-of-memory/Android.bp test/062-character-encodings/Android.bp test/063-process-manager/Android.bp test/067-preemptive-unpark/Android.bp test/070-nio-buffer/Android.bp test/072-precise-gc/Android.bp test/072-reachability-fence/Android.bp test/074-gc-thrash/Android.bp test/076-boolean-put/Android.bp test/078-polymorphic-virtual/Android.bp test/079-phantom/Android.bp test/080-oom-fragmentation/Android.bp test/080-oom-throw-with-finalizer/Android.bp test/080-oom-throw/Android.bp test/081-hot-exceptions/Android.bp test/082-inline-execute/Android.bp test/083-compiler-regressions/Android.bp test/084-class-init/Android.bp test/086-null-super/Android.bp test/087-gc-after-link/Android.bp test/090-loop-formation/Android.bp test/092-locale/Android.bp test/093-serialization/Android.bp test/094-pattern/Android.bp test/095-switch-MAX_INT/Android.bp test/096-array-copy-concurrent-gc/Android.bp test/098-ddmc/Android.bp test/099-vmdebug/Android.bp test/100-reflect2/Android.bp test/1004-checker-volatile-ref-load/Android.bp test/101-fibonacci/Android.bp test/102-concurrent-gc/Android.bp test/103-string-append/Android.bp test/104-growth-limit/Android.bp test/105-invoke/Android.bp test/106-exceptions2/Android.bp test/107-int-math2/Android.bp test/108-check-cast/Android.bp test/109-suspend-check/Android.bp test/110-field-access/Android.bp test/112-double-math/Android.bp test/114-ParallelGC/Android.bp test/115-native-bridge/Android.bp test/116-nodex2oat/Android.bp test/120-hashcode/Android.bp test/121-simple-suspend-check/Android.bp test/122-npe/Android.bp test/123-compiler-regressions-mt/Android.bp test/123-inline-execute2/Android.bp test/125-gc-and-classloading/Android.bp test/128-reg-spill-on-implicit-nullcheck/Android.bp test/129-ThreadGetId/Android.bp test/132-daemon-locks-shutdown/Android.bp test/133-static-invoke-super/Android.bp test/1336-short-finalizer-timeout/Android.bp test/1337-gc-coverage/Android.bp test/1339-dead-reference-safe/Android.bp test/136-daemon-jni-shutdown/Android.bp test/139-register-natives/Android.bp test/140-dce-regression/Android.bp test/140-field-packing/Android.bp test/143-string-value/Android.bp test/144-static-field-sigquit/Android.bp test/148-multithread-gc-annotations/Android.bp test/149-suspend-all-stress/Android.bp test/150-loadlibrary/Android.bp test/151-OpenFileLimit/Android.bp test/152-dead-large-object/Android.bp test/153-reference-stress/Android.bp test/154-gc-loop/Android.bp test/156-register-dex-file-multi-loader/Android.bp test/158-app-image-class-table/Android.bp test/159-app-image-fields/Android.bp test/163-app-image-methods/Android.bp test/165-lock-owner-proxy/Android.bp test/168-vmstack-annotated/Android.bp test/169-threadgroup-jni/Android.bp test/170-interface-init/Android.bp test/172-app-image-twice/Android.bp test/174-escaping-instance-of-bad-class/Android.bp test/175-alloc-big-bignums/Android.bp test/176-app-image-string/Android.bp test/177-visibly-initialized-deadlock/Android.bp test/178-app-image-native-method/Android.bp test/179-nonvirtual-jni/Android.bp test/1900-track-alloc/Android.bp test/1901-get-bytecodes/Android.bp test/1902-suspend/Android.bp test/1903-suspend-self/Android.bp test/1904-double-suspend/Android.bp test/1905-suspend-native/Android.bp test/1906-suspend-list-me-first/Android.bp test/1907-suspend-list-self-twice/Android.bp test/1908-suspend-native-resume-self/Android.bp test/1909-per-agent-tls/Android.bp test/1910-transform-with-default/Android.bp test/1911-get-local-var-table/Android.bp test/1912-get-set-local-primitive/Android.bp test/1913-get-set-local-objects/Android.bp test/1914-get-local-instance/Android.bp test/1915-get-set-local-current-thread/Android.bp test/1916-get-set-current-frame/Android.bp test/1917-get-stack-frame/Android.bp test/1919-vminit-thread-start-timing/Android.bp test/1920-suspend-native-monitor/Android.bp test/1921-suspend-native-recursive-monitor/Android.bp test/1922-owned-monitors-info/Android.bp test/1923-frame-pop/Android.bp test/1924-frame-pop-toggle/Android.bp test/1925-self-frame-pop/Android.bp test/1926-missed-frame-pop/Android.bp test/1927-exception-event/Android.bp test/1928-exception-event-exception/Android.bp test/1930-monitor-info/Android.bp test/1931-monitor-events/Android.bp test/1932-monitor-events-misc/Android.bp test/1933-monitor-current-contended/Android.bp test/1934-jvmti-signal-thread/Android.bp test/1935-get-set-current-frame-jit/Android.bp test/1936-thread-end-events/Android.bp test/1937-transform-soft-fail/Android.bp test/1938-transform-abstract-single-impl/Android.bp test/1939-proxy-frames/Android.bp test/1941-dispose-stress/Android.bp test/1942-suspend-raw-monitor-exit/Android.bp test/1943-suspend-raw-monitor-wait/Android.bp test/1945-proxy-method-arguments/Android.bp test/1947-breakpoint-redefine-deopt/Android.bp test/1949-short-dex-file/Android.bp test/1951-monitor-enter-no-suspend/Android.bp test/1953-pop-frame/Android.bp test/1954-pop-frame-jit/Android.bp test/1955-pop-frame-jit-called/Android.bp test/1956-pop-frame-jit-calling/Android.bp test/1957-error-ext/Android.bp test/1958-transform-try-jit/Android.bp test/1959-redefine-object-instrument/Android.bp test/1960-checker-bounds-codegen/Android.bp test/1960-obsolete-jit-multithread-native/Android.bp test/1961-checker-loop-vectorizer/Android.bp test/1961-obsolete-jit-multithread/Android.bp test/1962-multi-thread-events/Android.bp test/1963-add-to-dex-classloader-in-memory/Android.bp test/1967-get-set-local-bad-slot/Android.bp test/1968-force-early-return/Android.bp test/1969-force-early-return-void/Android.bp test/1970-force-early-return-long/Android.bp test/1971-multi-force-early-return/Android.bp test/1972-jni-id-swap-indices/Android.bp test/1973-jni-id-swap-pointer/Android.bp test/1974-resize-array/Android.bp test/1975-hello-structural-transformation/Android.bp test/1976-hello-structural-static-methods/Android.bp test/1977-hello-structural-obsolescence/Android.bp test/1978-regular-obsolete-then-structural-obsolescence/Android.bp test/1979-threaded-structural-transformation/Android.bp test/1980-obsolete-object-cleared/Android.bp test/1982-no-virtuals-structural-redefinition/Android.bp test/1984-structural-redefine-field-trace/Android.bp test/1985-structural-redefine-stack-scope/Android.bp test/1986-structural-redefine-multi-thread-stack-scope/Android.bp test/1987-structural-redefine-recursive-stack-scope/Android.bp test/1988-multi-structural-redefine/Android.bp test/1989-transform-bad-monitor/Android.bp test/1990-structural-bad-verify/Android.bp test/1991-hello-structural-retransform/Android.bp test/1992-retransform-no-such-field/Android.bp test/1993-fallback-non-structural/Android.bp test/1994-final-virtual-structural/Android.bp test/1995-final-virtual-structural-multithread/Android.bp test/1996-final-override-virtual-structural/Android.bp test/1997-structural-shadow-method/Android.bp test/1998-structural-shadow-field/Android.bp test/1999-virtual-structural/Android.bp test/2003-double-virtual-structural/Android.bp test/2004-double-virtual-structural-abstract/Android.bp test/2005-pause-all-redefine-multithreaded/Android.bp test/2008-redefine-then-old-reflect-field/Android.bp test/201-built-in-except-detail-messages/Android.bp test/2011-stack-walk-concurrent-instrument/Android.bp test/2019-constantcalculationsinking/Android.bp test/202-thread-oome/Android.bp test/2020-InvokeVirtual-Inlining/Android.bp test/2021-InvokeStatic-Inlining/Android.bp test/2022-Invariantloops/Android.bp test/2023-InvariantLoops_typecast/Android.bp test/2024-InvariantNegativeLoop/Android.bp test/2025-ChangedArrayValue/Android.bp test/2026-DifferentMemoryLSCouples/Android.bp test/2027-TwiceTheSameMemoryCouple/Android.bp test/2028-MultiBackward/Android.bp test/2029-contended-monitors/Android.bp test/203-multi-checkpoint/Android.bp test/2030-long-running-child/Android.bp test/2031-zygote-compiled-frame-deopt/Android.bp test/2033-shutdown-mechanics/Android.bp test/2036-jni-filechannel/Android.bp test/2037-thread-name-inherit/Android.bp test/2231-checker-heap-poisoning/Android.bp test/2232-write-metrics-to-log/Android.bp test/300-package-override/Android.bp test/301-abstract-protected/Android.bp test/302-float-conversion/Android.bp test/304-method-tracing/Android.bp test/305-other-fault-handler/Android.bp test/401-optimizing-compiler/Android.bp test/402-optimizing-control-flow/Android.bp test/403-optimizing-long/Android.bp test/404-optimizing-allocator/Android.bp test/405-optimizing-long-allocator/Android.bp test/406-fields/Android.bp test/407-arrays/Android.bp test/408-move-bug/Android.bp test/409-materialized-condition/Android.bp test/410-floats/Android.bp test/411-checker-hdiv-hrem-const/Android.bp test/411-checker-hdiv-hrem-pow2/Android.bp test/411-checker-instruct-simplifier-hrem/Android.bp test/411-optimizing-arith/Android.bp test/413-regalloc-regression/Android.bp test/414-static-fields/Android.bp test/418-const-string/Android.bp test/419-long-parameter/Android.bp test/420-const-class/Android.bp test/421-exceptions/Android.bp test/421-large-frame/Android.bp test/422-instanceof/Android.bp test/422-type-conversion/Android.bp test/423-invoke-interface/Android.bp test/424-checkcast/Android.bp test/426-monitor/Android.bp test/427-bitwise/Android.bp test/427-bounds/Android.bp test/429-ssa-builder/Android.bp test/430-live-register-slow-path/Android.bp test/433-gvn/Android.bp test/434-shifter-operand/Android.bp test/435-try-finally-without-catch/Android.bp test/436-rem-float/Android.bp test/436-shift-constant/Android.bp test/437-inline/Android.bp test/438-volatile/Android.bp test/439-npe/Android.bp test/439-swap-double/Android.bp test/440-stmp/Android.bp test/441-checker-inliner/Android.bp test/443-not-bool-inline/Android.bp test/444-checker-nce/Android.bp test/445-checker-licm/Android.bp test/446-checker-inliner2/Android.bp test/447-checker-inliner3/Android.bp test/449-checker-bce-rem/Android.bp test/449-checker-bce/Android.bp test/450-checker-types/Android.bp test/451-regression-add-float/Android.bp test/451-spill-splot/Android.bp test/454-get-vreg/Android.bp test/455-checker-gvn/Android.bp test/456-baseline-array-set/Android.bp test/458-long-to-fpu/Android.bp test/461-get-reference-vreg/Android.bp test/464-checker-inline-sharpen-calls/Android.bp test/465-checker-clinit-gvn/Android.bp test/466-get-live-vreg/Android.bp test/469-condition-materialization/Android.bp test/470-huge-method/Android.bp test/471-deopt-environment/Android.bp test/472-type-propagation/Android.bp test/473-checker-inliner-constants/Android.bp test/473-remove-dead-block/Android.bp test/474-checker-boolean-input/Android.bp test/474-fp-sub-neg/Android.bp test/475-simplify-mul-zero/Android.bp test/476-checker-ctor-fence-redun-elim/Android.bp test/476-checker-ctor-memory-barrier/Android.bp test/476-clinit-inline-static-invoke/Android.bp test/477-checker-bound-type/Android.bp test/477-long-2-float-convers-precision/Android.bp test/478-checker-clinit-check-pruning/Android.bp test/478-checker-inline-noreturn/Android.bp test/478-checker-inliner-nested-loop/Android.bp test/479-regression-implicit-null-check/Android.bp test/480-checker-dead-blocks/Android.bp test/481-regression-phi-cond/Android.bp test/482-checker-loop-back-edge-use/Android.bp test/483-dce-block/Android.bp test/485-checker-dce-switch/Android.bp test/486-checker-must-do-null-check/Android.bp test/487-checker-inline-calls/Android.bp test/488-checker-inline-recursive-calls/Android.bp test/489-current-method-regression/Android.bp test/490-checker-inline/Android.bp test/491-current-method/Android.bp test/492-checker-inline-invoke-interface/Android.bp test/493-checker-inline-invoke-interface/Android.bp test/494-checker-instanceof-tests/Android.bp test/495-checker-checkcast-tests/Android.bp test/496-checker-inlining-class-loader/Android.bp test/497-inlining-and-class-loader/Android.bp test/499-bce-phi-array-length/Android.bp test/500-instanceof/Android.bp test/505-simplifier-type-propagation/Android.bp test/507-boolean-test/Android.bp test/507-referrer/Android.bp test/508-checker-disassembly/Android.bp test/508-referrer-method/Android.bp test/513-array-deopt/Android.bp test/514-shifts/Android.bp test/519-bound-load-class/Android.bp test/521-checker-array-set-null/Android.bp test/521-regression-integer-field-set/Android.bp test/524-boolean-simplifier-regression/Android.bp test/525-checker-arrays-fields1/Android.bp test/525-checker-arrays-fields2/Android.bp test/526-checker-caller-callee-regs/Android.bp test/526-long-regalloc/Android.bp test/527-checker-array-access-simd/Android.bp test/527-checker-array-access-split/Android.bp test/528-long-hint/Android.bp test/529-long-split/Android.bp test/530-checker-loops1/Android.bp test/530-checker-loops2/Android.bp test/530-checker-loops3/Android.bp test/530-checker-loops4/Android.bp test/530-checker-loops5/Android.bp test/530-checker-lse-ctor-fences/Android.bp test/530-checker-lse-simd/Android.bp test/530-checker-lse/Android.bp test/530-checker-lse2/Android.bp test/530-instanceof-checkcast/Android.bp test/530-regression-lse/Android.bp test/532-checker-nonnull-arrayset/Android.bp test/534-checker-bce-deoptimization/Android.bp test/535-deopt-and-inlining/Android.bp test/536-checker-intrinsic-optimization/Android.bp test/537-checker-arraycopy/Android.bp test/537-checker-jump-over-jump/Android.bp test/538-checker-embed-constants/Android.bp test/540-checker-rtp-bug/Android.bp test/542-bitfield-rotates/Android.bp test/542-inline-trycatch/Android.bp test/542-unresolved-access-check/Android.bp test/545-tracing-and-jit/Android.bp test/548-checker-inlining-and-dce/Android.bp test/549-checker-types-merge/Android.bp test/550-checker-multiply-accumulate/Android.bp test/550-new-instance-clinit/Android.bp test/551-checker-clinit/Android.bp test/551-checker-shifter-operand/Android.bp test/551-implicit-null-checks/Android.bp test/552-checker-sharpening/Android.bp test/552-checker-x86-avx2-bit-manipulation/Android.bp test/554-checker-rtp-checkcast/Android.bp test/555-UnsafeGetLong-regression/Android.bp test/557-checker-instruct-simplifier-ror/Android.bp test/558-switch/Android.bp test/559-bce-ssa/Android.bp test/559-checker-rtp-ifnotnull/Android.bp test/560-packed-switch/Android.bp test/561-divrem/Android.bp test/561-shared-slowpaths/Android.bp test/562-bce-preheader/Android.bp test/562-checker-no-intermediate/Android.bp test/563-checker-invoke-super/Android.bp test/564-checker-bitcount/Android.bp test/564-checker-inline-loop/Android.bp test/564-checker-negbitwise/Android.bp test/565-checker-condition-liveness/Android.bp test/566-checker-codegen-select/Android.bp test/566-polymorphic-inlining/Android.bp test/567-checker-builder-intrinsics/Android.bp test/568-checker-onebit/Android.bp test/570-checker-select/Android.bp test/572-checker-array-get-regression/Android.bp test/573-checker-checkcast-regression/Android.bp test/576-polymorphic-inlining/Android.bp test/577-checker-fp2int/Android.bp test/578-bce-visit/Android.bp test/578-polymorphic-inlining/Android.bp test/579-inline-infinite/Android.bp test/580-checker-round/Android.bp test/580-crc32/Android.bp test/581-rtp/Android.bp test/582-checker-bce-length/Android.bp test/583-checker-zero/Android.bp test/584-checker-div-bool/Android.bp test/589-super-imt/Android.bp test/590-checker-arr-set-null-regression/Android.bp test/591-checker-regression-dead-loop/Android.bp test/593-checker-long-2-float-regression/Android.bp test/594-checker-array-alias/Android.bp test/594-load-string-regression/Android.bp test/595-profile-saving/Android.bp test/597-deopt-busy-loop/Android.bp test/597-deopt-invoke-stub/Android.bp test/597-deopt-new-string/Android.bp test/602-deoptimizeable/Android.bp test/603-checker-instanceof/Android.bp test/604-hot-static-interface/Android.bp test/605-new-string-from-bytes/Android.bp test/607-daemon-stress/Android.bp test/609-checker-inline-interface/Android.bp test/609-checker-x86-bounds-check/Android.bp test/610-arraycopy/Android.bp test/611-checker-simplify-if/Android.bp test/614-checker-dump-constant-location/Android.bp test/615-checker-arm64-store-zero/Android.bp test/616-cha-abstract/Android.bp test/616-cha-interface/Android.bp test/616-cha-miranda/Android.bp test/616-cha-native/Android.bp test/616-cha-regression-proxy-method/Android.bp test/616-cha/Android.bp test/617-clinit-oome/Android.bp test/618-checker-induction/Android.bp test/619-checker-current-method/Android.bp test/620-checker-bce-intrinsics/Android.bp test/622-checker-bce-regressions/Android.bp test/623-checker-loop-regressions/Android.bp test/625-checker-licm-regressions/Android.bp test/626-set-resolved-string/Android.bp test/627-checker-unroll/Android.bp test/628-vdex/Android.bp test/629-vdex-speed/Android.bp test/631-checker-get-class/Android.bp test/632-checker-char-at-bounds/Android.bp test/635-checker-arm64-volatile-load-cc/Android.bp test/636-arm64-veneer-pool/Android.bp test/637-checker-throw-inline/Android.bp test/638-checker-inline-cache-intrinsic/Android.bp test/639-checker-code-sinking/Android.bp test/640-checker-boolean-simd/Android.bp test/640-checker-integer-valueof/Android.bp test/640-checker-simd/Android.bp test/641-checker-arraycopy/Android.bp test/641-iterations/Android.bp test/642-fp-callees/Android.bp test/643-checker-bogus-ic/Android.bp test/645-checker-abs-simd/Android.bp test/646-checker-arraycopy-large-cst-pos/Android.bp test/646-checker-long-const-to-int/Android.bp test/646-checker-simd-hadd/Android.bp test/647-jni-get-field-id/Android.bp test/650-checker-inline-access-thunks/Android.bp test/652-deopt-intrinsic/Android.bp test/654-checker-periodic/Android.bp test/655-checker-simd-arm-opt/Android.bp test/655-jit-clinit/Android.bp test/656-checker-simd-opt/Android.bp test/656-loop-deopt/Android.bp test/657-branches/Android.bp test/658-fp-read-barrier/Android.bp test/660-checker-sad/Android.bp test/660-checker-simd-sad/Android.bp test/660-clinit/Android.bp test/661-checker-simd-reduc/Android.bp test/661-oat-writer-layout/Android.bp test/662-regression-alias/Android.bp test/664-aget-verifier/Android.bp test/665-checker-simd-zero/Android.bp test/666-dex-cache-itf/Android.bp test/667-checker-simd-alignment/Android.bp test/667-jit-jni-stub/Android.bp test/667-out-of-bounds/Android.bp test/669-checker-break/Android.bp test/671-npe-field-opts/Android.bp test/672-checker-throw-method/Android.bp test/673-checker-throw-vmethod/Android.bp test/674-HelloWorld-Dm/Android.bp test/674-hotness-compiled/Android.bp test/676-proxy-jit-at-first-use/Android.bp test/677-fsi2/Android.bp test/679-locks/Android.bp test/680-checker-deopt-dex-pc-0/Android.bp test/680-sink-regression/Android.bp test/684-checker-simd-dotprod/Android.bp test/684-select-condition/Android.bp test/685-deoptimizeable/Android.bp test/687-deopt/Android.bp test/689-multi-catch/Android.bp test/689-zygote-jit-deopt/Android.bp test/693-vdex-inmem-loader-evict/Android.bp test/694-clinit-jit/Android.bp test/695-simplify-throws/Android.bp test/696-loop/Android.bp test/697-checker-string-append/Android.bp test/698-selects/Android.bp test/700-LoadArgRegs/Android.bp test/703-floating-point-div/Android.bp test/704-multiply-accumulate/Android.bp test/705-register-conflict/Android.bp test/707-checker-invalid-profile/Android.bp test/708-jit-cache-churn/Android.bp test/711-checker-type-conversion/Android.bp test/717-integer-value-of/Android.bp test/718-zipfile-finalizer/Android.bp test/720-thread-priority/Android.bp test/721-osr/Android.bp test/726-array-store/Android.bp test/728-imt-conflict-zygote/Android.bp test/805-TooDeepClassInstanceOf/Android.bp test/806-TooWideClassInstanceOf/Android.bp test/812-recursive-default/Android.bp test/813-fp-args/Android.bp test/814-large-field-offsets/Android.bp test/815-invokeinterface-default/Android.bp test/818-clinit-nterp/Android.bp test/900-hello-plugin/Android.bp test/901-hello-ti-agent/Android.bp test/902-hello-transformation/Android.bp test/903-hello-tagging/Android.bp test/904-object-allocation/Android.bp test/905-object-free/Android.bp test/906-iterate-heap/Android.bp test/907-get-loaded-classes/Android.bp test/908-gc-start-finish/Android.bp test/910-methods/Android.bp test/911-get-stack-trace/Android.bp test/913-heaps/Android.bp test/914-hello-obsolescence/Android.bp test/915-obsolete-2/Android.bp test/916-obsolete-jit/Android.bp test/917-fields-transformation/Android.bp test/918-fields/Android.bp test/919-obsolete-fields/Android.bp test/920-objects/Android.bp test/921-hello-failure/Android.bp test/922-properties/Android.bp test/923-monitors/Android.bp test/924-threads/Android.bp test/925-threadgroups/Android.bp test/926-multi-obsolescence/Android.bp test/927-timers/Android.bp test/928-jni-table/Android.bp test/930-hello-retransform/Android.bp test/931-agent-thread/Android.bp test/932-transform-saves/Android.bp test/933-misc-events/Android.bp test/937-hello-retransform-package/Android.bp test/939-hello-transformation-bcp/Android.bp test/940-recursive-obsolete/Android.bp test/941-recursive-obsolete-jit/Android.bp test/942-private-recursive/Android.bp test/943-private-recursive-jit/Android.bp test/944-transform-classloaders/Android.bp test/945-obsolete-native/Android.bp test/946-obsolete-throw/Android.bp test/947-reflect-method/Android.bp test/949-in-memory-transform/Android.bp test/950-redefine-intrinsic/Android.bp test/951-threaded-obsolete/Android.bp test/963-default-range-smali/Android.bp test/982-ok-no-retransform/Android.bp test/983-source-transform-verify/Android.bp test/984-obsolete-invoke/Android.bp test/985-re-obsolete/Android.bp test/986-native-method-bind/Android.bp test/987-agent-bind/Android.bp test/988-method-trace/Android.bp test/989-method-trace-throw/Android.bp test/990-field-trace/Android.bp test/991-field-trace-2/Android.bp test/992-source-data/Android.bp test/993-breakpoints/Android.bp test/994-breakpoint-line/Android.bp test/995-breakpoints-throw/Android.bp test/996-breakpoint-obsolete/Android.bp test/997-single-step/Android.bp test/Android.bp tools/Android.bp tools/ahat/Android.bp tools/ahat/Android.mk tools/art_verifier/Android.bp tools/cpp-define-generator/Android.bp tools/dexanalyze/Android.bp tools/dexfuzz/Android.bp tools/dmtracedump/Android.bp tools/hiddenapi/Android.bp tools/jfuzz/Android.bp tools/jvmti-agents/breakpoint-logger/Android.bp tools/jvmti-agents/chain-agents/Android.bp tools/jvmti-agents/dump-jvmti-state/Android.bp tools/jvmti-agents/enable-vlog/Android.bp tools/jvmti-agents/field-counts/Android.bp tools/jvmti-agents/field-null-percent/Android.bp tools/jvmti-agents/jit-load/Android.bp tools/jvmti-agents/list-extensions/Android.bp tools/jvmti-agents/simple-force-redefine/Android.bp tools/jvmti-agents/simple-profile/Android.bp tools/jvmti-agents/ti-alloc-sample/Android.bp tools/jvmti-agents/ti-fast/Android.bp tools/jvmti-agents/titrace/Android.bp tools/jvmti-agents/wrapagentproperties/Android.bp tools/signal_dumper/Android.bp tools/tracefast-plugin/Android.bp tools/veridex/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: sigchainlib/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL-2.0 to: Android.bp Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-with-classpath-exception to: dt_fd_forward/Android.bp openjdkjvmti/Android.bp Added SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-with-classpath-exception to: openjdkjvm/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: If775045c12955fa6d72d40ccf2a09beef93d1699 Merged-in: If775045c12955fa6d72d40ccf2a09beef93d1699
2021-02-26dexoptanalyzer: fix --validate_bcpOrion Hodson
Additional checks for validating boot classpath extensions: - Check there are images covering all of the boot classpath. - Add IsValid() checks to .oat and .vdex files. Bug: 180950875 Test: manually corrupting artifacts from odrefresh and checking Change-Id: Iccbee47ca63717aec5c8d065689c8851cf66cd61
2021-02-22dexoptanalyzer: fix a potential use of nullptrGeorge Burgess IV
If oat_file is nullptr here, we can't `GetLocation()` on it. unsure if there's more descriptive context to add here. Caught by the static analyzer: > art/dexoptanalyzer/dexoptanalyzer.cc:375:47: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage] Bug: None Test: TreeHugger Change-Id: Icdae5de4a4e4ff82ad03a247c53fc9583afdfa5d
2021-02-19dexoptanalyzer: Initialize only_validate_bcp_ fieldGreg Kaiser
Bug: 160683548 Test: TreeHugger Change-Id: I1693f77829312a9ebb30a60111bec26c8d41454d
2021-02-19dexoptanalyzer: Add --validate-bcp optionOrion Hodson
This validates boot class path images and oat files. Bug: 160683548 Test: TODO Change-Id: I0aa99f71cbadc05911b6967c7c761d00aa949739
2021-02-11dexoptanalyzer: add header library for dexoptanalyzer headersOrion Hodson
Enables programs invoking dexoptanalyzer to interpret the return values based on dexoptanalyzer.h. Bug: 160683548 Test: m Change-Id: I474c0016ecf24e5fc276b488afdbef323989560e
2021-02-09[metrics] Report some ART metadataEric Holk
Adds reporting for some metadata associated with ART metrics, including timestamp relative to ART startup, the session id, and the process's user id. It additionally outputs placeholders for the compilation reason and compiler filter, but these need some additional plumbing from the Runtime and OatFileManager to fill in, so those will come in a followup CL. This CL also includes a fair amount of refactoring around metrics reporting and handling the session data. Example output: *** ART internal metrics *** Metadata: timestamp_since_start_ms: 768 session_id: 5026277321588503825 uid: 123456 compilation_reason: Unknown compiler_filter: (unspecified) Metrics: ClassVerificationTotalTime: count = 4167 JitMethodCompileTime: range = 0...1000000, buckets: 7,0,0,0,0,0 *** Done dumping ART internal metrics *** Test: ./test/run-test --host --jit 2232-write-metrics-to-log Change-Id: Ic74b503b135d71099d9e26bf660b60e4cc3a46bc
2020-12-14Remove stripped-apk related logic from CLCCalin Juravle
Stripped-apks are no longer supported by the runtime and the current logic prevents bug fixes and code evolution. Bug: 111442216 Test: test-art-host Change-Id: I30d5825e4f6453981ca9165bebafe67557c28b93
2020-11-19Dexoptanalyzer: expose return codesOrion Hodson
Move ReturnCode to dexoptanalyzer.h and place in a new art::dexoptanalyzer namespace. Bug: 160683548 Test: m Change-Id: I0be8a9a99b0371cd7bea0c1a744f7c7159b61e20
2020-10-23Rename ART release APEX to com.android.art.Martin Stjernholm
Test: Build & boot on AOSP master Test: `m` on AOSP master, flipping PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD between true and false, and check out/target/product/bonito/symbols/apex/com.android.art. Test: art/build/apex/runtests.sh Test: art/tools/buildbot-build.sh {--host,--target} Test: art/tools/run-gtests.sh Test: m test-art-host-gtest Test: art/test/testrunner/testrunner.py --target --64 --optimizing Test: m build-art-target-golem Bug: 169639321 Change-Id: Ic4bb8d6f9988ce99bba326b9c635bd3c01ed74ab Merged-In: Ic4bb8d6f9988ce99bba326b9c635bd3c01ed74ab
2020-10-20Reland "Make 'quicken' an alias to 'verify'."Nicolas Geoffray
This reverts commit 7e9fc9d6d1622192f118bab771784eedfb66c60e. Bug: 170086509 Bug: 170588354 Bug: 170589481 Bug: 170589988. Reason for revert: TODO Change-Id: Ia1de625e90e4279b1cf0a584e5f0fbc8caa94efd
2020-10-12Revert "Make 'quicken' an alias to 'verify'."Ming-Shin Lu
This reverts commit 4f0e8daf7ed79c0712c0fd927c8ad2c903c15773. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I69100006175866595&testResultId=TR93113908724113263, bug 170588354, bug 170589481, bug 170589988. Change-Id: If8f4396aa0db024ed5817a4fed61c13caf32f785
2020-10-09Make 'quicken' an alias to 'verify'.Nicolas Geoffray
Bug: 170086509 Test: test.py Change-Id: I3267ddd51d36c35f23cb05e26dc1a1f062065d7f
2020-08-11Revert^2 "art: Remove dependencies on platform unavailable modules"Yo Chiang
Revert^2 "releasetools: Disable host module on darwin" 0ac3666667de42bd681586d642b52fc9e62e488f Change-Id: I0c2edeea8a10acc4a6e74a0660ebf7aa5dd67d1b
2020-08-06Revert "art: Remove dependencies on platform unavailable modules"Insaf Latypov
Revert "releasetools: Disable host module on darwin" Revert "conscrypt: Disable host module on darwin" Revert submission 1385032-mac-required-fix Reason for revert: breaks the build on aosp-master Reverted Changes: I13335299c:releasetools: Disable host module on darwin I728a4677a:conscrypt: Disable host module on darwin I8f3435ff1:art: Remove dependencies on platform unavailable m... Ibb9248ef4:art: Disable host module on darwin I7db68a629:libcore: Disable host module on darwin Bug: 163030797 Change-Id: Ibe83fc65bca64602e8b37b58b2ad6e20476efa63
2020-08-06art: Remove dependencies on platform unavailable modulesYo Chiang
The device variants of these tests depend on tools such as `dex2oatd` which are not available to the platform. The tools are provided by the ART APEX (com.android.art.debug / .testing). This also breaks darwin host build coincidentally, because on linux host build the build system confuses the host and device variants of `dex2oatd`, so the build system mistakenly thought device variant of "dex2oatd" exists (while in reality only the host variant exists.) On darwin host however, both device and host variants of `dex2oatd` doesn't exist, thus triggering a build break. So for the host variants of these tests, the tools dependencies should be specified as `host.required: [<tool name>]` and for the device variants `android.required: ["com.android.art.testing"]`. However these device testcases are already packaged in the ART testing APEX, so the device dependency should be omitted. Bug: 162102724 Bug: 7456955 Test: TH build mac host target Change-Id: I8f3435ff11f19f7191e87b0728e6d524bbd0f559
2020-05-29Finish move of jar compilation rules from makefile to soong.David Srbecky
The rules have already been previously ported to soong, but they were only used for atest. Always use them to simplify the makefile. This makes the gtest modules in .bp files depend on the needed jars, which ensures that they will be copied next to the test binary. This is needed as atest can not access them in the current location. It also simplifies the tradefed xml since the manual copying can be removed for the apex-based device testing. Test: test-art-host-gtest Test: atest ArtGtestsTarget Bug: 147819342 Change-Id: I54d92eca88fc04c949209d490e838d0a92ce8f87
2020-05-27Move gtest tool dependencies from makefile to soongDavid Srbecky
Bug: 147817558 Bug: 147819342 Test: run test individually and remove the tools directory between runs Change-Id: Ida773d76fdeadb38695d6a2556ad4a55adb823b5
2020-02-15Revert "Revert "Make class loader context fail for unknown class loaders""Calin Juravle
This reverts commit e9818ddd70565d52cc1cc93d6991d7e7ec2bc275. Make class loader context fail for unknown class loaders Update OatFileAssistant to fail the class loader check when getting an unknown (null) class loader. The code is only use in GetDexoptNeeded paths and does not affect the runtime behaviour. This will enable dexoptanalyzer to provide the right answer for dex files whose class loader changes often. Test: test-art-host Bug: 147208643 Change-Id: I2f8229fc25c018436c17439bdc9ac0899af25758
2020-02-14Revert "Make class loader context fail for unknown class loaders"Stefania Halac
This reverts commit 2d3de3a40015af07f7645a298f77b398af0c6c2c. Reason for revert: 8s regression in boot time b/149517940 Change-Id: I81365d1bd63c691d715b8f970dac9da64ab419ff
2020-02-12Make class loader context fail for unknown class loadersCalin Juravle
Update OatFileAssistant to fail the class loader check when getting an unknown (null) class loader. The code is only use in GetDexoptNeeded paths and does not affect the runtime behaviour. This will enable dexoptanalyzer to provide the right answer for dex files whose class loader changes often. Test: test-art-host Bug: 147208643 Change-Id: I869109e669e68afe094e7703ed574575b98d7cc6
2019-12-20Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMARJiyong Park
Reason for revert: relanding with fix Reverted Changes: Ic4119368c:Revert submission 1191937-art_apex_available Ia084976bb:Revert submission 1191937-art_apex_available Iada86226d:Revert submission 1191937-art_apex_available Ic76735eac:Revert submission 1191937-art_apex_available I1eb30e355:Revert submission 1191937-art_apex_available Icaf95d260:Revert submission 1191937-art_apex_available Ie8bace4be:Revert submission 1191937-art_apex_available I8961702cf:Revert submission 1191937-art_apex_available I39316f9ef:Revert submission 1191937-art_apex_available I522a7e83b:Revert submission 1191937-art_apex_available I8b9424976:Revert submission 1191937-art_apex_available I48b998629:Revert submission 1191937-art_apex_available Change-Id: I7a101d39ff63c153675e4e741f9de1a15a778d33
2019-12-19Revert submission 1191937-art_apex_availableJoseph Murphy
Original Commit Message: """ Rename modules that are APEX-only The renamed modules are only available for APEXes, but not for the platform. Use the <module_name>.<apex_name> syntax to correctly install the APEX variant of the modules. """ Reason for revert: Build Cop - Breaks about 15 AOSP targets, with high confidence due to these changes being the only non-robot changes in those builds. Reverted Changes: I190ce2d10:Use apex_available property I990e0a67e:Use apex_available property I0d1295683:Revert "Avoid duplicated classes for boot dex jars... I5fb725403:Find the jar libraries in APEX from the correct pa... I322b1efcc:Rename modules that are APEX-only Ifa2bd0f8f:Use apex_available property Iac6533177:Use apex_available property Ie999602c6:Use apex_available property I2a3d73397:Use apex_available property Ic91bcbb9a:Use apex_available property Ia6c324eed:Use apex_available property I964d0125c:Use apex_available property Change-Id: I1eb30e355cfce316b94cde0dd176002af8d222bb
2019-12-19Use apex_available propertyJiyong Park
Use apex_available property to prevent modules that are only for the ART apex from being used outside of the APEX. This change also fixes the reference to $(TARGET_OUT_SHARED_LIBRARIES)/$(lib).so to $(lib).com.android.art.debug phony module since the former is never installed to the system partition due to their 'apex_available' settings. Bug: 128708192 Bug: 133140750 Test: m Change-Id: I990e0a67e066d9b1dc221748422a2f44449258da
2019-09-24Various renames following the name change from "Runtime APEX" to "ART APEX".Martin Stjernholm
In particular ANDROID_RUNTIME_ROOT is now ANDROID_ART_ROOT. Test: Build & boot Test: art/tools/run-gtests.sh in chroot Test: art/test/testrunner/testrunner.py --target --64 in chroot Test: art/tools/run-libcore-tests.sh --mode=device --variant=X64 in chroot Test: art/tools/run-jdwp-tests.sh --mode=device --variant=X64 in chroot Test: m test-art-host-gtest Test: art/test/testrunner/testrunner.py --host --64 Test: art/tools/run-jdwp-tests.sh --mode=host Bug: 135753770 Change-Id: Ia74da964e54cf396d66e9e12ea56da4e9483662a
2019-04-12Add and use art::GetAndroidRuntimeBinDir.Roland Levillain
This method returns the location of the directory containing the Android Runtime binaries, which is expected to be the Android Runtime APEX's bin directory on target and the Android Root's bin directory on host (at least for now). Also remove art::CommonArtTestImpl::GetTestAndroidRoot as it is no longer used. Test: ART gtests on host and target Bug: 121117762 Change-Id: I4593bbd4d675ca9d3f7b708482aac82c1892a9ad
2019-03-22Support FDs for class loader context dex filesDavid Brazdil
When compiling secondary dex files, dex2oat/dexoptanalyzer must open all dex files in the given class loader context. However, these tools do not have the SELinux permission to open app data files and instead rely on installd to open them and pass file descriptors via command line arguments. This patch extends ClassLoaderContext::OpenDexFiles to support opening dex files from a provided list of FDs, assuming the order corresponds to the flattened class loader context. FDs can be passed to dex2oat/ dexoptanalyzer using a new '--class-loader-context-fds=' command line argument. The format is a colon-separated list of integers. dexoptanalyzer is also extended with a separate mode in which dexopt-needed analysis is not performed, only the class loader context is flattened and list of its dex files is printed to standard output as a colon-separated list of paths. This mode is enabled with '--flatten-class-loader-context' and is used by installd to obtain a list of files it should open for dex2oat/dexoptanalyzer. Bug: 126674985 Test: atest installd_dexopt_test Change-Id: I46a671c90d14ad8615508c106a88ac1ee8a4ef28
2019-02-07Replace StringPiece with std::string_view in profman.Vladimir Marko
And in dexoptanalyzer and hiddenapi, see below. The parsing helpers in utils.h were mostly unused, only profman was calling one of them, so move that helper to profman and rewrite and fix it, remove the other helpers. This exposed dependency of dexoptanalyzer and hiddenapi on StringPiece indirectly included from utils.h, thus we replace it with std::string_view also in those tools. During the rewrite, avoid using std::string_view::data() as a null terminated string, prefer to fall back to the original null terminated raw option instead. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 123750182 Change-Id: Ibeec8069a5d82ea556e03e4577812f94dca6f387
2019-01-10Create the class loader context within a Runtime scope.Nicolas Geoffray
Otherwise, we would delete the maps owned by the class loader context *after* deleting the runtime, which is a destruction order violation as the runtime owns the map lock. bug: 122475825 Test: dexoptanalyzer_test Change-Id: Ia81b0720e3178a71f143a524b61e3e63e5973e16
2018-12-04Reduce core image to 6 modules.Vladimir Marko
This was Revert^2 "Reduce core image to core-{oj,libart,simple}." but we're now keeping three additional modules, namely conscrypt, okhttp and bouncycastle. And we fix the boot class path used by vogar with the companion change https://android-review.googlesource.com/840810 . This reverts commit 00fe35e4021e9a8679eca3ffaede48fd89b56258. Change-Id: I6137edd91c03c17be50de200267eb9adc971e8fb Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 3 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Test: art/tools/run-libcore-tests.sh --mode=device --variant=X64 Bug: 119868597
2018-12-03Revert "Reduce core image to core-{oj,libart,simple}."Vladimir Marko
This reverts commit ec91d48cade73c54f7a03c5d53d863bc2490976e. Reason for revert: Breaks libcore tests. Change-Id: I0ea55f74635332177eadd9a69fb831e7f5dc16c7
2018-11-30Reduce core image to core-{oj,libart,simple}.Vladimir Marko
And pass the -Xbootclasspath: and -Xbootclasspath-locations: options to tests. This eliminates a discrepancy between the image and boot class path (BCP). Next CL shall check the BCP stored in the primary boot image oat file against the BCP from the runtime. Use actual *-hostdex.jar/*-testdex.jar files for compiling the core.art. Since conscrypt, okhttp and bouncycastle have the dex files actually stripped from their *-testdex.jar, they are unsuitable for compilation, adding another reason to not include them in the core image. For consistency, use the same jars for core image on host. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 3 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Bug: 119868597 Change-Id: Iccc152ea0d5b3bd9878aa214cc649762f8f4ea9c
2018-11-29Add --runtime-arg to command line tools.Vladimir Marko
This shall be used in the next CL to pass -Xbootclasspath: and -Xbootclasspath-location: that match the --image= arg. Test: m test-art-host-gtest Test: Manually run oatdump with --runtime-arg -Xms256m Bug: 119868597 Change-Id: Ia355a646bf34a3314c56b9a2fb20f1ef96570fbd
2018-11-20ART: Fix performance-inefficient-vector-operationAndreas Gampe
Bug: 32619234 Test: m test-art-host Change-Id: I286e27424ac39c0fed308811dc3004e734c0560c
2018-11-08Minimal Android Runtime APEX module.Roland Levillain
Introduce build rules to generate com.android.runtime, a minimal Android Runtime APEX module containing just ART and its dependencies. When module com.android.runtime is built (`make com.android.runtime`), make produces a `com.android.runtime.apex` package in the `apex` directory of the system partition (`$ANDROID_PRODUCT_OUT/system/apex/com.android.runtime.apex`). This module is not built by default when generating a system image. Test: make com.android.runtime Test: art/build/apex/runtests.sh Bug: 113373927 Change-Id: I2019bd1934558feba6eccef13b887b2faa96caec
2018-10-11Merge "ART: Completely remove the --compile-pic option."Vladimir Marko
2018-10-10ART: Completely remove the --compile-pic option.Vladimir Marko
And the PIC-related fields from image header. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: testrunner.py --target --optimizing Bug: 77856493 Change-Id: I3787369378f12d8cd9003bebeae62830a67def33
2018-10-09ART: Refactor for bugprone-argument-commentAndreas Gampe
Handles smaller subdirectories. Bug: 116054210 Test: WITH_TIDY=1 mmma art Change-Id: I81c8f3396b9922684b68e9f3d8fccefe364f1279
2018-09-04Remove PIC option from oat files.Vladimir Marko
dex2oat has been producing only PIC code for some time, so there's no need to record it in the oat file anymore. Also get rid of the now unnecessary relocation logic that was using the flag. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Bug: 77856493 Change-Id: I070071ca5a808371f67883f4ae93d633a76231d0