I am hoping to do a profiling analysis on my Java project. To get the results I want to add a "hook" to the JVM so that every time a heap access occurs, the "hook" is called and does some tracing. I have been looking into JVMTI but this does not seem to give me what I expect.
I have several questions:
- Is it possible to add such a hook?
- If possible, what are the correct tools/interfaces that I should use?
- If there is no existing tools that do this, can I achieve this by modifying the JVM codebase?
Thanks.