On Wed, 26 Aug 2026 21:01:04 GMT, Chris Plummer <[email protected]> wrote:

> It looks like when hotspot dumps the heap, it also does not dump the stack 
> array part of the StackChunk. It instead walks the heap looking for all 
> VirtualThreads, and for each one found generates the appropriate hprof 
> thread, stack, frame records, and stack references. So this is the part that 
> actually looks into the stack array of the StackChunk. This is missing from 
> SA. We should file a CR for it.
> 
> I just reread [JDK-8261848](https://bugs.openjdk.org/browse/JDK-8261848). It 
> won't solve this problem, and fixing the heap dumping won't solve it either. 
> It's separate issue from heap dumping, and it deals with "follow references" 
> to discover all references to an object. The suggested fix would be a bit 
> strange since the references will show up as rooted in the StackChunk, when 
> really they should show up as rooted in a local variable of a virtual thread 
> stack frame (like they would if analyzing a heap dump). I think it would take 
> a lot to make that happen, and in general I don't think this is an important 
> enough feature to merit putting that much work into.

Thanks, that makes sense and agreed the full version isn’t worth the effort... 
The cheap version I have just emits the payload oops as references from the 
chunk itself, so it’s the truthful heap graph even if not the frame local 
presentation, follow references and revptrs find the holder instead of 
reporting nothing

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

PR Comment: https://git.openjdk.org/jdk/pull/32525#issuecomment-5432547661

Reply via email to