Inlining

According to http://java.sun.com/docs/hotspot/VMOptions.html

-XX:+PrintInlining might give some interesting stats… it says “(debug only)” Does that mean a debug build of the VM?

I tried it and the option was not recognized. Is there any way to determine if something gets inlined or not?

I’m experimenting with how different techniques might effect HotSpot… for instance is a method any more likely to be inlined if it is declared final? I know it doesn’t have to be final to be inlined, but I would like to know if being final boosts the chances at all. If so it might be worth making some specific methods final , but I wouldn’t want to do that to my code unless there was a tangible benefit.

It used to be that final would help with inlining, but not since Hotspot 1.3, I believe. Hotspot is now smart enough to consider a method for inlining as long as no other loaded classes override it (basically, no other variations of the method exist).

Short form: only use final when it makes sense from a design perspective.

[quote]Short form: only use final when it makes sense from a design perspective.
[/quote]
Shortest form: Put final everywhere and only remove it when the compiler complains ;D

[quote]Shortest form: Put final everywhere and only remove it when the compiler complains ;D
[/quote]
On a side note: private methods are implicitly final becuase it is impossible to override them. Limiting visilibility as much as possible is not just a good programming practice but it allows more optimizations.

Private fields could also be optimized because their visability is known to only be the current class but I’m not specifically aware of what optimizations are applied to them.

So does anyone know how to get -XX:+PrintInlining or something similar to work with a 1.4.1 or 1.4.2 beta?
Or is this ability simply not there in the released versions of HotSpot?