RFR: 8344671: Few JFR streaming tests fail with application not alive error on MacOS 15 [v3]

Jaikiran Pai jpai at openjdk.org
Fri Mar 28 09:48:42 UTC 2025


On Thu, 27 Mar 2025 22:13:17 GMT, Larry Cable <duke at openjdk.org> wrote:

>> src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c line 157:
>> 
>>> 155:             snprintf(msg, sizeof(msg), "pid: %d, state is not ready to participate in attach handshake!", (int)pid);
>>> 156: 
>>> 157:             JNU_ThrowByName(env, "com/sun/tools/attach/AttachNotSupportedException", msg);
>> 
>> I am not too familiar with JNI. Would it be cleaner/beneficial if this native method just returned `JNI_TRUE`/`JNI_FALSE` to indicate whether or not the `SIGQUIT` was sent and then in the Java code side, handle the `throwIfNotReady` part and create and throw the exception if this function returned `JNI_FALSE` and `throwIfNotReady` was `true`?
>> Would there be any benefit of doing that in the Java side instead of here?
>
> it would be different not necessarily better and this is the same pattern as is used for the pre-existing Linux imp

I see. Thank you Larry.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24085#discussion_r2018259411


More information about the serviceability-dev mailing list