diff options
author | 2021-05-10 17:28:32 +0000 | |
---|---|---|
committer | 2021-05-14 07:38:39 +0000 | |
commit | ec06809b9fb7d4a0d2c3e46066bd37034130e53b (patch) | |
tree | c3a69b142e38d249a01ed425cde23caa78c1d36c /runtime/entrypoints/entrypoint_utils.cc | |
parent | 1651c6050d913fb38ebd293df9da6d189eb3851d (diff) |
Reland "Devirtualize to HInvokeStaticOrDirect."
This reverts commit 39d4df62d4e2606073d05cc363370db825ad7b9f.
Reason for revert: fix JIT-zygote issue.
Test: JIT zygote boots.
Change-Id: I895ad8e59e472fb662ca9bc5394c2fd9c6babc74
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r-- | runtime/entrypoints/entrypoint_utils.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index ef0c474026..1c0127a519 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -302,6 +302,10 @@ void MaybeUpdateBssMethodEntry(ArtMethod* callee, MethodReference callee_referen oat_file->GetBssMethods().data() + oat_file->GetBssMethods().size()); std::atomic<ArtMethod*>* atomic_entry = reinterpret_cast<std::atomic<ArtMethod*>*>(method_entry); + if (kIsDebugBuild) { + ArtMethod* existing = atomic_entry->load(std::memory_order_acquire); + CHECK(existing->IsRuntimeMethod() || existing == callee); + } static_assert(sizeof(*method_entry) == sizeof(*atomic_entry), "Size check."); atomic_entry->store(callee, std::memory_order_release); } |