< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp
Print this page
rev 52200 : [mq]: spaces
*** 62,76 ****
/* ============================================================================= */
/** jvmtiHeapRootCallback for first iteration. */
jvmtiIterationControl JNICALL
! heapRootCallbackForFirstObjectsIteration( jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
if (*tag_ptr != 0) return JVMTI_ITERATION_CONTINUE;
/* Set tag */
*tag_ptr = (jlong)++objectCount;
--- 62,76 ----
/* ============================================================================= */
/** jvmtiHeapRootCallback for first iteration. */
jvmtiIterationControl JNICALL
! heapRootCallbackForFirstObjectsIteration(jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
if (*tag_ptr != 0) return JVMTI_ITERATION_CONTINUE;
/* Set tag */
*tag_ptr = (jlong)++objectCount;
*** 92,116 ****
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiHeapRootCallback for second iteration. */
jvmtiIterationControl JNICALL
! heapRootCallbackForSecondObjectsIteration( jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
long ind = (long)((*tag_ptr) - 1);
if (*tag_ptr == 0) return JVMTI_ITERATION_CONTINUE;
/*
ObjectDesc *objectDesc = objectDescArr[ind];
jlong tag = (*objectDesc).tag;
*/
! if (ind < 0 || ind > objectCountMax ) {
NSK_COMPLAIN1("heapRootCallbackForSecondObjectsIteration: invalid object tag value: %d\n", (long)*tag_ptr);
nsk_jvmti_setFailStatus();
callbackAborted = 1;
return JVMTI_ITERATION_ABORT;
}
--- 92,116 ----
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiHeapRootCallback for second iteration. */
jvmtiIterationControl JNICALL
! heapRootCallbackForSecondObjectsIteration(jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
long ind = (long)((*tag_ptr) - 1);
if (*tag_ptr == 0) return JVMTI_ITERATION_CONTINUE;
/*
ObjectDesc *objectDesc = objectDescArr[ind];
jlong tag = (*objectDesc).tag;
*/
! if (ind < 0 || ind > objectCountMax) {
NSK_COMPLAIN1("heapRootCallbackForSecondObjectsIteration: invalid object tag value: %d\n", (long)*tag_ptr);
nsk_jvmti_setFailStatus();
callbackAborted = 1;
return JVMTI_ITERATION_ABORT;
}
*** 136,154 ****
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiStackReferenceCallback for first iteration. */
jvmtiIterationControl JNICALL
! stackReferenceCallbackForFirstObjectsIteration( jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong thread_tag,
! jint depth,
! jmethodID method,
! jint slot,
! void* user_data) {
if (*tag_ptr != 0) return JVMTI_ITERATION_CONTINUE;
/* Set tag */
*tag_ptr = (jlong)++objectCount;
--- 136,154 ----
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiStackReferenceCallback for first iteration. */
jvmtiIterationControl JNICALL
! stackReferenceCallbackForFirstObjectsIteration(jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong thread_tag,
! jint depth,
! jmethodID method,
! jint slot,
! void* user_data) {
if (*tag_ptr != 0) return JVMTI_ITERATION_CONTINUE;
/* Set tag */
*tag_ptr = (jlong)++objectCount;
*** 170,180 ****
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiStackReferenceCallback for second iteration. */
jvmtiIterationControl JNICALL
! stackReferenceCallbackForSecondObjectsIteration( jvmtiHeapRootKind root_kind,
jlong class_tag,
jlong size,
jlong* tag_ptr,
jlong thread_tag,
jint depth,
--- 170,180 ----
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiStackReferenceCallback for second iteration. */
jvmtiIterationControl JNICALL
! stackReferenceCallbackForSecondObjectsIteration(jvmtiHeapRootKind root_kind,
jlong class_tag,
jlong size,
jlong* tag_ptr,
jlong thread_tag,
jint depth,
*** 188,198 ****
/*
ObjectDesc *objectDesc = objectDescArr[ind];
jlong tag = (*objectDesc).tag;
*/
! if (ind < 0 || ind > objectCountMax ) {
NSK_COMPLAIN1("stackReferenceCallbackForSecondObjectsIteration: invalid object tag value: %d\n", (long)*tag_ptr);
nsk_jvmti_setFailStatus();
callbackAborted = 1;
return JVMTI_ITERATION_ABORT;
}
--- 188,198 ----
/*
ObjectDesc *objectDesc = objectDescArr[ind];
jlong tag = (*objectDesc).tag;
*/
! if (ind < 0 || ind > objectCountMax) {
NSK_COMPLAIN1("stackReferenceCallbackForSecondObjectsIteration: invalid object tag value: %d\n", (long)*tag_ptr);
nsk_jvmti_setFailStatus();
callbackAborted = 1;
return JVMTI_ITERATION_ABORT;
}
*** 218,234 ****
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiObjectReferenceCallback for first iteration. */
jvmtiIterationControl JNICALL
! objectReferenceCallbackForFirstObjectsIteration( jvmtiObjectReferenceKind reference_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong referrer_tag,
! jint referrer_index,
! void* user_data) {
if (*tag_ptr != 0) return JVMTI_ITERATION_CONTINUE;
/* Set tag */
*tag_ptr = (jlong)++objectCount;
--- 218,234 ----
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiObjectReferenceCallback for first iteration. */
jvmtiIterationControl JNICALL
! objectReferenceCallbackForFirstObjectsIteration(jvmtiObjectReferenceKind reference_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong referrer_tag,
! jint referrer_index,
! void* user_data) {
if (*tag_ptr != 0) return JVMTI_ITERATION_CONTINUE;
/* Set tag */
*tag_ptr = (jlong)++objectCount;
*** 250,276 ****
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiObjectReferenceCallback for second iteration. */
jvmtiIterationControl JNICALL
! objectReferenceCallbackForSecondObjectsIteration( jvmtiObjectReferenceKind reference_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong referrer_tag,
! jint referrer_index,
! void* user_data) {
long ind = (long)((*tag_ptr) - 1);
if (*tag_ptr == 0) return JVMTI_ITERATION_CONTINUE;
/*
ObjectDesc *objectDesc = objectDescArr[ind];
jlong tag = (*objectDesc).tag;
*/
! if (ind < 0 || ind > objectCountMax ) {
NSK_COMPLAIN1("objectReferenceCallbackForSecondObjectsIteration: invalid object tag value: %d\n", (long)*tag_ptr);
nsk_jvmti_setFailStatus();
callbackAborted = 1;
return JVMTI_ITERATION_ABORT;
}
--- 250,276 ----
return JVMTI_ITERATION_CONTINUE;
}
/** jvmtiObjectReferenceCallback for second iteration. */
jvmtiIterationControl JNICALL
! objectReferenceCallbackForSecondObjectsIteration(jvmtiObjectReferenceKind reference_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong referrer_tag,
! jint referrer_index,
! void* user_data) {
long ind = (long)((*tag_ptr) - 1);
if (*tag_ptr == 0) return JVMTI_ITERATION_CONTINUE;
/*
ObjectDesc *objectDesc = objectDescArr[ind];
jlong tag = (*objectDesc).tag;
*/
! if (ind < 0 || ind > objectCountMax) {
NSK_COMPLAIN1("objectReferenceCallbackForSecondObjectsIteration: invalid object tag value: %d\n", (long)*tag_ptr);
nsk_jvmti_setFailStatus();
callbackAborted = 1;
return JVMTI_ITERATION_ABORT;
}
< prev index next >