< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/ap04t003.cpp
Print this page
rev 52215 : 8212770: Remove spaces before/after () for vmTestbase/jvmti/[s-u]
Summary:
Reviewed-by:
*** 118,131 ****
}
}
}
jvmtiIterationControl JNICALL
! heapObjectCallback( jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
if (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
--- 118,131 ----
}
}
}
jvmtiIterationControl JNICALL
! heapObjectCallback(jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
if (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
*** 137,151 ****
return JVMTI_ITERATION_CONTINUE;
}
/* jvmtiHeapRootCallback */
jvmtiIterationControl JNICALL
! heapRootCallback( jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
if (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
--- 137,151 ----
return JVMTI_ITERATION_CONTINUE;
}
/* jvmtiHeapRootCallback */
jvmtiIterationControl JNICALL
! heapRootCallback(jvmtiHeapRootKind root_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! void* user_data) {
if (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
*** 157,175 ****
return JVMTI_ITERATION_CONTINUE;
}
/* jvmtiStackReferenceCallback */
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 (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
--- 157,175 ----
return JVMTI_ITERATION_CONTINUE;
}
/* jvmtiStackReferenceCallback */
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 (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
*** 182,198 ****
}
/* jvmtiObjectReferenceCallback */
jvmtiIterationControl JNICALL
! objectReferenceCallback( jvmtiObjectReferenceKind reference_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong referrer_tag,
! jint referrer_index,
! void* user_data) {
if (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
--- 182,198 ----
}
/* jvmtiObjectReferenceCallback */
jvmtiIterationControl JNICALL
! objectReferenceCallback(jvmtiObjectReferenceKind reference_kind,
! jlong class_tag,
! jlong size,
! jlong* tag_ptr,
! jlong referrer_tag,
! jint referrer_index,
! void* user_data) {
if (getCounter(&iterationCount) == 0) {
notifyThread();
}
increaseCounter(&iterationCount);
*** 337,357 ****
static jthread newThreadObj(JNIEnv* jni) {
jclass thrClass;
jmethodID cid;
jthread result = NULL;
! if (!NSK_JNI_VERIFY(jni, (thrClass = jni->FindClass("java/lang/Thread")) != NULL )) {
nsk_jvmti_setFailStatus();
return result;
}
! if (!NSK_JNI_VERIFY(jni, (cid = jni->GetMethodID(thrClass, "<init>", "()V")) != NULL )) {
nsk_jvmti_setFailStatus();
return result;
}
! if (!NSK_JNI_VERIFY(jni, (result = jni->NewObject(thrClass, cid)) != NULL )) {
nsk_jvmti_setFailStatus();
return result;
}
return result;
--- 337,357 ----
static jthread newThreadObj(JNIEnv* jni) {
jclass thrClass;
jmethodID cid;
jthread result = NULL;
! if (!NSK_JNI_VERIFY(jni, (thrClass = jni->FindClass("java/lang/Thread")) != NULL)) {
nsk_jvmti_setFailStatus();
return result;
}
! if (!NSK_JNI_VERIFY(jni, (cid = jni->GetMethodID(thrClass, "<init>", "()V")) != NULL)) {
nsk_jvmti_setFailStatus();
return result;
}
! if (!NSK_JNI_VERIFY(jni, (result = jni->NewObject(thrClass, cid)) != NULL)) {
nsk_jvmti_setFailStatus();
return result;
}
return result;
*** 400,422 ****
}
/***********************************************************************/
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_setTag( JNIEnv* jni,
! jclass klass,
! jobject target, /* object to be tagged */
! jlong tag ) {
if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverHeap( JNIEnv* jni,
! jclass klass ) {
int modified = 0;
int found = 0;
if (!prepareToIteration(jni))
return;
--- 400,422 ----
}
/***********************************************************************/
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_setTag(JNIEnv* jni,
! jclass klass,
! jobject target, /* object to be tagged */
! jlong tag) {
if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverHeap(JNIEnv* jni,
! jclass klass) {
int modified = 0;
int found = 0;
if (!prepareToIteration(jni))
return;
*** 441,452 ****
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverReachableObjects( JNIEnv* jni,
! jclass klass ) {
int modified = 0;
int found = 0;
if (!prepareToIteration(jni))
return;
--- 441,452 ----
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverReachableObjects(JNIEnv* jni,
! jclass klass) {
int modified = 0;
int found = 0;
if (!prepareToIteration(jni))
return;
*** 472,483 ****
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverInstancesOfClass( JNIEnv* jni,
! jclass klass ) {
int modified = 0;
int found = 0;
if (!prepareToIteration(jni))
return;
--- 472,483 ----
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverInstancesOfClass(JNIEnv* jni,
! jclass klass) {
int modified = 0;
int found = 0;
if (!prepareToIteration(jni))
return;
*** 503,520 ****
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverObjectsReachableFromObject( JNIEnv* jni,
! jclass klass ) {
jobject root = NULL;
int modified = 0;
int found = 0;
if (!NSK_JNI_VERIFY(jni, (root =
! jni->GetStaticObjectField(debugeeClass, rootFieldID)) != NULL )) {
NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'root' field value\n\n");
nsk_jvmti_setFailStatus();
return;
}
--- 503,520 ----
nsk_jvmti_setFailStatus();
}
}
JNIEXPORT void JNICALL
! Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverObjectsReachableFromObject(JNIEnv* jni,
! jclass klass) {
jobject root = NULL;
int modified = 0;
int found = 0;
if (!NSK_JNI_VERIFY(jni, (root =
! jni->GetStaticObjectField(debugeeClass, rootFieldID)) != NULL)) {
NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'root' field value\n\n");
nsk_jvmti_setFailStatus();
return;
}
*** 559,569 ****
if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
return;
NSK_DISPLAY1("Find ID of 'root' field: %s\n", ROOT_SIGNATURE);
if (!NSK_JNI_VERIFY(jni, (rootFieldID =
! jni->GetStaticFieldID(debugeeClass, "root", ROOT_SIGNATURE)) != NULL )) {
nsk_jvmti_setFailStatus();
return;
}
NSK_DISPLAY0("Let debugee to run test cases\n");
--- 559,569 ----
if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
return;
NSK_DISPLAY1("Find ID of 'root' field: %s\n", ROOT_SIGNATURE);
if (!NSK_JNI_VERIFY(jni, (rootFieldID =
! jni->GetStaticFieldID(debugeeClass, "root", ROOT_SIGNATURE)) != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
NSK_DISPLAY0("Let debugee to run test cases\n");
< prev index next >