From e401d146407d61eeb99f8d6176b2ac13c4df1e33 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 22 Apr 2015 13:56:20 -0700 Subject: Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d --- runtime/scoped_thread_state_change.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'runtime/scoped_thread_state_change.h') diff --git a/runtime/scoped_thread_state_change.h b/runtime/scoped_thread_state_change.h index 60ed55a914..1cc2df65ba 100644 --- a/runtime/scoped_thread_state_change.h +++ b/runtime/scoped_thread_state_change.h @@ -158,20 +158,15 @@ class ScopedObjectAccessAlreadyRunnable { return reinterpret_cast(field); } - mirror::ArtMethod* DecodeMethod(jmethodID mid) const - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + ArtMethod* DecodeMethod(jmethodID mid) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { Locks::mutator_lock_->AssertSharedHeld(Self()); DCHECK(IsRunnable()); // Don't work with raw objects in non-runnable states. - CHECK(!kMovingMethods); - mirror::ArtMethod* method = reinterpret_cast(mid); - return ReadBarrier::BarrierForRoot(&method); + return reinterpret_cast(mid); } - jmethodID EncodeMethod(mirror::ArtMethod* method) const - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + jmethodID EncodeMethod(ArtMethod* method) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { Locks::mutator_lock_->AssertSharedHeld(Self()); DCHECK(IsRunnable()); // Don't work with raw objects in non-runnable states. - CHECK(!kMovingMethods); return reinterpret_cast(method); } -- cgit v1.2.3-59-g8ed1b