summaryrefslogtreecommitdiff
path: root/runtime/class_table.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2021-01-15 10:04:45 +0000
committer Vladimir Marko <vmarko@google.com> 2021-01-19 09:11:51 +0000
commit4c796aad94ecf594d3e792da4e5d2424638791da (patch)
tree466b796ded30a136713b7b2756e8fa6d5db6dafb /runtime/class_table.h
parentdd732cc38f57844bfcedc5687d4b66df7102f31f (diff)
Rewrite class table construction in ImageWriter.
Make sure that class tables in images are at maximum load factor (full) and make that maximum load factor independent of runtime parameters. As we pre-allocate a class table buffer of the right size in ImageWriter, we also avoid unnecessary resizing of the temporary class table. Make sure that app image class tables are deterministic. We previously just copied the class table from the app class loader even though some entries may have been inserted there during multi-threaded phases of the compilation, causing non-deterministic contents based on insertion order. Remove obsolete comment related to patchoat relocations. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: boots. Bug: 175869411 Change-Id: I605048b639f67a5ed4b03eb8888cbaafa9ba4091
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r--runtime/class_table.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h
index 810c09c3ec..544a26b992 100644
--- a/runtime/class_table.h
+++ b/runtime/class_table.h
@@ -238,11 +238,6 @@ class ClassTable {
REQUIRES(!lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
- // Combines all of the tables into one class set.
- size_t WriteToMemory(uint8_t* ptr) const
- REQUIRES(!lock_)
- REQUIRES_SHARED(Locks::mutator_lock_);
-
// Read a table from ptr and put it at the front of the class set.
size_t ReadFromMemory(uint8_t* ptr)
REQUIRES(!lock_)
@@ -269,10 +264,6 @@ class ClassTable {
}
private:
- // Only copies classes.
- void CopyWithoutLocks(const ClassTable& source_table) NO_THREAD_SAFETY_ANALYSIS;
- void InsertWithoutLocks(ObjPtr<mirror::Class> klass) NO_THREAD_SAFETY_ANALYSIS;
-
size_t CountDefiningLoaderClasses(ObjPtr<mirror::ClassLoader> defining_loader,
const ClassSet& set) const
REQUIRES(lock_)