-
Enhancement
-
Resolution: Fixed
-
P4
-
8, 11, 16, 17
-
b11
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8280877 | 11.0.16-oracle | Tobias Hartmann | P4 | Resolved | Fixed | b01 |
Currently, HotSpotJVMCIRuntime.writeDebugOutput does nothing if the current thread is not attached to HotSpot (i.e., Thread::current_or_null() == NULL). This means crucial debug info can be lost.
The only reason for the current behavior is that writeDebugOutput passes a Java byte array to C++ code and the C++ code calls back into Java to decode the byte array into a native array. These call backs require the current thread to be attached to the VM.
Moving the Java-to-native-buffer decoding into Java avoids the need for the call backs and hence the requirement for the current thread to be attached.
The only reason for the current behavior is that writeDebugOutput passes a Java byte array to C++ code and the C++ code calls back into Java to decode the byte array into a native array. These call backs require the current thread to be attached to the VM.
Moving the Java-to-native-buffer decoding into Java avoids the need for the call backs and hence the requirement for the current thread to be attached.
- backported by
-
JDK-8280877 [JVMCI] allow printing to tty from unattached libgraal thread
-
- Resolved
-
- relates to
-
JDK-8263403 [JVMCI] output written to tty via HotSpotJVMCIRuntime can be garbled
-
- Resolved
-