< prev index next >
src/hotspot/share/runtime/objectMonitor.cpp
Print this page
rev 51780 : imported patch syncknobs-00-base
rev 51781 : imported patch syncknobs-01-Knob_ReportSettings
rev 51782 : imported patch syncknobs-02-Knob_SpinBackOff
rev 51783 : imported patch syncknobs-03-BackOffMask
rev 51784 : imported patch syncknobs-04-Knob_ExitRelease
rev 51785 : imported patch syncknobs-05-Knob_InlineNotify
rev 51786 : imported patch syncknobs-06-Knob_Verbose
rev 51787 : imported patch syncknobs-07-Knob_VerifyInUse
rev 51788 : imported patch syncknobs-08-Knob_VerifyMatch
rev 51789 : imported patch syncknobs-09-Knob_SpinBase
rev 51790 : imported patch syncknobs-10-Knob_CASPenalty
*** 101,111 ****
// The knob* variables are effectively final. Once set they should
// never be modified hence. Consider using __read_mostly with GCC.
int ObjectMonitor::Knob_SpinLimit = 5000; // derived by an external tool -
- static int Knob_CASPenalty = -1; // Penalty for failed CAS
static int Knob_OXPenalty = -1; // Penalty for observed _owner change
static int Knob_SpinSetSucc = 1; // spinners set the _succ field
static int Knob_SpinEarly = 1;
static int Knob_SuccEnabled = 1; // futile wake throttling
static int Knob_SuccRestrict = 0; // Limit successors + spinners to at-most-one
--- 101,110 ----
*** 1863,1873 ****
// We're good to spin ... spin ingress.
// CONSIDER: use Prefetch::write() to avoid RTS->RTO upgrades
// when preparing to LD...CAS _owner, etc and the CAS is likely
// to succeed.
- int caspty = Knob_CASPenalty;
int oxpty = Knob_OXPenalty;
int sss = Knob_SpinSetSucc;
if (sss && _succ == NULL) _succ = Self;
Thread * prv = NULL;
--- 1862,1871 ----
*** 1931,1949 ****
}
return 1;
}
// The CAS failed ... we can take any of the following actions:
! // * penalize: ctr -= Knob_CASPenalty
// * exit spin with prejudice -- goto Abort;
// * exit spin without prejudice.
// * Since CAS is high-latency, retry again immediately.
prv = ox;
! if (caspty == -2) break;
! if (caspty == -1) goto Abort;
! ctr -= caspty;
! continue;
}
// Did lock ownership change hands ?
if (ox != prv && prv != NULL) {
if (oxpty == -2) break;
--- 1929,1944 ----
}
return 1;
}
// The CAS failed ... we can take any of the following actions:
! // * penalize: ctr -= CASPenalty
// * exit spin with prejudice -- goto Abort;
// * exit spin without prejudice.
// * Since CAS is high-latency, retry again immediately.
prv = ox;
! goto Abort;
}
// Did lock ownership change hands ?
if (ox != prv && prv != NULL) {
if (oxpty == -2) break;
< prev index next >