From b42b645e26e206a2b1457cf9ea453b5021a873f5 Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Wed, 15 May 2024 17:53:30 +0000 Subject: Report method unwind events for native methods When we are returning from JNI with a pending exception we deoptimize to correctly handle the exception. We missed reporting an unwind event for the native method that was returning. Also adds a regression test for this case. Bug: 339662394 Test:art/test.py -t 989 Change-Id: I8336dc831e3801b8c0976a5588d1682363d10e64 --- test/jvmti-common/Trace.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/jvmti-common/Trace.java') diff --git a/test/jvmti-common/Trace.java b/test/jvmti-common/Trace.java index 8999bb1368..3df1737c91 100644 --- a/test/jvmti-common/Trace.java +++ b/test/jvmti-common/Trace.java @@ -28,6 +28,7 @@ public class Trace { Method singleStep, Thread thr); public static native void disableTracing(Thread thr); + public static native void nativeEnableFramePopEvents(); public static void enableFieldTracing(Class methodClass, Method fieldAccess, @@ -43,6 +44,10 @@ public class Trace { enableTracing(methodClass, entryMethod, exitMethod, null, null, null, thr); } + public static void enableFramePopEvents() { + nativeEnableFramePopEvents(); + } + public static void enableSingleStepTracing(Class methodClass, Method singleStep, Thread thr) { -- cgit v1.2.3-59-g8ed1b