Dev Partner Java - Profiling JRuby - Welcome To The Future

DPJ showing the critical path through SwitchPoint.
I am very lucky to be working in the team who are upgrading DevPartnerJava. Today we got it to profile InvokeDynamic/JRuby for the first time.

Back when I was working for General Electric on their Magik implementation using Invoke Dynamic I would have given my right arm to have a profiler which could properly follow the innards of Invoke Dynamic. Yes, VisualVM does some stuff, but it is pretty much useless for drilling down into the details and finding critical paths.

JRuby review of a session using the Swing2 sample.
Now, this code is very much 'just got it working today' so I am not going to go into loads of details about how to use it. I hope to do that over the next few weeks as we get it ready for release. However, is it a complete overhall of DPJ; it runs on 64bit JVMs as can profile through InvokeDynamic. 

In other words - it will profile with Java 8 Lambda syntax.

But! If you want to really test InvokeDynamic then nothing - I mean nothing - is better than giving JRuby a spin. So that is what I did!

Here is how I launched the session which created the images here:

jruby -Xcompile.invokedynamic=true -J-agentpath:./libdpjJvmtiCore64.so=NM_ANALYSIS_TYPE=performance samples/swing2.rb 

As we can see - it was just a matter of telling JRuby to use the DPJ agent. 

Disclaimer: nothing of what you see here is guaranteed to be in any future Micro Focus product!

It is great to be on the team creating the tools which can take Java into the future. To be able to say:

'Yes, Java is a fully mature language, with a fully mature tool set and one of the best software companies in the world is investing to keep it so'.