diff options
| author | 2017-04-07 10:38:06 -0700 | |
|---|---|---|
| committer | 2017-04-07 14:52:13 -0700 | |
| commit | 1e3926ae224c6418c6e1209bb134c28116a2c1fb (patch) | |
| tree | dbd6a5611266133552841fba75a01b3541dfa6d8 /runtime/mirror/class_ext.cc | |
| parent | 672082ab6edf7c12a1d7b1d9303aa0aa4fcce089 (diff) | |
Free unneeded obsolete maps
In cases where there are no new obsolete methods we can get rid of the
obsolete maps arrays.
Bug: 31455788
Test: ./test.py --host -j40
Change-Id: I4a8cd96b4293439c6e67d9426011b92125cc7b03
Diffstat (limited to 'runtime/mirror/class_ext.cc')
| -rw-r--r-- | runtime/mirror/class_ext.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/mirror/class_ext.cc b/runtime/mirror/class_ext.cc index 94e4b88f6c..32d49bbc10 100644 --- a/runtime/mirror/class_ext.cc +++ b/runtime/mirror/class_ext.cc @@ -40,8 +40,6 @@ uint32_t ClassExt::ClassSize(PointerSize pointer_size) { void ClassExt::SetObsoleteArrays(ObjPtr<PointerArray> methods, ObjPtr<ObjectArray<DexCache>> dex_caches) { - DCHECK_EQ(GetLockOwnerThreadId(), Thread::Current()->GetThreadId()) - << "Obsolete arrays are set without synchronization!"; CHECK_EQ(methods.IsNull(), dex_caches.IsNull()); auto obsolete_dex_cache_off = OFFSET_OF_OBJECT_MEMBER(ClassExt, obsolete_dex_caches_); auto obsolete_methods_off = OFFSET_OF_OBJECT_MEMBER(ClassExt, obsolete_methods_); @@ -54,8 +52,7 @@ void ClassExt::SetObsoleteArrays(ObjPtr<PointerArray> methods, // these arrays are written into without all threads being suspended we have a race condition! This // race could cause obsolete methods to be missed. bool ClassExt::ExtendObsoleteArrays(Thread* self, uint32_t increase) { - DCHECK_EQ(GetLockOwnerThreadId(), Thread::Current()->GetThreadId()) - << "Obsolete arrays are set without synchronization!"; + // TODO It would be good to check that we have locked the class associated with this ClassExt. StackHandleScope<5> hs(self); Handle<ClassExt> h_this(hs.NewHandle(this)); Handle<PointerArray> old_methods(hs.NewHandle(h_this->GetObsoleteMethods())); |