Revert "Revert "Reduce dirty image pages by improving binning""
This reverts commit 8ace610a222892f7b700e4f95e50fa6315ab85c0.
(cherry picked from commit 80c563ba136fd8da8791cf0f1a5f8f7026816ead)
Change-Id: I5b312f41d8b96eb189ea8b9d3a3ab861c5c9d515
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index f204b28..0cb6aea 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -149,16 +149,17 @@
void RecordImageAllocations() SHARED_REQUIRES(Locks::mutator_lock_);
// Classify different kinds of bins that objects end up getting packed into during image writing.
+ // Ordered from dirtiest to cleanest (until ArtMethods).
enum Bin {
- // Likely-clean:
- kBinString, // [String] Almost always immutable (except for obj header).
+ kBinMiscDirty, // Dex caches, object locks, etc...
+ kBinClassVerified, // Class verified, but initializers haven't been run
// Unknown mix of clean/dirty:
kBinRegular,
- // Likely-dirty:
+ kBinClassInitialized, // Class initializers have been run
// All classes get their own bins since their fields often dirty
kBinClassInitializedFinalStatics, // Class initializers have been run, no non-final statics
- kBinClassInitialized, // Class initializers have been run
- kBinClassVerified, // Class verified, but initializers haven't been run
+ // Likely-clean:
+ kBinString, // [String] Almost always immutable (except for obj header).
// Add more bins here if we add more segregation code.
// Non mirror fields must be below.
// ArtFields should be always clean.