From 7dfb28c066159e6cde8181720f0c451a700ef966 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Thu, 22 Aug 2013 08:18:36 -0700 Subject: Don't scan image space when starting runtime. Bug 10432288. Find Classes and Strings from dex caches lazily rather than when the image is loaded. Make class status changes do notifies when there can be waiters. For Class lookup there's a pathology if we always search dex caches and so after 1000 failures move all classes into the class table. Be consistent in using "const char*" for class linker descriptors as this most easily agrees with the type in the dex file. Improve the intern run-test so that it has a case of a literal contained in the image. Modify image_test to allow any valid lock word rather than expecting 0, ideally we wouldn't see inflated monitors but we do due to NotifyAll (see bug 6961405). Change-Id: Ia9bfa748eeccb9b4498784b97c6823141b1f6db8 --- runtime/monitor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/monitor.h') diff --git a/runtime/monitor.h b/runtime/monitor.h index 02c10a7..6651768 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -100,6 +100,8 @@ class Monitor { void* callback_context) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + static bool IsValidLockWord(int32_t lock_word); + mirror::Object* GetObject(); private: @@ -188,6 +190,7 @@ class MonitorList { Mutex monitor_list_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; std::list list_ GUARDED_BY(monitor_list_lock_); + friend class Monitor; DISALLOW_COPY_AND_ASSIGN(MonitorList); }; -- cgit v1.1