49
49
#include " runtime/objectMonitor.inline.hpp"
50
50
#include " runtime/orderAccess.hpp"
51
51
#include " runtime/osThread.hpp"
52
- #include " runtime/perfData.hpp"
53
52
#include " runtime/safefetch.hpp"
54
53
#include " runtime/safepointMechanism.inline.hpp"
55
54
#include " runtime/sharedRuntime.hpp"
@@ -648,8 +647,6 @@ void ObjectMonitor::enter_with_contention_mark(JavaThread* current, ObjectMonito
648
647
current->post_vthread_pinned_event (&vthread_pinned_event, " Contended monitor enter" , result);
649
648
}
650
649
}
651
-
652
- OM_PERFDATA_OP (ContendedLockAttempts, inc ());
653
650
}
654
651
655
652
// Caveat: try_lock() is not necessarily serializing if it returns failure.
@@ -1025,14 +1022,6 @@ void ObjectMonitor::enter_internal(JavaThread* current) {
1025
1022
1026
1023
// The lock is still contested.
1027
1024
1028
- // Keep a tally of the # of futile wakeups.
1029
- // Note that the counter is not protected by a lock or updated by atomics.
1030
- // That is by design - we trade "lossy" counters which are exposed to
1031
- // races during updates for a lower probe effect.
1032
- // We are in safepoint safe state, so shutdown can remove the counter
1033
- // under our feet. Make sure we make this access safely.
1034
- OM_PERFDATA_SAFE_OP (FutileWakeups, inc ());
1035
-
1036
1025
// Assuming this is not a spurious wakeup we'll normally find _succ == current.
1037
1026
// We can defer clearing _succ until after the spin completes
1038
1027
// try_spin() must tolerate being called with _succ == current.
@@ -1145,12 +1134,6 @@ void ObjectMonitor::reenter_internal(JavaThread* current, ObjectWaiter* currentN
1145
1134
// Invariant: after clearing _succ a contending thread
1146
1135
// *must* retry _owner before parking.
1147
1136
OrderAccess::fence ();
1148
-
1149
- // Keep a tally of the # of futile wakeups.
1150
- // Note that the counter is not protected by a lock or updated by atomics.
1151
- // That is by design - we trade "lossy" counters which are exposed to
1152
- // races during updates for a lower probe effect.
1153
- OM_PERFDATA_OP (FutileWakeups, inc ());
1154
1137
}
1155
1138
1156
1139
// Current has acquired the lock -- Unlink current from the _entry_list.
@@ -1608,9 +1591,6 @@ void ObjectMonitor::exit_epilog(JavaThread* current, ObjectWaiter* Wakee) {
1608
1591
// Virtual thread case.
1609
1592
Trigger->unpark ();
1610
1593
}
1611
-
1612
- // Maintain stats and report events to JVMTI
1613
- OM_PERFDATA_OP (Parks, inc ());
1614
1594
}
1615
1595
1616
1596
// Exits the monitor returning recursion count. _owner should
@@ -2045,7 +2025,6 @@ void ObjectMonitor::notify(TRAPS) {
2045
2025
EventJavaMonitorNotify event;
2046
2026
DTRACE_MONITOR_PROBE (notify, this , object (), current);
2047
2027
int tally = notify_internal (current) ? 1 : 0 ;
2048
- OM_PERFDATA_OP (Notifications, inc (tally));
2049
2028
2050
2029
if ((tally > 0 ) && event.should_commit ()) {
2051
2030
post_monitor_notify_event (&event, this , /* notified_count = */ tally);
@@ -2074,8 +2053,6 @@ void ObjectMonitor::notifyAll(TRAPS) {
2074
2053
}
2075
2054
}
2076
2055
2077
- OM_PERFDATA_OP (Notifications, inc (tally));
2078
-
2079
2056
if ((tally > 0 ) && event.should_commit ()) {
2080
2057
post_monitor_notify_event (&event, this , /* notified_count = */ tally);
2081
2058
}
@@ -2514,14 +2491,6 @@ inline void ObjectMonitor::dequeue_specific_waiter(ObjectWaiter* node) {
2514
2491
}
2515
2492
2516
2493
// -----------------------------------------------------------------------------
2517
- // PerfData support
2518
- PerfCounter * ObjectMonitor::_sync_ContendedLockAttempts = nullptr ;
2519
- PerfCounter * ObjectMonitor::_sync_FutileWakeups = nullptr ;
2520
- PerfCounter * ObjectMonitor::_sync_Parks = nullptr ;
2521
- PerfCounter * ObjectMonitor::_sync_Notifications = nullptr ;
2522
- PerfCounter * ObjectMonitor::_sync_Inflations = nullptr ;
2523
- PerfCounter * ObjectMonitor::_sync_Deflations = nullptr ;
2524
- PerfLongVariable * ObjectMonitor::_sync_MonExtant = nullptr ;
2525
2494
2526
2495
// One-shot global initialization for the sync subsystem.
2527
2496
// We could also defer initialization and initialize on-demand
@@ -2538,29 +2507,6 @@ void ObjectMonitor::Initialize() {
2538
2507
Knob_FixedSpin = -1 ;
2539
2508
}
2540
2509
2541
- if (UsePerfData) {
2542
- EXCEPTION_MARK;
2543
- #define NEWPERFCOUNTER (n ) \
2544
- { \
2545
- n = PerfDataManager::create_counter (SUN_RT, #n, PerfData::U_Events, \
2546
- CHECK); \
2547
- }
2548
- #define NEWPERFVARIABLE (n ) \
2549
- { \
2550
- n = PerfDataManager::create_variable (SUN_RT, #n, PerfData::U_Events, \
2551
- CHECK); \
2552
- }
2553
- NEWPERFCOUNTER (_sync_Inflations);
2554
- NEWPERFCOUNTER (_sync_Deflations);
2555
- NEWPERFCOUNTER (_sync_ContendedLockAttempts);
2556
- NEWPERFCOUNTER (_sync_FutileWakeups);
2557
- NEWPERFCOUNTER (_sync_Parks);
2558
- NEWPERFCOUNTER (_sync_Notifications);
2559
- NEWPERFVARIABLE (_sync_MonExtant);
2560
- #undef NEWPERFCOUNTER
2561
- #undef NEWPERFVARIABLE
2562
- }
2563
-
2564
2510
_oop_storage = OopStorageSet::create_weak (" ObjectSynchronizer Weak" , mtSynchronizer);
2565
2511
2566
2512
DEBUG_ONLY (InitDone = true ;)
0 commit comments