RFR(S) 8077392 inspired thread dump improvements, comment, additions, new diagnostics (8130448)

Daniel D. Daugherty daniel.daugherty at oracle.com
Sat Jul 4 00:14:16 UTC 2015


Greetings,

The hunt for the following bug:

     JDK-8077392 Stream fork/join tasks occasionally fail to complete

and David C's work on the following bug:

     JDK-8069412 Locks need better debug-printing support

have inspired additional thread dump improvements, comment additions
to some Java monitor code and some new diagnostic options.

This work is being tracked by the following bug ID:

     JDK-8130448 8077392 inspired thread dump improvements, comment
                 additions, new diagnostics
     https://bugs.openjdk.java.net/browse/JDK-8130448

Here is the webrev URL:

http://cr.openjdk.java.net/~dcubed/8130448-webrev/0-jdk9-hs-rt/

Testing:

- RBT vm.quick batches (in process)
- JPRT test jobs

Thanks, in advance, for any comments, questions or suggestions.

Gory details about the changes are below...

Dan

8130448 summary of changes:

src/cpu/x86/vm/macroAssembler_x86.cpp
   - comment additions for the assembly code

src/share/vm/oops/markOop.cpp
   - has_monitor() has to be checked before is_locked() since
     the has_monitor() bits are a superset of the is_locked() bits
   - code style fixes

src/share/vm/runtime/globals.hpp
   - add VerboseStackTrace diagnostic option
   - add GuaranteeOnMonitorMismatch diagnostic option
   - add JavaThreadExitReleasesMonitors product option;
     this is the Java equivalent of JNIDetachReleasesMonitors

src/share/vm/runtime/objectMonitor.cpp
   - delete unused ObjectMonitor::try_enter()
   - fix assert wording

src/share/vm/runtime/objectMonitor.hpp
   - delete unused ObjectMonitor::try_enter()

src/share/vm/runtime/synchronizer.cpp
   - add GuaranteeOnMonitorMismatch support with some
     diagnostic output

src/share/vm/runtime/thread.cpp
   - add JavaThreadExitReleasesMonitors support

src/share/vm/runtime/vframe.cpp
   - clarify existing comments
   - add comments to clarify what "waiting on" means
   - add line to show when we are "waiting on", but
     there are no locals available (previously we were
     "waiting on" silently)
   - add support for "waiting to relock" which can happen
     for any of the monitors and not just the top monitor
   - switch mark->print_on() verbose output to new
     VerboseStackTrace switch; thread dumps are not enabled
     with a specific switch so the '-XX:+Verbose' model of
     being a modifier for another option does not fit


More information about the hotspot-runtime-dev mailing list