JDK-8348829 : Remove ObjectMonitor perf counters
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-01-28
  • Updated: 2025-03-27
  • Resolved: 2025-03-25
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 25
25 b16Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8349549 :  
Description
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, see JDK-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.
Comments
Changeset: aee4d691 Branch: master Author: Aleksey Shipilev <shade@openjdk.org> Date: 2025-03-25 09:01:48 +0000 URL: https://git.openjdk.org/jdk/commit/aee4d6910ba15f8b8946f36968fc8b8599d9e50d
25-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23326 Date: 2025-01-28 09:57:43 +0000
28-01-2025