RFR: 8365192: post_meth_exit should be in vm state when calling get_jvmti_thread_state [v7]

David Holmes dholmes at openjdk.org
Wed Aug 20 07:50:39 UTC 2025


On Wed, 20 Aug 2025 05:49:17 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> test/hotspot/jtreg/serviceability/jvmti/events/MethodExit/ExceptionOccurred.java line 32:
>> 
>>> 30:  * @run main/othervm/native -agentlib:ExceptionOccurred ExceptionOccurred
>>> 31:  */
>>> 32: public class ExceptionOccurred {
>> 
>> I'm very confused by the naming here: what exception has occurred where?
>
> The exception was thrown in the current thread/  However, the current method is not unwinded. It is called using JNI while  the thread has already thrown but not yet caught exception. 
> I thought to name it MethodExitWhileExceptionPending, however full name would be 
> serviceability/jvmti/events/MethodExit/MethodExitWhileExceptionPending/MethodExitWhileExceptionPending.java
> so I started to "reduce" it.
> Moved to upper directory and removed MethodExit. Also the state looks similar to 'ExceptionOccurred' for JNI method. Let me know if you have better name in the mind.

Well `ExceptionExit` is slightly clearer and ties in with `exceptionExit()`.

Before this fix what happens if you run this test case?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26713#discussion_r2287298481


More information about the hotspot-dev mailing list