JDK-5086470 : Add support for java.util.concurrent locks in the lock related facility
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-08-12
  • Updated: 2018-05-09
  • Resolved: 2005-06-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b39Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
ThreadInfo contains monitor lock information when a thread is blocked or waiting on a monitor.  ThreadMXBean.findMonitorDeadlockedThreads() provides a programmatic way to detect deadlock on demand.  Both provides lock information about the object monitor lock but not java.util.concurrent locks.

Enhance the API / VM support to include java.util.concurrent locks in the lock information.

Comments
SUGGESTED FIX See attached webrev (HS and SDK changes). ###@###.### 2005-05-20 23:54:23 GMT
20-05-2005

EVALUATION Will consider for Mustang. ###@###.### 2004-08-12 In Mustang, we provide the monitoring and diagnostic support for java.util.concurrent.locks and also customized synchronizers that are built with any AbstractOwnableSynchronizer frameworks. We add a few APIs in java.lang.management including: 1. ThreadInfo will report a java.util.concurrent lock/condition that a thread is blocked or waiting on. 2. ThreadMXBean.getAllLockedMonitors method to get a list of all locked object monitors. 3. ThreadMXBean.getAllLockedSynchronizers method to get a list of all locked JSR-166 synchronizers. 4. ThreadMXBean.findDeadlockedThreads method to find deadlocks involving both object monitors as well as JSR-166 synchronizers. To provide monitoring and diagnostic support for JSR-166 synchronizers, a new abstract class AbstractOwnableSynchronizer is added in java.util.concurrent.locks package. For any customized synchronizers (not provided by JRE), to enable this monitoring and diagnostic support e.g. to assist users to find out which thread holds the synchronizer or which synchronizer a thread is blocked on, it requires the implementation of customized synchronizers to keep track of the thread exclusively owning the lock. ###@###.### 2005-05-20 23:54:23 GMT
20-05-2005