DFS or BFS traversal in Parallel Scavenge (or Parallel new) GC

Junjie Qian junjie.qian at yahoo.com
Sun Feb 15 02:57:42 UTC 2015

Dear all,
I am reading the Parallel scavenge GC implementation in OpenJDK1.7, and having a question regarding the way how the parallel GC threads traverse the graph to mark the live objects.
The question is, does one GC thread traverse the graph in DFS or BFS way in Parallel scavenge (or parallel new)?
There are two conflicting sources suggesting the answer:1. the paper on ASPLOS'13, "A study of the scalability of stop-the-world garbage collectors on multicores", in Section 2.3.3. the author says "A GC thread performs a breadth-first traversal (BFT) of the graph of live objects".
2. the reply in this mailist, "Request for review (S): 8005972: ParNew should not update the tenuring threshold when promotion failed has occurred" , Ramki said "ParNew's slightly more DFS-like evacuation compared with DefNew's considerably more BFS-like evacuation because of the latter's use of a pure Cheney scan compared with the use of (a) marking stack(s) in the former"
A lot of references online explains Parnew uses the same parallel GC algorithm as ParallelScavenge, please correct me if I made a mistake on this one. Thanks!BestJunjie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20150215/9434d670/attachment.htm>

More information about the hotspot-gc-dev mailing list