Class clean-up and compute name during image writing.
Name is computed lazily, if this occurs for an image class it will cause
a card mark and for that part of the image to be scanned every GC. By
precomputing the name we avoid the GC overhead, speed up some reflection
operations, save allocation heap footprint at a cost of ~300kb in the
image.
Remove and reorganize reflection native methods to agree with patch to
libcore.
Change-Id: I4b621be4a9d9bb381a647963066c3305ce40745f
diff --git a/src/image_writer.h b/src/image_writer.h
index d834361..1be07bd 100644
--- a/src/image_writer.h
+++ b/src/image_writer.h
@@ -99,6 +99,9 @@
bool IsImageClass(const Class* klass);
void DumpImageClasses();
+ void ComputeLazyFieldsForImageClasses();
+ static bool ComputeLazyFieldsForClassesVisitor(Class* klass, void* arg);
+
void PruneNonImageClasses();
static bool NonImageClassesVisitor(Class* c, void* arg);