summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-05-29 15:44:49 +0000
committer Vladimir Marko <vmarko@google.com> 2024-05-31 13:13:22 +0000
commit89eeacffd742607074da73fc5a8b267d2e6f3d0f (patch)
tree2baf35600427fd43b9332b3f1d2fe78f1896d7e1 /runtime/class_linker.cc
parent89cd145a0ad31c3bb9151eb27f1b02af9ca140a2 (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.cc6
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();
}
}