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/intern_table.h | |
parent | 261d3cda32b28782d894be0244e617f78182ee3b (diff) | |
download | art-c11d9b8870de5f860b13c84003ade7b3f3125a52.zip art-c11d9b8870de5f860b13c84003ade7b3f3125a52.tar.gz art-c11d9b8870de5f860b13c84003ade7b3f3125a52.tar.bz2 |
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/intern_table.h')
-rw-r--r-- | runtime/intern_table.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/intern_table.h b/runtime/intern_table.h index 07615dc..e68af90 100644 --- a/runtime/intern_table.h +++ b/runtime/intern_table.h @@ -66,6 +66,9 @@ class InternTable { void DumpForSigQuit(std::ostream& os) const; + void DisallowNewInterns() EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_); + void AllowNewInterns() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + private: typedef std::multimap<int32_t, mirror::String*> Table; @@ -79,6 +82,8 @@ class InternTable { mutable Mutex intern_table_lock_; bool is_dirty_ GUARDED_BY(intern_table_lock_); + bool allow_new_interns_ GUARDED_BY(intern_table_lock_); + ConditionVariable new_intern_condition_ GUARDED_BY(intern_table_lock_); Table strong_interns_ GUARDED_BY(intern_table_lock_); Table weak_interns_ GUARDED_BY(intern_table_lock_); }; |