This section covers the most important command-line flags that can be used to control and instrument JRockit lock behavior.
While plenty of information can be gleaned from log files using some of these flags, synchronization is a complex business and the preferred and best way to visualize multithreaded behavior is through the JRockit Mission Control suite.
This section explains the most important flags for studying and manipulating lock behavior.
This flag makes JRockit report information related to synchronization in the running program. Most of the information that the –Xverbose:locks
flag produces has to do with the lazy unlocking optimization. This is a good way to see, for example, which types and objects are temporarily or permanently banned for lazy unlocking, or if lazy unlocking performs as efficiently as it should, without having to revert its assumptions all the time.
Following is a sample output from...