I'm in the process of investigating how profilers work internally.
It seems there is an old API named JVMPI, as well as a "new" API based on java.lang.instrument
. I had the idea that profilers instrument all the classes' bytecode and insert hooks that call via sockets info to a given program's open-point, so establishing a communication with the profiler. Is this the standard approach? Do they differ considerably in approach?
Thanks