mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8256304: should MonitorUsedDeflationThreshold be experimental or diagnostic
8256301: ObjectMonitor::is_busy() should return bool Reviewed-by: coleenp, pchilanomate
This commit is contained in:
parent
8f10c5a890
commit
fe333431c8
4 changed files with 6 additions and 6 deletions
|
@ -712,7 +712,7 @@ const intx ObjectAlignmentInBytes = 8;
|
||||||
"at one time (minimum is 1024).") \
|
"at one time (minimum is 1024).") \
|
||||||
range(1024, max_jint) \
|
range(1024, max_jint) \
|
||||||
\
|
\
|
||||||
product(intx, MonitorUsedDeflationThreshold, 90, EXPERIMENTAL, \
|
product(intx, MonitorUsedDeflationThreshold, 90, DIAGNOSTIC, \
|
||||||
"Percentage of used monitors before triggering deflation (0 is " \
|
"Percentage of used monitors before triggering deflation (0 is " \
|
||||||
"off). The check is performed on GuaranteedSafepointInterval " \
|
"off). The check is performed on GuaranteedSafepointInterval " \
|
||||||
"or AsyncDeflationInterval.") \
|
"or AsyncDeflationInterval.") \
|
||||||
|
|
|
@ -519,7 +519,7 @@ int ObjectMonitor::TryLock(JavaThread* current) {
|
||||||
// Contending threads that see that condition know to retry their operation.
|
// Contending threads that see that condition know to retry their operation.
|
||||||
//
|
//
|
||||||
bool ObjectMonitor::deflate_monitor() {
|
bool ObjectMonitor::deflate_monitor() {
|
||||||
if (is_busy() != 0) {
|
if (is_busy()) {
|
||||||
// Easy checks are first - the ObjectMonitor is busy so no deflation.
|
// Easy checks are first - the ObjectMonitor is busy so no deflation.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@ class ObjectMonitor : public CHeapObj<mtInternal> {
|
||||||
volatile markWord* header_addr();
|
volatile markWord* header_addr();
|
||||||
void set_header(markWord hdr);
|
void set_header(markWord hdr);
|
||||||
|
|
||||||
intptr_t is_busy() const {
|
bool is_busy() const {
|
||||||
// TODO-FIXME: assert _owner == null implies _recursions = 0
|
// TODO-FIXME: assert _owner == null implies _recursions = 0
|
||||||
intptr_t ret_code = _waiters | intptr_t(_cxq) | intptr_t(_EntryList);
|
intptr_t ret_code = _waiters | intptr_t(_cxq) | intptr_t(_EntryList);
|
||||||
if (contentions() > 0) {
|
if (contentions() > 0) {
|
||||||
|
@ -245,7 +245,7 @@ class ObjectMonitor : public CHeapObj<mtInternal> {
|
||||||
if (!owner_is_DEFLATER_MARKER()) {
|
if (!owner_is_DEFLATER_MARKER()) {
|
||||||
ret_code |= intptr_t(owner_raw());
|
ret_code |= intptr_t(owner_raw());
|
||||||
}
|
}
|
||||||
return ret_code;
|
return ret_code != 0;
|
||||||
}
|
}
|
||||||
const char* is_busy_to_string(stringStream* ss);
|
const char* is_busy_to_string(stringStream* ss);
|
||||||
|
|
||||||
|
|
|
@ -1771,9 +1771,9 @@ void ObjectSynchronizer::log_in_use_monitor_details(outputStream* out) {
|
||||||
const markWord mark = mid->header();
|
const markWord mark = mid->header();
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
out->print(INTPTR_FORMAT " %d%d%d " INTPTR_FORMAT " %s", p2i(mid),
|
out->print(INTPTR_FORMAT " %d%d%d " INTPTR_FORMAT " %s", p2i(mid),
|
||||||
mid->is_busy() != 0, mark.hash() != 0, mid->owner() != NULL,
|
mid->is_busy(), mark.hash() != 0, mid->owner() != NULL,
|
||||||
p2i(obj), obj == NULL ? "" : obj->klass()->external_name());
|
p2i(obj), obj == NULL ? "" : obj->klass()->external_name());
|
||||||
if (mid->is_busy() != 0) {
|
if (mid->is_busy()) {
|
||||||
out->print(" (%s)", mid->is_busy_to_string(&ss));
|
out->print(" (%s)", mid->is_busy_to_string(&ss));
|
||||||
ss.reset();
|
ss.reset();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue