On 15/01/2026 11:52, Roman Kennke wrote:
:

thanks for offering your perspective. I have changed both POCs (and the corresponding example code) to implement as JVMTI extensions - I didn't even know that such a mechanism exists.

They currently still use a capability to set up what they need (and that's in the public API unfortunately), I am wondering if there is something similar for JVMTI extensions? Worst case, I would perhaps add another extension function to initialize things.

Also, is there any way for consumers of the API to get some documentation? The second POC uses callbacks, and I suppose it might be useful for a prospective user of the API to know the arguments etc of those. As it currently is, the callback functions are basically black boxes, reported by the extension mechanism as void* - the user of the API would have to know what functions exactly to pass as callbacks. (Worst case, I guess it could be described in a blog-post or so.)

I think it would be okay to have the equivalent of @implNote in the JVMTI spec. As part of the JEP 451 implementation we added an "Implementation Note" to the "AgentĀ  Start-Up (Live phase)" section to document a -XX option. Maybe the "Stack frame" or some other section could have an implNote to document the functions?

I don't think the extension mechanism anticipated new capabilities but it could be done, as you mention, with another extension function. (Serguei might have some ideas here but I suspect it could be problematic to use some of the bits for VM-specific capabilities).

-Alan

Reply via email to