Seems like the integration between YourKit and NetBeans is far less than perfect. It’s almost at a non-working level.
Installation and integration into NetBeans went smooth (except for my rant here): NetBeans was inserted with a YourKit icon titled “Profile Main Application”. Great!
Now for the actual profiling. I had some code written to test the difference between LinkedList and ArrayList, as a response to the discussion evolving around this post. I decided to use that code to be profiled.
I clicked the profiling button YourKit supplied me with, and the application started running. YourKit warned me that it will change the build script, and it did. During the run phase, I saw these messages:
[YourKit Java Profiler 5.0.9] Using JVMTI
[YourKit Java Profiler 5.0.9] CPU times measuring is started
[YourKit Java Profiler 5.0.9]: *** WARNING! *** Java 1.5.0 has bugs that may cause profiled application crash. It is strongly recommended to upgrade to Java 5.0 update 5 or later.
[YourKit Java Profiler 5.0.9] Profiler agent is listening on port 10001...
[YourKit Java Profiler 5.0.9] Launching profiler UI
The bolded line is quite puzzling, but I let it slide. I only used the most common things, and I don’t suspect they’ve been broken even if there were bugs.
The last line promised to launch the UI, and it did. Problem was, the application didn’t wait for it to launch it; So, YourKit was launched way after the application stopped running, and gather no information at all.
“I can deal with this”, I thought and continued to run the profiled application a second time, this time making sure YourKit is already running. To my surprise, YourKit just ignored the profiled process silently.
“Okay, so I’ll just start the profiling manually”, I thought. YourKit’s Welcome screen (shown above) offers an option to Connect to locally running profiled application. I ran my application, switched to YourKit, and tried to connect to my application. YourKit couldn’t find it.
At this point I gave up. I will try again tomorrow, though. I must say, however, that I have tried NetBeans Profiler and it gave me a very good impression. I will write more about it after I finish evaluating it, but for now I have a very good feeling about it.
P.S.
Yes, I know the picture shows a Windows computer. I used a different computer than my own for this, as YourKit provided some GUI difficulties on the Mac which I suspected were unique for that OS.