Depth first object copying for all GC?

Jon Masamitsu jon.masamitsu at
Thu May 7 00:23:19 UTC 2015

On 5/6/2015 4:34 AM, Tangwei (Euler Architecture & Design Dept) wrote:
> Hi All,
>   As a newbie in GC, I found some discussion on object copying order 
> in following slides: breadth vs. depth.
> It mentioned that /“Any static policy will hurt some applications and 
> help others”. /After searching, there is a BZ shows
> the object copying order has been switched from breadth to depth for 
> ParallelGC in OpenJDK, please correct if I am wrong.
> Anyone can help to confirm if all GC in OpenJDK use depth first 
> copying now?

No, not all the GC's use depth first copying.

> Is there any performance consideration to choose depth first instead 
> of controlling by option?

Yes, there is a performance cost to optionally using depth-first or 
ParallelGC used to have such an option.  It made the code harder to 
maintain and,
as far as I can recall, there was very little use of the option.  We 
removed the
it.  I recall maybe 1 complaint about it.


> Improve object 
> copying order in parallel scavenge
> Regards!
> wei

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-gc-dev mailing list