diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-03-31 16:36:35 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-04-07 13:44:36 -0700 |
commit | 440e4ceb310349ee8eb569495bc04d3d7fbe71cb (patch) | |
tree | db278d463f0c2440e9c8e8cb80e53d2b2effe196 /runtime/monitor.h | |
parent | 4d3dc8a04da8a80251b381cdb482190363171dc1 (diff) | |
download | art-440e4ceb310349ee8eb569495bc04d3d7fbe71cb.tar.gz art-440e4ceb310349ee8eb569495bc04d3d7fbe71cb.tar.bz2 art-440e4ceb310349ee8eb569495bc04d3d7fbe71cb.zip |
Add monitor deflation.
We now deflate the monitors when we perform a heap trim. This causes
a pause but it shouldn't matter since we should be in a state where
we don't care about pauses. Memory savings are hard to measure.
Fixed integer overflow bug in GetEstimatedLastIterationThroughput.
Bug: 13733906
Change-Id: I4e0e68add02e7f43370b3a5ea763d6fe8a5b212c
Diffstat (limited to 'runtime/monitor.h')
-rw-r--r-- | runtime/monitor.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/monitor.h b/runtime/monitor.h index 55504b5943..c459278269 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -224,9 +224,11 @@ class MonitorList { void Add(Monitor* m); void SweepMonitorList(IsMarkedCallback* callback, void* arg) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - void DisallowNewMonitors(); - void AllowNewMonitors(); + LOCKS_EXCLUDED(monitor_list_lock_) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void DisallowNewMonitors() LOCKS_EXCLUDED(monitor_list_lock_); + void AllowNewMonitors() LOCKS_EXCLUDED(monitor_list_lock_); + void DeflateMonitors() LOCKS_EXCLUDED(monitor_list_lock_) + EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_); private: bool allow_new_monitors_ GUARDED_BY(monitor_list_lock_); |