Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8348829

Remove ObjectMonitor perf counters

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • None
    • hotspot

      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.

      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 JDK-8351142
       - MonExtant: would be covered by new event in JDK-8351142

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: