JDK-8236568 : diagnostic anti-locked objects, by class
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2019-12-29
  • Updated: 2021-06-24
  • Resolved: 2021-06-24
Related Reports
Relates :  
Relates :  
Relates :  
Description
The concept of an anti-locked object is introduced in JDK-8236567.

This RFE allows *all* objects of a given class to be anti-locked using a diagnostic switch of some form like -XX:AntiLockClass=java.lang.Integer.
Comments
Runtime Triage: This is not on our current list of priorities. We will consider this feature if we receive additional customer requirements.
24-06-2021

Could this be implemented in the verifier? When it sees a monitorenter opcode and -XX:+AntiLockClass is set then it could look at the type of the monitorenter operand and issue a diagnostic if the type is on some predetermined anti-lock list.
08-01-2020