diff options
author | 2024-05-29 15:44:49 +0000 | |
---|---|---|
committer | 2024-05-31 13:13:22 +0000 | |
commit | 89eeacffd742607074da73fc5a8b267d2e6f3d0f (patch) | |
tree | 2baf35600427fd43b9332b3f1d2fe78f1896d7e1 /runtime/class_linker.cc | |
parent | 89cd145a0ad31c3bb9151eb27f1b02af9ca140a2 (diff) |
Faster `ArtMethod` fixup in `ImageWriter`.
Calculate the access flags in a local variable to avoid
unnecessary atomic operations. Clean up the code to avoid
some unnecessary branching. Avoid nterp flag recalculation
when the target ISA is the same as `kRuntimeISA`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: I2486d54f4b4cf73f9b8e94b366ee9db3085e5fa7
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 7359056d32..52caa9f1cf 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -4163,9 +4163,13 @@ void ClassLinker::LoadMethod(const DexFile& dex_file, } } - if (Runtime::Current()->IsZygote() && + if ((access_flags & kAccAbstract) == 0u && + Runtime::Current()->IsZygote() && !Runtime::Current()->GetJITOptions()->GetProfileSaverOptions().GetProfileBootClassPath()) { + DCHECK(!ArtMethod::IsAbstract(access_flags)); + DCHECK(!ArtMethod::IsIntrinsic(access_flags)); dst->SetMemorySharedMethod(); + dst->SetHotCounter(); } } |