8203948: Expand JVMTI callback notion of "internal threads"

Allow any NamedThreads in some contexts.

Reviewed-by: coleenp, dholmes
This commit is contained in:
Kim Barrett 2018-06-04 20:14:13 -04:00
parent 33724f098f
commit 2a1a55cc26
2 changed files with 7 additions and 7 deletions
src/hotspot/share/prims

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
@ -571,7 +571,7 @@ static jvmtiError JNICALL
transition = false;
} else {
this_thread = Thread::current_or_null();
transition = ((this_thread != NULL) &amp;&amp; !this_thread->is_VM_thread() &amp;&amp; !this_thread->is_ConcurrentGC_thread());
transition = ((this_thread != NULL) &amp;&amp; !this_thread->is_Named_thread());
}
if (transition) {</xsl:text>
</xsl:otherwise>

@ -3313,7 +3313,7 @@ JvmtiEnv::RawMonitorEnter(JvmtiRawMonitor * rmonitor) {
#endif /* PROPER_TRANSITIONS */
assert(r == ObjectMonitor::OM_OK, "raw_enter should have worked");
} else {
if (thread->is_VM_thread() || thread->is_ConcurrentGC_thread()) {
if (thread->is_Named_thread()) {
r = rmonitor->raw_enter(thread);
} else {
ShouldNotReachHere();
@ -3351,7 +3351,7 @@ JvmtiEnv::RawMonitorExit(JvmtiRawMonitor * rmonitor) {
#endif /* PROPER_TRANSITIONS */
r = rmonitor->raw_exit(current_thread);
} else {
if (thread->is_VM_thread() || thread->is_ConcurrentGC_thread()) {
if (thread->is_Named_thread()) {
r = rmonitor->raw_exit(thread);
} else {
ShouldNotReachHere();
@ -3408,7 +3408,7 @@ JvmtiEnv::RawMonitorWait(JvmtiRawMonitor * rmonitor, jlong millis) {
#endif /* PROPER_TRANSITIONS */
} else {
if (thread->is_VM_thread() || thread->is_ConcurrentGC_thread()) {
if (thread->is_Named_thread()) {
r = rmonitor->raw_wait(millis, true, thread);
} else {
ShouldNotReachHere();
@ -3442,7 +3442,7 @@ JvmtiEnv::RawMonitorNotify(JvmtiRawMonitor * rmonitor) {
ThreadInVMfromUnknown __tiv;
r = rmonitor->raw_notify(current_thread);
} else {
if (thread->is_VM_thread() || thread->is_ConcurrentGC_thread()) {
if (thread->is_Named_thread()) {
r = rmonitor->raw_notify(thread);
} else {
ShouldNotReachHere();
@ -3472,7 +3472,7 @@ JvmtiEnv::RawMonitorNotifyAll(JvmtiRawMonitor * rmonitor) {
ThreadInVMfromUnknown __tiv;
r = rmonitor->raw_notifyAll(current_thread);
} else {
if (thread->is_VM_thread() || thread->is_ConcurrentGC_thread()) {
if (thread->is_Named_thread()) {
r = rmonitor->raw_notifyAll(thread);
} else {
ShouldNotReachHere();