summaryrefslogtreecommitdiff
path: root/runtime/class_table.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-03-17 07:11:11 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-03-21 10:31:08 +0000
commit3ab2474fa0b3bc8a09279d3aa33f0651522a420d (patch)
treee8ebf2361e20f77abd2e3e8ea71cfde97fd0d750 /runtime/class_table.cc
parent14d3c2c0a0ca3733f63430066ce14b1f9ba5d90d (diff)
Use correct min/max load factor in intern/class table.
Propagate the min/max load factor that was initially set based on low memory mode flag to new internal sets. And clean up some dead code related to image writing. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Id13c8a4833e93458a3f5eed22dc69431311211b7
Diffstat (limited to 'runtime/class_table.cc')
-rw-r--r--runtime/class_table.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/class_table.cc b/runtime/class_table.cc
index 03921a132a..bd5d38f80d 100644
--- a/runtime/class_table.cc
+++ b/runtime/class_table.cc
@@ -30,7 +30,11 @@ ClassTable::ClassTable() : lock_("Class loader classes", kClassLoaderClassesLock
void ClassTable::FreezeSnapshot() {
WriterMutexLock mu(Thread::Current(), lock_);
- classes_.push_back(ClassSet());
+ // Propagate the min/max load factor from the old active set.
+ DCHECK(!classes_.empty());
+ const ClassSet& last_set = classes_.back();
+ ClassSet new_set(last_set.GetMinLoadFactor(), last_set.GetMaxLoadFactor());
+ classes_.push_back(std::move(new_set));
}
ObjPtr<mirror::Class> ClassTable::UpdateClass(const char* descriptor,