< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/ap02t001.cpp
Print this page
rev 52200 : [mq]: spaces
*** 64,82 ****
return JVMTI_ITERATION_CONTINUE;
}
jvmtiIterationControl JNICALL
! stackReferenceCallback( jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong thread_tag,
! jint depth,
! jmethodID method,
! jint slot,
! void* user_data) {
if (class_tag == TESTED_CLASS_TAG) {
obj_count++;
}
--- 64,82 ----
return JVMTI_ITERATION_CONTINUE;
}
jvmtiIterationControl JNICALL
! stackReferenceCallback(jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong thread_tag,
! jint depth,
! jmethodID method,
! jint slot,
! void* user_data) {
if (class_tag == TESTED_CLASS_TAG) {
obj_count++;
}
*** 84,101 ****
}
/************************/
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP02_ap02t001_throwException( JNIEnv* jni,
! jclass cls,
! jclass exception_cls ) {
jint result;
! result = jni->ThrowNew(exception_cls, "Got expected exception thrown from native code" );
if (result != 0) {
! NSK_COMPLAIN1("throwException: Unable to throw exception in native code: %d\n\n", result );
nsk_jvmti_setFailStatus();
} else {
NSK_DISPLAY0("throwException: ThrowNew returned success code: 0\n\n");
}
}
--- 84,101 ----
}
/************************/
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP02_ap02t001_throwException(JNIEnv* jni,
! jclass cls,
! jclass exception_cls) {
jint result;
! result = jni->ThrowNew(exception_cls, "Got expected exception thrown from native code");
if (result != 0) {
! NSK_COMPLAIN1("throwException: Unable to throw exception in native code: %d\n\n", result);
nsk_jvmti_setFailStatus();
} else {
NSK_DISPLAY0("throwException: ThrowNew returned success code: 0\n\n");
}
}
< prev index next >