RFR: 8279016: JFR Leak Profiler is broken with Shenandoah [v4]

Aleksey Shipilev shade at openjdk.org
Mon Jul 29 15:57:30 UTC 2024


On Mon, 29 Jul 2024 15:42:15 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> Why is it ok to simply skip PathToGcRootsOperation? AFAICT, this is (only) used in EventEmitter::emit(..), to emit events with reference chains. What is the consequence of not doing so during GC? 

I think this op is opportunistic, and we bail in the similar way we bail on other conditions in the same method.

> Also, why does JFR see from-space objects to begin with? This should not be allowed. Does JFR use raw loads of references to figure out chains? If so, should it use the proper Access API instead? If not - how does it see from-space refs?

I don't think JFR sees from-space refs. What happens that JFR sees a to-space object (maybe already passed through LRB, since we can be in evac), _tags it in markword_, and that tag starts to look like a forwarding pointer to Shenandoah. So when JFR code goes around and does LRB on that already-to-space object, LRB gets confused. This is why [JDK-8337194](https://bugs.openjdk.org/browse/JDK-8337194) shows "Multiple forwardings" as the failure mode.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20328#issuecomment-2256290894


More information about the hotspot-jfr-dev mailing list