From 9556cb2bfc6788656d53a9ddb2159ca2040f6e38 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Tue, 21 Mar 2017 11:21:36 -0700 Subject: Make original dex file be more deduplicated Now when retransformClasses is called we will use the DexCache from the transformed class to hold the original dex file. This means that there should be fewer redundant copies of dex files lying around from class redefinition. Bug: 31455788 Test: mma -j40 test-art-host-gtest Test: ./test/testrunner/testrunner.py --host -j40 Change-Id: I60150e436d79aabb36da31ec679cb7ec4c820573 --- runtime/mirror/class_ext.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/mirror/class_ext.h') diff --git a/runtime/mirror/class_ext.h b/runtime/mirror/class_ext.h index fac955a45e..708665d46b 100644 --- a/runtime/mirror/class_ext.h +++ b/runtime/mirror/class_ext.h @@ -60,11 +60,11 @@ class MANAGED ClassExt : public Object { OFFSET_OF_OBJECT_MEMBER(ClassExt, obsolete_methods_)); } - ByteArray* GetOriginalDexFileBytes() REQUIRES_SHARED(Locks::mutator_lock_) { - return GetFieldObject(OFFSET_OF_OBJECT_MEMBER(ClassExt, original_dex_file_bytes_)); + Object* GetOriginalDexFile() REQUIRES_SHARED(Locks::mutator_lock_) { + return GetFieldObject(OFFSET_OF_OBJECT_MEMBER(ClassExt, original_dex_file_)); } - void SetOriginalDexFileBytes(ObjPtr bytes) REQUIRES_SHARED(Locks::mutator_lock_); + void SetOriginalDexFile(ObjPtr bytes) REQUIRES_SHARED(Locks::mutator_lock_); void SetObsoleteArrays(ObjPtr methods, ObjPtr> dex_caches) REQUIRES_SHARED(Locks::mutator_lock_); @@ -89,7 +89,7 @@ class MANAGED ClassExt : public Object { HeapReference obsolete_methods_; - HeapReference original_dex_file_bytes_; + HeapReference original_dex_file_; // The saved verification error of this class. HeapReference verify_error_; -- cgit v1.2.3-59-g8ed1b