> On Feb 7, 2020, at 10:53 AM, Zhengyu Gu <z...@redhat.com> wrote: > > Hi, > > I would like purpose this change that allows GC to provide ObjectMarker > during JVMTI heap walk. > > Currently, JVMTI heap walk uses oop markword's 'marked' pattern to indicate > 'visited' oop. > > Unfortunately, it conflicts with Shenandoah, who uses the pattern to indicate > 'forwarding'. When JVMTI heap walk occurs in some of Shenandoah's concurrent > heap (e.g. concurrent evacuation or concurrent reference updating phases), it > can result corrupted heap, as it tries to resolve a real oop header as a > forwarding pointer. > > This patch allows GC to provide ObjectMarker for JVMTI to track 'visited' > oop, and uses current implementation as default, so that, it has no impact to > GCs other than Shenandoah, who provides its own implementation.
(Not a review.) I think the jfr leak profiler has the same problem. It too uses the markWord’s “marked” pattern to indicate an oop it has visited, since JDK-8234173.