< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/followref003.cpp

Print this page




 793                     }
 794                 }
 795                if (length == 0
 796                     && reference_info->stack_local.slot != ARGV_STRING_ARR_SLOT
 797                     && reference_info->stack_local.slot < FIRST_PRIM_ARR_SLOT
 798                     && reference_info->stack_local.slot > DUMMY_STRING_ARR_SLOT) {
 799                    NSK_COMPLAIN1("Wrong length of the local variable:"
 800                                  " expected: -1, found: %-d\n\n", length);
 801                    nsk_jvmti_setFailStatus();
 802                }
 803             }
 804             break;
 805         case JVMTI_HEAP_REFERENCE_JNI_LOCAL:
 806             // Skip JNI local references from non-main (e.g. compiler) threads.
 807             if (thr_tag == TARG_THREAD_TAG) {
 808                 thr_idx  = registerThread(thr_id, thr_tag);
 809                 meth_idx = registerFrame(thr_id, depth, method, ref_kind);
 810             }
 811             break;
 812 
 813         case JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT:
 814         case JVMTI_HEAP_REFERENCE_JNI_GLOBAL:
 815         case JVMTI_HEAP_REFERENCE_SYSTEM_CLASS:
 816         case JVMTI_HEAP_REFERENCE_MONITOR:
 817         case JVMTI_HEAP_REFERENCE_OTHER:
 818             /* These reference kinds are expected */
 819             break;
 820 
 821         default: {
 822             NSK_COMPLAIN1("This reference kind was not expected: %s\n\n",
 823                            ref_kind_str[ref_kind]);
 824             fflush(0);
 825             nsk_jvmti_setFailStatus();
 826             break;
 827         }
 828     }
 829     return 0;
 830 }
 831 
 832 jint JNICALL primitiveFieldCallback
 833     (jvmtiHeapReferenceKind        ref_kind,




 793                     }
 794                 }
 795                if (length == 0
 796                     && reference_info->stack_local.slot != ARGV_STRING_ARR_SLOT
 797                     && reference_info->stack_local.slot < FIRST_PRIM_ARR_SLOT
 798                     && reference_info->stack_local.slot > DUMMY_STRING_ARR_SLOT) {
 799                    NSK_COMPLAIN1("Wrong length of the local variable:"
 800                                  " expected: -1, found: %-d\n\n", length);
 801                    nsk_jvmti_setFailStatus();
 802                }
 803             }
 804             break;
 805         case JVMTI_HEAP_REFERENCE_JNI_LOCAL:
 806             // Skip JNI local references from non-main (e.g. compiler) threads.
 807             if (thr_tag == TARG_THREAD_TAG) {
 808                 thr_idx  = registerThread(thr_id, thr_tag);
 809                 meth_idx = registerFrame(thr_id, depth, method, ref_kind);
 810             }
 811             break;
 812 
 813         // case JVMTI_REFERENCE_ARRAY_ELEMENT:
 814         case JVMTI_HEAP_REFERENCE_JNI_GLOBAL:
 815         case JVMTI_HEAP_REFERENCE_SYSTEM_CLASS:
 816         case JVMTI_HEAP_REFERENCE_MONITOR:
 817         case JVMTI_HEAP_REFERENCE_OTHER:
 818             /* These reference kinds are expected */
 819             break;
 820 
 821         default: {
 822             NSK_COMPLAIN1("This reference kind was not expected: %s\n\n",
 823                            ref_kind_str[ref_kind]);
 824             fflush(0);
 825             nsk_jvmti_setFailStatus();
 826             break;
 827         }
 828     }
 829     return 0;
 830 }
 831 
 832 jint JNICALL primitiveFieldCallback
 833     (jvmtiHeapReferenceKind        ref_kind,


< prev index next >