-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
There is a bunch of ObjectMonitor performance counters:
PerfCounter * ObjectMonitor::_sync_ContendedLockAttempts = nullptr;
PerfCounter * ObjectMonitor::_sync_FutileWakeups = nullptr;
PerfCounter * ObjectMonitor::_sync_Parks = nullptr;
PerfCounter * ObjectMonitor::_sync_Notifications = nullptr;
PerfCounter * ObjectMonitor::_sync_Inflations = nullptr;
PerfCounter * ObjectMonitor::_sync_Deflations = nullptr;
PerfLongVariable * ObjectMonitor::_sync_MonExtant = nullptr;
They seem to be seldom used, and their continued maintenance comes with at least two problems, both of which come down to intrinsic race against VM shutdown, seeJDK-8049304 and JDK-8348402. Additionally, these get updated on locking paths, and attempts to do extra things, including synchronization, might obscure some of the bugs.
These counters should be covered by related JFR events:
- ContendedLockAttempts: covered by JavaMonitorEnter event
- FutileWakeups: not covered, we think this is unnecessary to track
- Parks: covered by JavaMonitorWait event
- Notifications: would be covered by new event in JDK-8351187
- Inflation: already covered by JavaMonitorInflate event
- Deflations: would be covered by new event inJDK-8351142
- MonExtant: would be covered by new event inJDK-8351142
PerfCounter * ObjectMonitor::_sync_ContendedLockAttempts = nullptr;
PerfCounter * ObjectMonitor::_sync_FutileWakeups = nullptr;
PerfCounter * ObjectMonitor::_sync_Parks = nullptr;
PerfCounter * ObjectMonitor::_sync_Notifications = nullptr;
PerfCounter * ObjectMonitor::_sync_Inflations = nullptr;
PerfCounter * ObjectMonitor::_sync_Deflations = nullptr;
PerfLongVariable * ObjectMonitor::_sync_MonExtant = nullptr;
They seem to be seldom used, and their continued maintenance comes with at least two problems, both of which come down to intrinsic race against VM shutdown, see
These counters should be covered by related JFR events:
- ContendedLockAttempts: covered by JavaMonitorEnter event
- FutileWakeups: not covered, we think this is unnecessary to track
- Parks: covered by JavaMonitorWait event
- Notifications: would be covered by new event in JDK-8351187
- Inflation: already covered by JavaMonitorInflate event
- Deflations: would be covered by new event in
- MonExtant: would be covered by new event in
- csr for
-
JDK-8348833 Remove ObjectMonitor perf counters
-
- Provisional
-
- relates to
-
JDK-8351142 Add JFR monitor deflation and statistics events
-
- Resolved
-
-
JDK-8351187 Add JFR monitor notification event
-
- New
-
-
JDK-8049304 race between VM_Exit and _sync_FutileWakeups->inc()
-
- Closed
-
-
JDK-8348402 PerfDataManager stalls shutdown for 1ms
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk/23326
(1 links to)