I'm currently performance hunting. In order to measure the throughput, and to enforce that we don't regress, I'm using the wonderful JMH.
When I come across something that is slow though, I want to start profiling to see what is going on, according to this link the author of JMH writes:
While JMH profilers can provide the aid in analyzing, I don't think they are the substitute for proper profiling. E.g. the "stack" profiler is good to glance over the profiles, but not for the serious work.
Run the workload for longer, and attach your profiler of choice to the running VM.
I was secretly hoping I could tweak the JMH test from the command line, then attach something like visualvm to that... but so far I've been able to get that to work. I guess that is a bad idea? It would be ideal if I could share the code I use to profile, as well as the code I use to enforce.