summaryrefslogtreecommitdiffstats
path: root/runtime/monitor.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-08-22 08:18:36 -0700
committerIan Rogers <irogers@google.com>2013-08-23 10:49:29 -0700
commit7dfb28c066159e6cde8181720f0c451a700ef966 (patch)
tree5279fb95da015365846eb48d931b9355b540cb9e /runtime/monitor.h
parenta7e885013753df3f07bf038a8c4a187fb97c78e1 (diff)
downloadart-7dfb28c066159e6cde8181720f0c451a700ef966.tar.gz
art-7dfb28c066159e6cde8181720f0c451a700ef966.tar.bz2
art-7dfb28c066159e6cde8181720f0c451a700ef966.zip
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
Diffstat (limited to 'runtime/monitor.h')
-rw-r--r--runtime/monitor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/monitor.h b/runtime/monitor.h
index 02c10a7a10..66517683c2 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<Monitor*> list_ GUARDED_BY(monitor_list_lock_);
+ friend class Monitor;
DISALLOW_COPY_AND_ASSIGN(MonitorList);
};