Dirty Cards Write Barrier

Thomas Schatzl thomas.schatzl at oracle.com
Wed Jul 15 07:37:01 UTC 2015


Hi Ionut,

On Tue, 2015-07-14 at 20:12 +0300, ionutb83 wrote:
> Hello All,
> 
> 
>    Could somebody please answer my question below?
> 
> 
> Best Regards
> Ionut
> 
> 
> -------- Original message --------
> From: Ionut 
> Date:04/07/2015 13:51 (GMT+02:00) 
> To: hotspot-gc-dev at openjdk.java.net 
> Subject: Dirty Cards Write Barrier 
> 
> 
> Hello Everybody,
>
>   I have just joined this group and since last year I started to study
> HotSpot more in detail.  I have a question for you, so your input will
> be greatly appreciated.
>
>   Based on my understanding Dirty Cards Write Barrier is a way of
> keeping track of references from Old to Young Generation.  This
> technique is used during minor GC to search for objects referred from
> Old generation. 
>   Is this technique used by all minor GC: Serial, Parallel, Parallel
> Old, CMS, G1?

All but G1 use this technique to track references between generations.
G1 uses card marking to track references between regions, not
generations. Also the time and place of how these references are
converted into remembered sets (and the use of the extra data structure
to store remembered sets itself) is quite different.

G1 uses a technique roughly based on what

David Detlefs, Ross Knippel, William D. Clinger, and Matthias Jacob.
2002. Concurrent Remembered Set Refinement in Generational Garbage
Collection. In Proceedings of the 2nd Java™ Virtual Machine Research and
Technology Symposium, Samuel P. Midkiff (Ed.). USENIX Association,
Berkeley, CA, USA, 13-26. 

describe.

Note that both G1 and CMS use write barriers for concurrent marking too
(and actually G1 also has a special case where it uses a read barrier).

>  Are there any other Write Barrier techniques?

Not sure what the question is: certainly there are other uses of write
barriers than card marking (see above), and different techniques to get
the same effect without using card marks (ie. maintain remembered sets).

E.g. Xi Yang, Stephen M. Blackburn, Daniel Frampton, and Antony L.
Hosking. 2012. Barriers reconsidered, friendlier still!. SIGPLAN Not.
47, 11 (June 2012), 37-48. DOI=10.1145/2426642.2259004
http://doi.acm.org/10.1145/2426642.2259004 gives an overview of some
kinds of software write barriers, but it maybe also contains a few
useful references for further research.

Thanks,
  Thomas





More information about the hotspot-gc-dev mailing list