Minimum Example or Documentation For Writing JVMTI Agents in Java #3083
Unanswered
sixbitproxywax
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Ok, I took another look at the native agent in graal and managed to get the RegistrationFeature and build args squared away. I still would appreciate it if someone would explain why the RegistrationFeature is used instead of a simple static initializer or something to initialize the singleton. I'm sure there's a good reason, but I have not yet found and explanation for why this is necessary. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am wanting to learn and write some tutorials about GraalVM, JVMTI and other related things, but I am having trouble making headway and can't seem to find the documentation I need.
I am currently trying to write a JVMTI agent in Java. I have found the jvmti-agent-base dependency and I am able to build my subclass of the JvmtiAgentBase class to a shared library and launch Java with it for a simple application.
However, I keep getting the error message "No agent has been registered but an instance was requested*
From the Javadocs, it is not clear to me what I need to do.
Does any sort of tutorial or sample code with a minimum functional example exist? If not, I'd be glad to write it, but I need some guidance!
Here is my attempt at a minimum example:
which I attempt to use with:
Any tips to get me headed in the right direction would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions