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


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

Here is the webrev URL:



- 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...


8130448 summary of changes:

   - comment additions for the assembly code

   - 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

   - add VerboseStackTrace diagnostic option
   - add GuaranteeOnMonitorMismatch diagnostic option
   - add JavaThreadExitReleasesMonitors product option;
     this is the Java equivalent of JNIDetachReleasesMonitors

   - delete unused ObjectMonitor::try_enter()
   - fix assert wording

   - delete unused ObjectMonitor::try_enter()

   - add GuaranteeOnMonitorMismatch support with some
     diagnostic output

   - add JavaThreadExitReleasesMonitors support

   - 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