|
25 | 25 |
|
26 | 26 | package java.lang.management;
|
27 | 27 |
|
| 28 | +import java.lang.foreign.Linker; |
28 | 29 | import javax.management.openmbean.ArrayType;
|
29 | 30 | import javax.management.openmbean.CompositeData;
|
30 | 31 | import sun.management.ManagementFactoryHelper;
|
@@ -544,11 +545,21 @@ public boolean isSuspended() {
|
544 | 545 | }
|
545 | 546 |
|
546 | 547 | /**
|
547 |
| - * Tests if the thread associated with this {@code ThreadInfo} |
548 |
| - * is executing native code via the Java Native Interface (JNI). |
549 |
| - * The JNI native code does not include |
550 |
| - * the virtual machine support code or the compiled native |
551 |
| - * code generated by the virtual machine. |
| 548 | + * Tests if the thread associated with this {@code ThreadInfo} is executing |
| 549 | + * native code. |
| 550 | + * |
| 551 | + * <p> A thread is considered to be executing native code when it is executing a |
| 552 | + * native method, executing native code invoked using a {@linkplain |
| 553 | + * Linker#downcallHandle(java.lang.foreign.FunctionDescriptor, Linker.Option...) |
| 554 | + * method handle} obtained from the {@linkplain Linker native linker}, or is |
| 555 | + * <a href="{@docRoot}/../specs/jni/invocation.html#attachcurrentthread"> |
| 556 | + * attached</a> to the VM with the <a href="{@docRoot}/../specs/jni/index.html"> |
| 557 | + * Java Native Interface</a> with no Java frames on its stack. |
| 558 | + * |
| 559 | + * <p> Native code does not include Java virtual machine support code, |
| 560 | + * compiled code generated by the Java virtual machine, or special cases |
| 561 | + * such as a thread blocked on a <a href="{@docRoot}/../specs/jvmti.html#RawMonitors"> |
| 562 | + * JVM TI raw monitor</a>. |
552 | 563 | *
|
553 | 564 | * @return {@code true} if the thread is executing native code;
|
554 | 565 | * {@code false} otherwise.
|
|
0 commit comments