[15] RFR 8238633: JVMTI heap walk should consult GC for marking oops

Zhengyu Gu zgu at redhat.com
Fri Feb 21 21:31:39 UTC 2020


Hi Kim,

On 2/21/20 3:47 PM, Kim Barrett wrote:
>> On Feb 7, 2020, at 10:53 AM, Zhengyu Gu <zgu at 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.

Thanks for pointing it out, I will deal with it next, sigh!

-Zhengyu

> 



More information about the hotspot-dev mailing list