summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_cfi_test.cc
AgeCommit message (Collapse)Author
2020-02-13Remove MIPS support from Optimizing.Vladimir Marko
Test: aosp_taimen-userdebug boots. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 147346243 Change-Id: I97fdc15e568ae3fe390efb1da690343025f84944
2019-10-14Revert "Make compiler/optimizing/ symbols hidden."Vladimir Marko
This reverts commit e2727154f25e0db9a5bb92af494d8e47b181dfcf. Reason for revert: Breaks ASAN tests (ODR violation). Bug: 142365358 Change-Id: I38103d74a1297256c81d90872b6902ff1e9ef7a4
2019-10-14Make compiler/optimizing/ symbols hidden.Vladimir Marko
Make symbols in compiler/optimizing hidden by a namespace attribute. The unit intrinsic_objects.{h,cc} is excluded as it is needed by dex2oat. As the symbols are no longer exported, gtests are now linked with the static version of the libartd-compiler library. libart-compiler.so size: - before: arm: 2396152 arm64: 3345280 - after: arm: 2016176 (-371KiB, -15.9%) arm64: 2874480 (-460KiB, -14.1%) Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --jit Bug: 142365358 Change-Id: I1fb04a33351f53f00b389a1642e81a68e40912a8
2018-09-07ART: Continue adding override annotationsAndreas Gampe
Use Clang-tidy's modernize-use-override to add more annotations. Ignore inferred annotations on destructors. Bug: 32619234 Test: mmma art Change-Id: Ic432c928e398d44df9171e42db04ee19946e6887
2018-08-28Use 'final' and 'override' specifiers directly in ART.Roland Levillain
Remove all uses of macros 'FINAL' and 'OVERRIDE' and replace them with 'final' and 'override' specifiers. Remove all definitions of these macros as well, which were located in these files: - libartbase/base/macros.h - test/913-heaps/heaps.cc - test/ti-agent/ti_macros.h ART is now using C++14; the 'final' and 'override' specifiers have been introduced in C++11. Test: mmma art Change-Id: I256c7758155a71a2940ef2574925a44076feeebf
2018-07-19ART: Clean up unused using declarationsAndreas Gampe
Make tidy happy, and enable checking. Test: mmma art Change-Id: I9e18e80b3f37dd2aeb8ecd1c25abe4d5cf2f1c45
2018-06-25Move instruction_set_ to CompilerOptions.Vladimir Marko
Removes CompilerDriver dependency from ImageWriter and several other classes. 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 Change-Id: I3c5b8ff73732128b9c4fad9405231a216ea72465
2018-04-11Revert^2 "Compile link-time thunks in codegen."Vladimir Marko
The linker crash (the reason for revert) is flaky and maybe we shall not see it with this CL now that unrelated source code has changed. Test: Rely on TreeHugger Bug: 36141117 Bug: 77581732 This reverts commit 5806a9ec99b5494b511e84c74f494f0b3a8ebec5. Change-Id: I3a4a058847dff601681ba391abf45833424fa06d
2018-04-04Revert "Compile link-time thunks in codegen."Vladimir Marko
Reason for revert: This caused clang linker crash in several branches. Bug: 77581732 This reverts commit c9dd2207dfdab42586b1d6a5e7f11cf2fcea3a7a. Change-Id: I1923809083cf41c4f19e3e60df03ae80517aaedb
2018-04-04Compile link-time thunks in codegen.Vladimir Marko
Prepare for experimenting with Baker read barrier marking introspection entrypoints for JIT. Test: m test-art-host-gtest Test: Compare compiled boot*.oat before and after (no diff). Test: Pixel 2 XL boots. Bug: 36141117 Change-Id: Idb413a31b158db4bf89a8707ea46dd167a06f110
2018-01-13Change compiler tests to have aligned code itemMathieu Chartier
Previously, the code item was not necessarily 32 bit aligned. This caused bus errors on armv7. Also create a real dexfile object instead of casting 0 initialized memory to a dex file pointer. We just got lucky before that the cdex boolean was false. Test: test-art-target-gtest Bug: 63756964 Bug: 71605148 Change-Id: Ic7199f2b97bbd421de1d702efa5c6531ff45c022
2018-01-02ART: Emit runtime read barrier checks only in slow-debugAndreas Gampe
Move runtime read barrier check emission to slow-debug to have better control over when this instrumentation is done. Bug: 35644369 Bug: 68025088 Test: m test-art-host Test: manual inspection of core image code Change-Id: I69b3b6f243c30813a741fe9e0a460f1543c6bc5d
2017-11-02ART: Make InstructionSet an enum class and add kLast.Vladimir Marko
Adding InstructionSet::kLast shall make it easier to encode the InstructionSet in fewer bits using BitField<>. However, introducing `kLast` into the `art` namespace is not a good idea, so we change the InstructionSet to an enum class. This also uncovered a case of InstructionSet::kNone being erroneously used instead of vixl32::Condition::None(), so it's good to remove `kNone` from the `art` namespace. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I6fa6168dfba4ed6da86d021a69c80224f09997a6
2017-10-17Use ScopedArenaAllocator for code generation.Vladimir Marko
Reuse the memory previously allocated on the ArenaStack by optimization passes. This CL handles only the architecture-independent codegen and slow paths, architecture-dependent codegen allocations shall be moved to the ScopedArenaAllocator in a follow-up. Memory needed to compile the two most expensive methods for aosp_angler-userdebug boot image: BatteryStats.dumpCheckinLocked() : 19.6MiB -> 18.5MiB (-1189KiB) BatteryStats.dumpLocked(): 39.3MiB -> 37.0MiB (-2379KiB) Also move definitions of functions that use bit_vector-inl.h from bit_vector.h also to bit_vector-inl.h . Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 64312607 Change-Id: I84688c3a5a95bf90f56bd3a150bc31fedc95f29c
2017-10-06ART: Use ScopedArenaAllocator for pass-local data.Vladimir Marko
Passes using local ArenaAllocator were hiding their memory usage from the allocation counting, making it difficult to track down where memory was used. Using ScopedArenaAllocator reveals the memory usage. This changes the HGraph constructor which requires a lot of changes in tests. Refactor these tests to limit the amount of work needed the next time we change that constructor. Test: m test-art-host-gtest Test: testrunner.py --host Test: Build with kArenaAllocatorCountAllocations = true. Bug: 64312607 Change-Id: I34939e4086b500d6e827ff3ef2211d1a421ac91a
2017-09-18ART: Move read barrier config out of globalsAndreas Gampe
Reduce the global dependencies by refactoring where the read barrier constants are defined. Rename read_barier_c.h to read_barier_config.h and ifdef the C++ parts to have a common header for both C/asm and C++. Put heap poisoning configuration into its own minimal header. Fix up transitive includes. Test: m Change-Id: I159669ec61e3d1c4c7ddcd79e63b023a0519717a
2017-07-24ART: Include cleanupAndreas Gampe
Let clang-format reorder the header includes. Derived with: * .clang-format: BasedOnStyle: Google IncludeIsMainRegex: '(_test|-inl)?$' * Steps: find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup' git-clang-format -style=file HEAD^ manual inspection git commit -a --amend Test: mmma art Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
2017-07-14Remove the old ARM code generator from ART's Optimizing compiler.Roland Levillain
The AArch32 VIXL-based code generator has been the default ARM code generator in ART for some time now. The old ARM code generator does not compile anymore; retiring it. Test: test.py Bug: 63316036 Change-Id: Iab8fbc4ac73eac2c1a809cd7b22fec6b619755db
2017-07-12Fix ART ARM64 CFI gtests with GCs other than CC with Baker read barriers.Roland Levillain
Since the introduction of a Marking Register in the ARM64 back end, gtests jni_cfi_test and optimizing_cfi_test produce different outputs for the Concurrent Copying (CC) collector with Baker read barriers on the one hand, and for other GCs on the other hand. Test: m test-art-host-gtest with tree built with ART_USE_READ_BARRIER=false Bug: 37707231 Change-Id: I63de8873f52df593eb664970f2be20f1089804a9
2017-03-16Revert "Revert "ARM: VIXL32: Use VIXL backend by default.""Nicolas Geoffray
bug:35977033 This reverts commit 25275bef429dc6a48b79411e0d0b32207294523b. Change-Id: I440bf8415e2bf550607595499701fb3e7c33b37e
2017-03-14Revert "ARM: VIXL32: Use VIXL backend by default."Nicolas Geoffray
Revert while investigating. bug:35977033 This reverts commit e6316892821287b1d1906b9962eae129fbdc37be. Change-Id: I51e24a6e539072a6d0d470dfe41855a4847f3e96
2017-02-21ARM: VIXL32: Use VIXL backend by default.Scott Wakeling
export ART_USE_OLD_ARM_BACKEND=true to use the previous backend. Test: mma test-art-host && mma test-art-target Change-Id: I4024a4ea15fa8ce1269c0837f6ea001b6c809df5
2016-12-12ARM: VIXL32: Test both current and new assemblers with optimizing_cfi_test.Scott Wakeling
Test: m test-art-host Change-Id: I71b97113d9bc3ad5abe5f5f89a0d94c243c8f2e2
2016-10-26ART: Change InstructionSetFeatures to return unique_ptrAndreas Gampe
This makes clear the ownership of the object. Test: m test-art-host Change-Id: I55fa734f04bc3046d370f4dcf98ce6b17c59e234
2016-10-17ARM: VIXL32: Pass initial ART tests with new code generator.Scott Wakeling
- Implement enough codegen to pass ~70 art/tests. - When ART_USE_VIXL_ARM_BACKEND is defined: - Blacklist known-to-fail target tests - interpret-only everything except the tests themselves - Set a flag to use the VIXL based ARM backend Test: export ART_USE_VIXL_ARM_BACKEND=true && mma test-art-target && mma test-art-host Change-Id: Ic8bc095e8449f10f97fa0511284790f36c20e276
2016-09-02Clean up some includes.Vladimir Marko
Remove some unnecessary includes from header files, replace others with forward references and add includes to source files as needed. Reduce dependency on stack.h by pulling StackReference<> out to its own file. Test: m test-art-host Change-Id: I0fb182145e328870cbd918b0ef6ae2950223c1b2
2016-08-19Fix building tests with partial arch codegen supportColin Cross
Add conditionals around more code that is only used for codegen for specific architectures, and move a few more files into the architecture-specific codegen lists. Tests: ART_HOST_CODEGEN_ARCHS="x86_64 mips" m -j ART_TARGET_CODEGEN_ARCHS=svelte test-art-host Bug: 30928847 Change-Id: I0444d15e1cafe4c9b13ff78718c3b13b544270e7
2016-04-22Refactor use of __ANDROID__ macroBilyan Borisov
We use the __ANDROID__ macro, which is provided by the toolchain, in numerous places. This patch refactors the usage of this by defining a new macro, ART_TARGET_ANDROID, that is being passed during build to ART_TARGET_CFLAGS in Android.common_build.mk on the same line as ART_TARGET. The codebase currently assumes that the existence of the __ANDROID__ macro implies that we are compiling art for an android target device. This is because, currently, target builds are compiled with target toolchains that provide the macro, while host toolchains do not. With this change this assumption is still preserved. However, in a future patch we will add the ability to compile art for a linux target, and in that case the ART_TARGET_ANDROID macro won't be passed anymore. Change-Id: I1f3a811aa735c87087d812da27fc6b08f01bad51
2016-04-12Allocate code generators on the arena.Vladimir Marko
Change-Id: If8cf0ee43711f6e13171443e3c057ff370ccfbaa
2015-11-21MIPS64: Support short and long branchesAlexey Frunze
Change-Id: I618c960bd211048166d9fde78d4106bd3ca42b3a
2015-11-04Delay emitting CFI PC adjustments until after Thumb2/Mips fixup.Vladimir Marko
On Mips also take into account out-of-order CFI data emitted from EmitBranches(). Change-Id: I03b0b0b4c2b1ea31a02699ef5fa1c55aa42c23c3
2015-09-16Optimizing: Tag arena allocations in HGraph.Vladimir Marko
Replace GrowableArray with ArenaVector in HGraph and related classes HEnvironment, HLoopInformation, HInvoke and HPhi, and tag allocations with new arena allocation types. Change-Id: I3d79897af405b9a1a5b98bfc372e70fe0b3bc40d
2015-07-30ART: Use __ANDROID__ instead of HAVE_ANDROID_OSAndreas Gampe
Use the proper define. Change-Id: I71e291ac25f5d5f0187ac9b6ef2d6872f19e6085
2015-06-17Revert "Revert "ART: Implement literal pool for arm, fix branch fixup.""Vladimir Marko
This reverts commit fbeb4aede0ddc5b1e6a5a3a40cc6266fe8518c98. Adjust block label positions. Bad catch block labels were the reason for the revert. Change-Id: Ia6950d639d46b9da6b07f3ade63ab46d03d63310
2015-05-29Move mirror::ArtMethod to nativeMathieu Chartier
Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
2015-05-11Add a parent environment to HEnvironment.Nicolas Geoffray
This code has no functionality change. It adds a placeholder for chaining inlined frames. Change-Id: I5ec57335af76ee406052345b947aad98a6a4423a
2015-04-12Move 'ret' instruction generation inside GenerateFrameExit.David Srbecky
Change-Id: I0c594d9a2356a006a5ce8dfd41d307cf7c3704ba
2015-04-09Fix memory leaks in the CFI tests.David Srbecky
Change-Id: Icb98e4995731c7ac5f99d1be20b447161ea4c4bd
2015-04-09Implement CFI for Optimizing.David Srbecky
CFI is necessary for stack unwinding in gdb, lldb, and libunwind. Change-Id: I1a3480e3a4a99f48bf7e6e63c4e83a80cfee40a2