From c11d9b8870de5f860b13c84003ade7b3f3125a52 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 19 Sep 2013 10:01:59 -0700 Subject: 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 --- runtime/monitor.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/monitor.h') diff --git a/runtime/monitor.h b/runtime/monitor.h index 6651768..0b5b7e5 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 list_ GUARDED_BY(monitor_list_lock_); friend class Monitor; -- cgit v1.1