diff options
author | Mathieu Chartier <mathieuc@google.com> | 2013-09-19 10:01:59 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2013-09-20 10:36:49 -0700 |
commit | c11d9b8870de5f860b13c84003ade7b3f3125a52 (patch) | |
tree | 89b0250d35a950774f98fa1abfa9cc296c9d85db /runtime/monitor.h | |
parent | 261d3cda32b28782d894be0244e617f78182ee3b (diff) | |
download | art-c11d9b8870de5f860b13c84003ade7b3f3125a52.tar.gz art-c11d9b8870de5f860b13c84003ade7b3f3125a52.tar.bz2 art-c11d9b8870de5f860b13c84003ade7b3f3125a52.zip |
Re-enable concurrent system weak sweeping.
Enabled by disallowing new system weaks during the pause and
re-allowing it after the system weaks have been swept. Reduces
GC pause by ~1ms.
Fixes pause regression caused by fix for
Bug: 10626133
Change-Id: If49d33e7ef19cb728ed3cef5187acfa53b9b05d8
Diffstat (limited to 'runtime/monitor.h')
-rw-r--r-- | runtime/monitor.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/monitor.h b/runtime/monitor.h index 66517683c2..0b5b7e546a 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -182,12 +182,14 @@ class MonitorList { ~MonitorList(); void Add(Monitor* m); - void SweepMonitorList(IsMarkedTester is_marked, void* arg) SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_); - + void DisallowNewMonitors(); + void AllowNewMonitors(); private: + bool allow_new_monitors_ GUARDED_BY(monitor_list_lock_); Mutex monitor_list_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; + ConditionVariable monitor_add_condition_ GUARDED_BY(monitor_list_lock_); std::list<Monitor*> list_ GUARDED_BY(monitor_list_lock_); friend class Monitor; |