G1, Remembered Sets & Refinement
Simone Bordet
simone.bordet at gmail.com
Fri May 8 15:11:00 UTC 2015
Hi,
I would like to ask some clarification about remembered sets (RS),
buffers and refinement in G1.
My understanding is that G1 installs a write barrier to record old to
young pointers.
Let's assume that A is the object in old generation, and B is the
object in young generation.
I understand that when the barrier triggers, the card correspondent to
the place where the A resides is marked.
This card is then enqueued into a queue (the dirty card queue).
I understand that until the number of entries in the dirty card queue
does not enter the yellow zone, then nothing is done.
When the yellow zone is entered, a refinement thread is started to
poll items out of the dirty card queue and update the RS for the young
region.
I understand that, when a young GC happens, the refinement threads are
stopped (if running), and "Update RS" phase takes care of processing
the dirty card queue.
Provided my understanding is correct, what is the meaning of the word
"buffer" in this scenario ?
PrintGCDetails prints out a "Processed Buffers" subphase for "Update
RS", but what is a "buffer" ?
Another question: given that the write barrier knows exactly A's oop,
what is the reason for card marking, rather than just recording the
oop ?
Last question: would setting the yellow zone to zero always reduce the
"Update RS" to (almost) zero ? What problem could this setting
possibly generate ?
Thanks !
--
Simone Bordet
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
More information about the hotspot-gc-use
mailing list