jvm-profiling-tools / perf-map-agent

A java agent to generate method mappings to use with the linux `perf` tool
GNU General Public License v2.0
1.64k stars 260 forks source link

Allow perf-map-agent to be loaded at startup #85

Open prasun3 opened 4 years ago

prasun3 commented 4 years ago

Implemented Agent_OnLoad so that the agent may be loaded at startup. Previously the agent could only be attached at runtime.

The agent may be loaded using the following cmd line syntax: perf record java -XX:+PreserveFramePointer -agentpath:/path/to/perf-map-agent/out/libperfmap.so app args

curiousleo commented 3 years ago

I am unfortunately not qualified to review this code, but being able to load the agent at startup would be very useful.