Combine class sets when writing a class table
Reduces the boot.art size since we allocate a new class set with the
default load factor. The load factor in the combined class table is
higher to pruning classes, this reduces the size of the boot image.
Also fixes the hypothetical case where the class table being written
has multiple class sets.
Boot.art size
Before: 8122368
After: 8044544
Slight cleanup in patchoat.cc.
Bug: 22858531
Change-Id: I31b3ea2004ece6f6c853ee906074bb2792dee958
diff --git a/runtime/class_table.h b/runtime/class_table.h
index 219e2c6..c911365 100644
--- a/runtime/class_table.h
+++ b/runtime/class_table.h
@@ -104,6 +104,7 @@
REQUIRES(Locks::classlinker_classes_lock_)
SHARED_REQUIRES(Locks::mutator_lock_);
+ // Combines all of the tables into one class set.
size_t WriteToMemory(uint8_t* ptr) const
REQUIRES(Locks::classlinker_classes_lock_)
SHARED_REQUIRES(Locks::mutator_lock_);