mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8068592: Remove unused code in objectMonitor.hpp
Reviewed-by: dholmes, redestad, gthornbr
This commit is contained in:
parent
4d5d6cabdd
commit
8f7e6e317c
3 changed files with 4 additions and 34 deletions
|
@ -131,8 +131,6 @@ static int Knob_MoveNotifyee = 2; // notify() - disposition of noti
|
||||||
static int Knob_QMode = 0; // EntryList-cxq policy - queue discipline
|
static int Knob_QMode = 0; // EntryList-cxq policy - queue discipline
|
||||||
static volatile int InitDone = 0;
|
static volatile int InitDone = 0;
|
||||||
|
|
||||||
#define TrySpin TrySpin_VaryDuration
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Theory of operations -- Monitors lists, thread residency, etc:
|
// Theory of operations -- Monitors lists, thread residency, etc:
|
||||||
//
|
//
|
||||||
|
@ -1848,13 +1846,8 @@ void ObjectMonitor::notifyAll(TRAPS) {
|
||||||
// hysteresis control to damp the transition rate between spinning and
|
// hysteresis control to damp the transition rate between spinning and
|
||||||
// not spinning.
|
// not spinning.
|
||||||
|
|
||||||
intptr_t ObjectMonitor::SpinCallbackArgument = 0;
|
|
||||||
int (*ObjectMonitor::SpinCallbackFunction)(intptr_t, int) = NULL;
|
|
||||||
|
|
||||||
// Spinning: Fixed frequency (100%), vary duration
|
// Spinning: Fixed frequency (100%), vary duration
|
||||||
|
int ObjectMonitor::TrySpin(Thread * Self) {
|
||||||
|
|
||||||
int ObjectMonitor::TrySpin_VaryDuration(Thread * Self) {
|
|
||||||
// Dumb, brutal spin. Good for comparative measurements against adaptive spinning.
|
// Dumb, brutal spin. Good for comparative measurements against adaptive spinning.
|
||||||
int ctr = Knob_FixedSpin;
|
int ctr = Knob_FixedSpin;
|
||||||
if (ctr != 0) {
|
if (ctr != 0) {
|
||||||
|
@ -1948,11 +1941,6 @@ int ObjectMonitor::TrySpin_VaryDuration(Thread * Self) {
|
||||||
goto Abort; // abrupt spin egress
|
goto Abort; // abrupt spin egress
|
||||||
}
|
}
|
||||||
if (Knob_UsePause & 1) SpinPause();
|
if (Knob_UsePause & 1) SpinPause();
|
||||||
|
|
||||||
int (*scb)(intptr_t,int) = SpinCallbackFunction;
|
|
||||||
if (hits > 50 && scb != NULL) {
|
|
||||||
int abend = (*scb)(SpinCallbackArgument, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Knob_UsePause & 2) SpinPause();
|
if (Knob_UsePause & 2) SpinPause();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -161,9 +161,6 @@ class ObjectMonitor {
|
||||||
Thread * volatile _Responsible;
|
Thread * volatile _Responsible;
|
||||||
|
|
||||||
volatile int _Spinner; // for exit->spinner handoff optimization
|
volatile int _Spinner; // for exit->spinner handoff optimization
|
||||||
volatile int _SpinFreq; // Spin 1-out-of-N attempts: success rate
|
|
||||||
volatile int _SpinClock;
|
|
||||||
volatile intptr_t _SpinState; // MCS/CLH list of spinners
|
|
||||||
volatile int _SpinDuration;
|
volatile int _SpinDuration;
|
||||||
|
|
||||||
volatile jint _count; // reference count to prevent reclamation/deflation
|
volatile jint _count; // reference count to prevent reclamation/deflation
|
||||||
|
@ -238,10 +235,6 @@ class ObjectMonitor {
|
||||||
static int cxq_offset_in_bytes() { return offset_of(ObjectMonitor, _cxq); }
|
static int cxq_offset_in_bytes() { return offset_of(ObjectMonitor, _cxq); }
|
||||||
static int succ_offset_in_bytes() { return offset_of(ObjectMonitor, _succ); }
|
static int succ_offset_in_bytes() { return offset_of(ObjectMonitor, _succ); }
|
||||||
static int EntryList_offset_in_bytes() { return offset_of(ObjectMonitor, _EntryList); }
|
static int EntryList_offset_in_bytes() { return offset_of(ObjectMonitor, _EntryList); }
|
||||||
static int FreeNext_offset_in_bytes() { return offset_of(ObjectMonitor, FreeNext); }
|
|
||||||
static int WaitSet_offset_in_bytes() { return offset_of(ObjectMonitor, _WaitSet); }
|
|
||||||
static int Responsible_offset_in_bytes() { return offset_of(ObjectMonitor, _Responsible); }
|
|
||||||
static int Spinner_offset_in_bytes() { return offset_of(ObjectMonitor, _Spinner); }
|
|
||||||
|
|
||||||
// ObjectMonitor references can be ORed with markOopDesc::monitor_value
|
// ObjectMonitor references can be ORed with markOopDesc::monitor_value
|
||||||
// as part of the ObjectMonitor tagging mechanism. When we combine an
|
// as part of the ObjectMonitor tagging mechanism. When we combine an
|
||||||
|
@ -257,11 +250,6 @@ class ObjectMonitor {
|
||||||
#define OM_OFFSET_NO_MONITOR_VALUE_TAG(f) \
|
#define OM_OFFSET_NO_MONITOR_VALUE_TAG(f) \
|
||||||
((ObjectMonitor::f ## _offset_in_bytes()) - markOopDesc::monitor_value)
|
((ObjectMonitor::f ## _offset_in_bytes()) - markOopDesc::monitor_value)
|
||||||
|
|
||||||
// Eventually we'll make provisions for multiple callbacks, but
|
|
||||||
// now one will suffice.
|
|
||||||
static int (*SpinCallbackFunction)(intptr_t, int);
|
|
||||||
static intptr_t SpinCallbackArgument;
|
|
||||||
|
|
||||||
markOop header() const;
|
markOop header() const;
|
||||||
void set_header(markOop hdr);
|
void set_header(markOop hdr);
|
||||||
|
|
||||||
|
@ -312,8 +300,6 @@ class ObjectMonitor {
|
||||||
_cxq = NULL;
|
_cxq = NULL;
|
||||||
_WaitSet = NULL;
|
_WaitSet = NULL;
|
||||||
_recursions = 0;
|
_recursions = 0;
|
||||||
_SpinFreq = 0;
|
|
||||||
_SpinClock = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -353,9 +339,7 @@ class ObjectMonitor {
|
||||||
void UnlinkAfterAcquire(Thread * Self, ObjectWaiter * SelfNode);
|
void UnlinkAfterAcquire(Thread * Self, ObjectWaiter * SelfNode);
|
||||||
int TryLock(Thread * Self);
|
int TryLock(Thread * Self);
|
||||||
int NotRunnable(Thread * Self, Thread * Owner);
|
int NotRunnable(Thread * Self, Thread * Owner);
|
||||||
int TrySpin_Fixed(Thread * Self);
|
int TrySpin(Thread * Self);
|
||||||
int TrySpin_VaryFrequency(Thread * Self);
|
|
||||||
int TrySpin_VaryDuration(Thread * Self);
|
|
||||||
void ExitEpilog(Thread * Self, ObjectWaiter * Wakee);
|
void ExitEpilog(Thread * Self, ObjectWaiter * Wakee);
|
||||||
bool ExitSuspendEquivalent(JavaThread * Self);
|
bool ExitSuspendEquivalent(JavaThread * Self);
|
||||||
void post_monitor_wait_event(EventJavaMonitorWait * event,
|
void post_monitor_wait_event(EventJavaMonitorWait * event,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -144,8 +144,6 @@ class ObjectSynchronizer : AllStatic {
|
||||||
static void verify() PRODUCT_RETURN;
|
static void verify() PRODUCT_RETURN;
|
||||||
static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
|
static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
|
||||||
|
|
||||||
static void RegisterSpinCallback(int(*)(intptr_t, int), intptr_t);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum { _BLOCKSIZE = 128 };
|
enum { _BLOCKSIZE = 128 };
|
||||||
// global list of blocks of monitors
|
// global list of blocks of monitors
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue