summaryrefslogtreecommitdiff
path: root/runtime/class_status.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up generated operator<<(os, enum).Vladimir Marko2020-06-111-1/+1
| | | | | | | | | | | | | | | | | Pass enums by value instead of const reference. Do not generate operator<< sources for headers that have no enums or no declarations of operator<<. Do not define the operator<< for flag enums; these were unused anyway. Add generated operator<< for some enums in nodes.h . Change the operator<< for ComparisonBias so that the graph visualizer can use it but do not use the generated operator<< yet as that would require changing checker tests. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Ifd4c455c2fa921a9668c966a13068d43b9c6e173
* Add a new class status for verified with access checks.Nicolas Geoffray2020-06-091-2/+10
| | | | | | | | | | At runtime, we won't run the verifier for those classes, but run with access checks enabled in the interpreter. Bug: 157265232 Test: test.py Change-Id: Ia087c3b6f9fcbd295307333e524945d844ef54dc
* Implement ClassStatus::kVisiblyInitialized.Vladimir Marko2019-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously all class initialization checks involved a memory barrier to ensure appropriate memory visibility. We change that by introducing the kVisiblyInitialized status which can be checked without a memory barrier. Before we mark a class as visibly initialized, we run a checkpoint on all threads to ensure memory visibility. This is done in batches for up to 32 classes to reduce the overhead. Avoiding memory barriers in the compiled code reduces code size and improves performance. This is also the first step toward fixing a long-standing synchronization bug 18161648. Prebuilt sizes for aosp_taimen-userdebug: - before: arm/boot*.oat: 19150696 arm64/boot*.oat: 22574336 oat/arm64/services.odex: 21929800 - after: arm/boot*.oat: 19134508 (-16KiB) arm64/boot*.oat: 22553664 (-20KiB) oat/arm64/services.odex: 21888760 (-40KiB) Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: aosp_taimen-userdebug boots Test: run-gtests.sh -j4 Test: testrunner.py --target --optimizing Test: Manually diff `m dump-oat-boot` output from before with output after this CL without codegen changes, with `sed` replacements for class status. Check that only checksums and the oatdump runtime values of DexCache.dexFile differ. Bug: 18161648 Bug: 36692143 Change-Id: Ida10439d347e680a0abf4674546923374ffaa957
* Change ClassStatus to fit into 4 bits.Vladimir Marko2018-01-051-31/+31
| | | | | | | | | | | | | | | | | In preparation for extending the type check bit string from 24 to 28 bits, rewrite ClassStatus to fit into 4 bits. Also perform a proper cleanup of the ClassStatus, i.e. change it to an enum class, remove the "Status" word from enumerator names, replace "Max" with "Last" in line with other enumerations and remove aliases from mirror::Class. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: testrunner.py --target --optimizing Bug: 64692057 Bug: 65318848 Change-Id: Iec1610ba5dac2c527b36c12819f132e1a77f2d45
* runtime: Bitstring implementation for subtype checking (4/4).Igor Murashkin2017-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | | Integrate the previous CLs into ART Runtime. Subsequent CLs to add optimizing compiler support. Use spare 24-bits from "Class#status_" field to implement faster subtype checking in the runtime. Does not incur any extra memory overhead, and (when in compiled code) this is always as fast or faster than the original check. The new subtype checking is O(1) of the form: src <: target := (*src).status >> #imm_target_mask == #imm_target_shifted Based on the original prototype CL by Zhengkai Wu: https://android-review.googlesource.com/#/c/platform/art/+/440996/ Test: art/test.py -b -j32 --host Bug: 64692057 Change-Id: Iec3c54af529055a7f6147eebe5611d9ecd46942b
* ART: Move Class::Status to ClassStatusAndreas Gampe2017-09-051-0/+96
Move the enum to its own file to lower include burden on others. This is an intentionally small and localized change. Users will be cleaned up in a follow-up. Bug: 63467744 Bug: 65318848 Test: m test-art-host Change-Id: If3bfe6953973e24623e78a2a8dcc69b50117aa3c