If you need to profile your Java application and you don’t want shell out $ for a proprietary tool, you might be interested in visualvm. It’s licensed under the GPL and includes a number of cool features:
1. It automatically connects to any JVM on your system (including the visualvm jvm itself) as they start up.
2. It includes high level monitors of CPU usage, Heap, Classes and Threads
3. Detailed views of Threads
4. CPU and Memory profiling.
I haven’t had much time to play with it, but it seems to just work!