diff options
| author | 2017-03-21 11:21:36 -0700 | |
|---|---|---|
| committer | 2017-03-22 09:43:30 -0700 | |
| commit | 9556cb2bfc6788656d53a9ddb2159ca2040f6e38 (patch) | |
| tree | 7ff34f1d63f8520208dd4689171968bbc59f983b /runtime/mirror/class_ext.h | |
| parent | f11cbe1361cc93f07e7a5ab1c9f0af4605552535 (diff) | |
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
Diffstat (limited to 'runtime/mirror/class_ext.h')
| -rw-r--r-- | runtime/mirror/class_ext.h | 8 |
1 files changed, 4 insertions, 4 deletions
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<ByteArray>(OFFSET_OF_OBJECT_MEMBER(ClassExt, original_dex_file_bytes_)); + Object* GetOriginalDexFile() REQUIRES_SHARED(Locks::mutator_lock_) { + return GetFieldObject<Object>(OFFSET_OF_OBJECT_MEMBER(ClassExt, original_dex_file_)); } - void SetOriginalDexFileBytes(ObjPtr<ByteArray> bytes) REQUIRES_SHARED(Locks::mutator_lock_); + void SetOriginalDexFile(ObjPtr<Object> bytes) REQUIRES_SHARED(Locks::mutator_lock_); void SetObsoleteArrays(ObjPtr<PointerArray> methods, ObjPtr<ObjectArray<DexCache>> dex_caches) REQUIRES_SHARED(Locks::mutator_lock_); @@ -89,7 +89,7 @@ class MANAGED ClassExt : public Object { HeapReference<PointerArray> obsolete_methods_; - HeapReference<ByteArray> original_dex_file_bytes_; + HeapReference<Object> original_dex_file_; // The saved verification error of this class. HeapReference<Object> verify_error_; |