diff options
| -rw-r--r-- | dex2oat/linker/image_writer.cc | 19 | ||||
| -rw-r--r-- | dex2oat/linker/image_writer.h | 4 |
2 files changed, 0 insertions, 23 deletions
diff --git a/dex2oat/linker/image_writer.cc b/dex2oat/linker/image_writer.cc index 6a134548a9..685174dedd 100644 --- a/dex2oat/linker/image_writer.cc +++ b/dex2oat/linker/image_writer.cc @@ -213,10 +213,6 @@ bool ImageWriter::PrepareImageAddressSpace(TimingLogger* timings) { // since the cookie field contains long pointers to DexFiles which are not deterministic. // b/34090128 ClearDexFileCookies(); - } else { - TimingLogger::ScopedTiming t("ComputeLazyFieldsForImageClasses", timings); - // Avoid for app image since this may increase RAM and image size. - ComputeLazyFieldsForImageClasses(); // Add useful information } } { @@ -753,21 +749,6 @@ bool ImageWriter::AllocMemory() { return true; } -class ImageWriter::ComputeLazyFieldsForClassesVisitor : public ClassVisitor { - public: - bool operator()(ObjPtr<Class> c) override REQUIRES_SHARED(Locks::mutator_lock_) { - StackHandleScope<1> hs(Thread::Current()); - mirror::Class::ComputeName(hs.NewHandle(c)); - return true; - } -}; - -void ImageWriter::ComputeLazyFieldsForImageClasses() { - ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); - ComputeLazyFieldsForClassesVisitor visitor; - class_linker->VisitClassesWithoutClassesLock(&visitor); -} - static bool IsBootClassLoaderClass(ObjPtr<mirror::Class> klass) REQUIRES_SHARED(Locks::mutator_lock_) { return klass->GetClassLoader() == nullptr; diff --git a/dex2oat/linker/image_writer.h b/dex2oat/linker/image_writer.h index e45023e6dc..f4557467b6 100644 --- a/dex2oat/linker/image_writer.h +++ b/dex2oat/linker/image_writer.h @@ -429,10 +429,6 @@ class ImageWriter final { // Debug aid that list of requested image classes. void DumpImageClasses(); - // Preinitializes some otherwise lazy fields (such as Class name) to avoid runtime image dirtying. - void ComputeLazyFieldsForImageClasses() - REQUIRES_SHARED(Locks::mutator_lock_); - // Visit all class loaders. void VisitClassLoaders(ClassLoaderVisitor* visitor) REQUIRES_SHARED(Locks::mutator_lock_); |