8202342: [Graal] fromTonga/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java fails with "Location mismatch" errors
authordtitov
Wed, 22 Aug 2018 08:31:15 -0700
changeset 51492 fc80fa0ecac8
parent 51491 187c84a5efe1
child 51493 6b5f3f5fd63c
8202342: [Graal] fromTonga/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java fails with "Location mismatch" errors Reviewed-by: sspitsyn, amenkov
test/hotspot/jtreg/ProblemList-graal.txt
test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/followref003.c
--- a/test/hotspot/jtreg/ProblemList-graal.txt	Tue Aug 14 09:59:37 2018 -0700
+++ b/test/hotspot/jtreg/ProblemList-graal.txt	Wed Aug 22 08:31:15 2018 -0700
@@ -136,8 +136,6 @@
 vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/TestDescription.java     8195674   generic-all
 vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn002/TestDescription.java     8195674   generic-all
 
-vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java       8202342   generic-all
-
 runtime/appcds/cacheObject/RedefineClassTest.java                                  8204506   macosx-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java        8204506   macosx-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java        8204506   macosx-all
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/followref003.c	Tue Aug 14 09:59:37 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/followref003.c	Wed Aug 22 08:31:15 2018 -0700
@@ -770,10 +770,13 @@
             break;
 
         case JVMTI_HEAP_REFERENCE_STACK_LOCAL:
-            thr_idx  = registerThread(thr_id, thr_tag);
-            meth_idx = registerFrame(thr_id, depth, method, ref_kind);
-            if (meth_idx > 0) {
-                jint loc_idx  = registerLocal(meth_idx, location, slot, tag);
+            // Skip local references from non-main (e.g. compiler) threads.
+            if (thr_tag == TARG_THREAD_TAG) {
+                thr_idx  = registerThread(thr_id, thr_tag);
+                meth_idx = registerFrame(thr_id, depth, method, ref_kind);
+                if (meth_idx > 0) {
+                    jint loc_idx  = registerLocal(meth_idx, location, slot, tag);
+                }
             }
             /* This part is kind of hack. It has some expectations about stack layout */
             if (thr_tag == TARG_THREAD_TAG &&
@@ -811,10 +814,13 @@
                    nsk_jvmti_setFailStatus();
                }
             }
-            /* Fall through */
+            break;
         case JVMTI_HEAP_REFERENCE_JNI_LOCAL:
-            thr_idx  = registerThread(thr_id, thr_tag);
-            meth_idx = registerFrame(thr_id, depth, method, ref_kind);
+            // Skip JNI local references from non-main (e.g. compiler) threads.
+            if (thr_tag == TARG_THREAD_TAG) {
+                thr_idx  = registerThread(thr_id, thr_tag);
+                meth_idx = registerFrame(thr_id, depth, method, ref_kind);
+            }
             break;
 
         case JVMTI_REFERENCE_ARRAY_ELEMENT: