Oracle Blog

Java + JavaFX + World

Saturday Mar 08, 2008

Working on industrial application,profiling project is one of the major
challenge. There are some of the profiling tools shipped with JDK like
jhat, jmap, jconsole. But week back, I start looking the profiling
power of Netbeans which is quite better than JDK tools. It provides
much better and relevant tools for profiling. Don't mind if it will not
able to connect VM sometime :). Here I have written one small code for
deadlock:

Now I have started Netbeans Profiling. The best part is CPU profiling
which allow you to profile parts of project, no need to profile whole
project. It will show you heap memory, GC memory, classes loaded like:

Here you can definitely see how threads are waiting for each other in Thread view.

Now take the heap dump from Profiling option. It will by default open your heap dump in heap walker. Now in heap walker you can see classes, instances, size and lot many things. From classes we can directly go to the source code. See this:

And here I go in the source :)

There is lot to do here. But I am sick of pasting this image. Go ahead, and explore it :), it's worthwhile to spend some time. Right now, I am working on a printer memory leak problem. Will write more if able to solve with Profiling.