summaryrefslogtreecommitdiff
path: root/oatdump/oatdump_app_test.cc
AgeCommit message (Collapse)Author
2024-02-20riscv64: Enable some gtests. Vladimir Marko
Keep tests disabled for riscv64 if they are disabled for arm and arm64. Fix `GetInstructionSetFromELF()` to recognize riscv64. This partially reverts commit 476491deb9f9abb04f25888a20280d950714048b . Test: run-gtests.sh Bug: 271573990 Change-Id: Iccf1e2b1e93ed09eaf27884c34696f42fd752ec4
2023-08-02Overhaul oatdump options. Jiakai Zhang
Changes: - `--app-image` (which dumps the app image) no longer requires `--image`. oatdump infers the boot image location when possible. - `--app-image` now only dumps the app image, and doesn't fall through to dumping the boot image anymore. - `--app-oat` is now deprecated and becomes an alias of `--oat-file`. - When `--oat-file` (which dumps the oat file) is combined with `--app-image`, it now correctly takes `--dex-file` as an additional flag to specify the dex filename. Before this change, oatdump ignored `--dex-file` when `--app-image` was specified, and it only dumped the oat header. - Using `--oat-file` alone now brings up a runtime whenever possible. This allows dumping more information including BSS mappings for BCP dex files. Before this change, oat files were dumped with runtime only if `--boot-image` was specified. - When the dex code is missing, oatdump now always dumps the oat file without runtime. Before this change, it tried to dump with runtime and failed. - `--boot-image` now accepts a non-existing path, to start the runtime in imageless mode. This allows dumping with runtime for an oat file that is generated without a boot image. - oatdump now checks the BCP checksums before dumping with runtime. Before this change, it crashed when there was a BCP mismatch. - When `--image` (which dumps the boot image) is unexpectedly combined with `--boot-image`, oatdump now ignores `--boot-image`. Before this change, the behavior was controlled by `--image` but the location was taken from `--boot-image`. - The order of precedence of the options is clarified in the code, but is unchanged for backward compatibility. Bug: 293335130 Test: Manually tested the examples in the help text added by this CL. Test: m test-art-host-gtest-art_oatdump_tests Test: atest art_standalone_oatdump_tests Change-Id: I3e1dcf403f6fb459bcd91b47e5f4513237813215
2023-08-02Make oatdump_test slightly more flexible. Jiakai Zhang
Bug: 293335130 Test: m test-art-host-gtest-art_oatdump_tests Change-Id: Ibf5cd25d8c27a09ee9da27caa109f7505bfdc710
2023-08-02Parameterize oatdump_test. Jiakai Zhang
This change divides the size of the test sources by two. Bug: 293335130 Test: m test-art-host-gtest-art_oatdump_tests Change-Id: I69ff64391f82e37073212a72109e41a1dfc085ac
2023-05-02riscv64: disable gtests for unsupported components. Ulya Trafimovich
Bug: b/271573990 Test: gtests on host: lunch aosp_riscv64-userdebug && m test-art-host-gtest Test: gtests on target (on a Linux RISC-V VM): lunch aosp_riscv64-userdebug export ART_TEST_SSH_USER=ubuntu export ART_TEST_SSH_HOST=localhost export ART_TEST_SSH_PORT=10001 export ART_TEST_ON_VM=true . art/tools/buildbot-utils.sh art/tools/buildbot-build.sh --target # Create, boot and configure the VM. art/tools/buildbot-vm.sh create art/tools/buildbot-vm.sh boot art/tools/buildbot-vm.sh setup-ssh # password: 'ubuntu' art/tools/buildbot-cleanup-device.sh art/tools/buildbot-setup-device.sh art/tools/buildbot-sync.sh art/tools/run-gtests.sh Change-Id: I278e3453406a91a5e9d03645cafb9a9d1f82d896
2021-03-15Rewrite hot method info retrieval. Vladimir Marko
Remove the `ProfileCompilationInfo::GetHotMethodInfo()` API and provide another API to tie profile indexes to dex files for inline caches that avoids unnecessary heap allocations. And look up only dex caches for the referenced dex files when getting AOT inline caches in HInliner. Test: m test-art-host-gtest Test: testrunner.py --host --optimzing Test: boots. Bug: 181943478 Change-Id: I124ac4870b0f483c1f0422c841c4ff69fc95b7e0
2019-07-19Fix handling for invalid or missing app images Mathieu Chartier
Avoid crashing when there is an invalid app image path passed to oatdump. Added regression test. Bug: 137724009 Test: test-art-host-gtest-oatdump_app_test Change-Id: I27470d0c1d844de5b9f3f3bf960e925cd8977d50
2019-07-05Revert "Remove ShadowFrame::dex_pc_ (but keep dex_pc_ptr_)" David Srbecky
This reverts commit 50bc8fb89c79874e731f245abda3b9e48a541cfe. Reason for revert: Performance regression Change-Id: Ib39ceb9e1f2753c518dd24fd193a824211fd5795
2019-07-03Remove ShadowFrame::dex_pc_ (but keep dex_pc_ptr_) David Srbecky
They store the same information which is redundant and error prone. Test: ./art/test.py --interpreter Change-Id: I379c20973b90645e3c1016c253d9a6db9a2417dc
2019-02-27Revert^2 "Fix oatdump .data.bimg.rel.ro for intrinsics." Vladimir Marko
This reverts commit 44044b1522c7486ca8b308bf49b1f39b82626e6d. Failing test was disabled for SS/GSS/Debug GC. Test: Additional test in oatdump_app_test Test: m test-art-host-gtest Bug: 71526895 Bug: 126305867 Change-Id: I2cf598ef735ca87430cdb007e7331ad444edad43
2019-02-26Revert "Fix oatdump .data.bimg.rel.ro for intrinsics." Lokesh Gidra
This reverts commit 9a8dcea0e97e610c5b8589e0093dbb7766a08694. Reason for revert: Causing the oatdump_app_test gtest failure over several builds. Change-Id: I5b985fc701183415529f636cf2e39ed46031ff59
2019-02-22Fix oatdump .data.bimg.rel.ro for intrinsics. Vladimir Marko
The Integer.valueOf() intrinsic is using entries that point to the boot image live objects array data rather than a start of an Object. So, we need to check for such entries before we look at the type of the Object. Test: Additional test in oatdump_app_test Test: m test-art-host-gtest Bug: 71526895 Change-Id: I49ab3b416aa2b4912b9fd2043805e900ad76f0f2
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
2018-07-13ART: Clean up test exec code Andreas Gampe
Add a helper for fork+exec of another program and collection of that process' output. Use the helper in other code. Clean up some tests. Move away from global #ifdef ARCH and disable tests with the usual-style macros so that it's easier to see refactoring issues immediately. Test: mmma Test: m test-art-host Change-Id: Ic450e8a3bb24fc6fe423c0e1e007eb0bb34e22b4
2018-03-12Fix oatdump_app_test for address sanitizer. Vladimir Marko
Pass -Xmx64M to dex2oat to reduce the memory allocation as the test was failing to allocate the default 512MiB heap area for certain address sanitation configs. Test: SANITIZE_HOST=address ASAN_OPTIONS=detect_leaks=0 \ ART_HEAP_POISONING=true ART_USE_READ_BARRIER=false \ m test-art-host-gtest-oatdump_app_test Bug: 74378710 Change-Id: I74503df6e98a113a86a938150d69399c9eead306
2018-02-28Fix oatdump for app with --boot-image and add test. Vladimir Marko
Test: oatdump_app_test Bug: 67081292 Change-Id: I2e0bccac4ab866f6b54855f9795b16f2ea30c9bb