diff options
author | 2022-09-13 15:22:29 +0100 | |
---|---|---|
committer | 2022-09-14 14:02:54 +0000 | |
commit | f8537907783fdbba9a880b3261c2601bbad5fddb (patch) | |
tree | 030bb5ce77b963dd332177b25b22f8292dd3204c /compiler/optimizing/code_generator.h | |
parent | b7b5fe5b363ed049aabdc8047a7a507072b6418a (diff) |
Add a IsInitialized check in AOT code with clinit at entry checks.
The investigations behind
https://android-review.googlesource.com/c/platform/art/+/2214701 showed
that it can take some time for a class to become visibly initialized. To
avoid a busy loop between the AOT code and the resolution trampoline, we
also add a isInitialized check, which if true will be followed by a
memory barrier and the execution of the compiled code.
Test: test.py
Bug: 162110941
Change-Id: I6c36cde6ebd12b1f81281eb8a684b496f266e3ea
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r-- | compiler/optimizing/code_generator.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 6b85aaa880..578a3417ba 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -68,6 +68,8 @@ constexpr uint32_t shifted_visibly_initialized_value = enum_cast<uint32_t>(ClassStatus::kVisiblyInitialized) << (status_lsb_position % kBitsPerByte); constexpr uint32_t shifted_initializing_value = enum_cast<uint32_t>(ClassStatus::kInitializing) << (status_lsb_position % kBitsPerByte); +constexpr uint32_t shifted_initialized_value = + enum_cast<uint32_t>(ClassStatus::kInitialized) << (status_lsb_position % kBitsPerByte); class Assembler; class CodeGenerator; |