BoundMethodHandle Klass and JVMTI heap walking

Mark Roos mroos at roos.com
Sat Aug 6 09:32:57 PDT 2011


Well that does explain why I have references to BoundMethodHandles  but it 
did not explain why I see them.
When I use FollowReferences I set the Klass filter to my desired result 
class 'myClass'.  But what I see after
the filter is myClass objects, arrays of myClass and BoundMethodHandles. 
Not quite what I would expect.

After reading more C code then I care to and trying several experiments I 
came to the conclusion that where
KlassHandle(tread, oop ) is called it returns null for the array and the 
BoundMethodHandle class pointers.
That is where my skills at tracing C code ended.

I found a solution for my case where I tag myClass with an unique tag and 
filter it myself in the callback.
Works great for both allInstances and allRefrences.  I still set the klass 
filter to limit the call backs but the
is not required.

thanks

mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110806/85b01192/attachment.html 


More information about the mlvm-dev mailing list