diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-03-19 17:08:17 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-03-20 09:17:02 -0700 |
commit | 1ad2784ad9f311ebf9fe0677d33818648f423f9c (patch) | |
tree | 3dbc930a653615e074cc4965ded9e0cc6ed07a45 /runtime/gc/collector/mark_sweep.h | |
parent | 66e4c3e96dccdec7423d673ad6bbf7821a776651 (diff) | |
download | art-1ad2784ad9f311ebf9fe0677d33818648f423f9c.zip art-1ad2784ad9f311ebf9fe0677d33818648f423f9c.tar.gz art-1ad2784ad9f311ebf9fe0677d33818648f423f9c.tar.bz2 |
Add soft reference pre processing.
Soft reference pre-processing does soft reference preservation with
mutators running. After this is done, it does another pass with
mutators paused in the ProcessReference code. This helps lower pauses
since most preserved soft references have their referents recursive
marked outside the pause.
Changed ergonomics to have non sticky collectors always clear the
soft references.
Maps pauses ~10ms -> ~3ms on Nexus 4.
Bug: 13421927
Change-Id: I1370f7bb6934034869aa5afca0c377876267aa8e
Diffstat (limited to 'runtime/gc/collector/mark_sweep.h')
-rw-r--r-- | runtime/gc/collector/mark_sweep.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h index df19f88..b117b20 100644 --- a/runtime/gc/collector/mark_sweep.h +++ b/runtime/gc/collector/mark_sweep.h @@ -126,6 +126,10 @@ class MarkSweep : public GarbageCollector { void ProcessReferences(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void PreProcessReferences(Thread* self) + EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + // Update and mark references from immune spaces. Virtual as overridden by StickyMarkSweep. virtual void UpdateAndMarkModUnion() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); |