summaryrefslogtreecommitdiff
path: root/runtime/jit/jit_code_cache-inl.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-04-11 16:13:45 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-04-11 17:52:09 +0000
commit69c9ea4f93a688ff50e08060be37bcfd3f3e9910 (patch)
tree2622c38549bc219b7d2dc7c990eb83a30cc6b571 /runtime/jit/jit_code_cache-inl.h
parente8da7cd1d0e7d3535c82f8d05adcef3edd43cd40 (diff)
Revert "x86_64: Add JIT support for LoadMethodType."
This reverts commit 53ca944020bb86199f6f80d8594d5deb1b1d46dd. Bug: 297147201 Reason for revert: Crash on bot Change-Id: Ibf3b53a8fe67aa633686990881a96acb783af9a3
Diffstat (limited to 'runtime/jit/jit_code_cache-inl.h')
-rw-r--r--runtime/jit/jit_code_cache-inl.h82
1 files changed, 0 insertions, 82 deletions
diff --git a/runtime/jit/jit_code_cache-inl.h b/runtime/jit/jit_code_cache-inl.h
deleted file mode 100644
index 6f2a9ddaae..0000000000
--- a/runtime/jit/jit_code_cache-inl.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ART_RUNTIME_JIT_JIT_CODE_CACHE_INL_H_
-#define ART_RUNTIME_JIT_JIT_CODE_CACHE_INL_H_
-
-#include "jit/jit_code_cache.h"
-
-#include "base/macros.h"
-#include "read_barrier.h"
-#include "thread.h"
-#include "well_known_classes-inl.h"
-
-namespace art HIDDEN {
-
-class ArtMethod;
-
-namespace jit {
-
-template<typename RootVisitorType>
-EXPORT void JitCodeCache::VisitRootTables(ArtMethod* method, RootVisitorType& visitor) {
- if (method->IsNative()) {
- return;
- }
-
- Thread* self = Thread::Current();
- ScopedDebugDisallowReadBarriers sddrb(self);
- MutexLock mu(self, *Locks::jit_lock_);
-
- auto range = method_code_map_reversed_.equal_range(method);
-
- for (auto it = range.first; it != range.second; ++it) {
- uint32_t number_of_roots = 0;
- const uint8_t* root_table = GetRootTable(it->second, &number_of_roots);
- uint8_t* roots_data = private_region_.IsInDataSpace(root_table)
- ? private_region_.GetWritableDataAddress(root_table)
- : shared_region_.GetWritableDataAddress(root_table);
- GcRoot<mirror::Object>* roots = reinterpret_cast<GcRoot<mirror::Object>*>(roots_data);
- for (uint32_t i = 0; i < number_of_roots; ++i) {
- // This does not need a read barrier because this is called by GC.
- mirror::Object* object = roots[i].Read<kWithoutReadBarrier>();
- if (!(object == nullptr ||
- object == Runtime::GetWeakClassSentinel() ||
- object->IsString<kDefaultVerifyFlags>() ||
- object->IsClass<kDefaultVerifyFlags>())) {
- // We don't need to visit j.l.Class and j.l.String and the only remaining possible
- // objects are MethodType-s.
- if (kIsDebugBuild) {
- ObjPtr<mirror::Class> method_type_class =
- WellKnownClasses::java_lang_invoke_MethodType.Get<kWithoutReadBarrier>();
- ObjPtr<mirror::Class> klass =
- object->GetClass<kDefaultVerifyFlags, kWithoutReadBarrier>();
- CHECK(klass == method_type_class ||
- klass == ReadBarrier::IsMarked(method_type_class.Ptr()) ||
- ReadBarrier::IsMarked(klass.Ptr()) == method_type_class);
- }
-
- visitor.VisitRoot(roots[i].AddressWithoutBarrier());
- }
- }
- }
-}
-
-} // namespace jit
-} // namespace art
-
-#endif // ART_RUNTIME_JIT_JIT_CODE_CACHE_INL_H_
-
-