summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-11-19 12:21:38 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2024-11-20 10:57:23 +0000
commit723708ddb645439631dc8ccffa5eecd97aaaad57 (patch)
tree833c9b3ee18e04e0ddb52ab8f7edf4de9548bf00 /runtime/class_linker.cc
parentdbe738240d1e5f390112c57e25854aef781ebbed (diff)
Revert "Always use an array in the DexCache for ArtField and ArtMethod."
This reverts commit 1f9c184392020cb5c4bdf453f4c8847ca389614b. Reason for revert: Memory regressions. Change-Id: I85357603c31aa7dbde92aea5958167ea8f0fd481
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc16
1 files changed, 0 insertions, 16 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 6d247a6d7a..eb9e9062cb 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -10994,24 +10994,8 @@ void ClassLinker::InsertDexFileInToClassLoader(ObjPtr<mirror::Object> dex_file,
}
}
-class ReclaimMemoryDexCacheVisitor : public DexCacheVisitor {
- public:
- ReclaimMemoryDexCacheVisitor() {}
-
- void Visit(ObjPtr<mirror::DexCache> dex_cache)
- REQUIRES_SHARED(Locks::dex_lock_, Locks::mutator_lock_) override {
- dex_cache->ReclaimMemory();
- }
-};
-
void ClassLinker::CleanupClassLoaders() {
Thread* const self = Thread::Current();
- // We clear dex cache arrays for every GC.
- {
- ReaderMutexLock mu(self, *Locks::dex_lock_);
- ReclaimMemoryDexCacheVisitor visitor;
- VisitDexCaches(&visitor);
- }
std::list<ClassLoaderData> to_delete;
// Do the delete outside the lock to avoid lock violation in jit code cache.
{