8215161: Normalize spaces for vmTestbase/[a-j]
Added spaces around comparators Reviewed-by: amenkov, sspitsyn, martin
This commit is contained in:
parent
dfd58a59ff
commit
a16d122b07
@ -118,17 +118,17 @@ Breakpoint(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
|
||||
}
|
||||
if (thr_info.name == NULL ||
|
||||
strcmp(thr_info.name,THREAD_NAME) != 0 ||
|
||||
thr_info.is_daemon==JNI_TRUE) {
|
||||
thr_info.is_daemon == JNI_TRUE) {
|
||||
result = checkStatus = STATUS_FAILED;
|
||||
NSK_COMPLAIN2(
|
||||
"TEST FAILED: Breakpoint event with unexpected thread info:\n"
|
||||
"\tname: \"%s\"\ttype: %s thread\n\n",
|
||||
(thr_info.name == NULL)?"NULL":thr_info.name,
|
||||
(thr_info.is_daemon==JNI_TRUE)?"deamon":"user");
|
||||
(thr_info.name == NULL) ? "NULL" : thr_info.name,
|
||||
(thr_info.is_daemon == JNI_TRUE) ? "deamon" : "user");
|
||||
}
|
||||
else
|
||||
NSK_DISPLAY2("CHECK PASSED: thread name: \"%s\"\ttype: %s thread\n",
|
||||
thr_info.name, (thr_info.is_daemon==JNI_TRUE)?"deamon":"user");
|
||||
thr_info.name, (thr_info.is_daemon == JNI_TRUE) ? "deamon" : "user");
|
||||
|
||||
/* checking location */
|
||||
if (location != 0) {
|
||||
|
@ -89,9 +89,9 @@ static void initCounters() {
|
||||
static int findSig(char *sig, int expected) {
|
||||
unsigned int i;
|
||||
|
||||
for (i=0; i<((expected==1)?EXP_SIG_NUM:UNEXP_SIG_NUM); i++)
|
||||
for (i=0; i<((expected == 1) ? EXP_SIG_NUM : UNEXP_SIG_NUM); i++)
|
||||
if (sig != NULL &&
|
||||
strcmp(((expected==1)?expSigs[i]:unexpSigs[i]), sig) == 0)
|
||||
strcmp(((expected == 1) ? expSigs[i] : unexpSigs[i]), sig) == 0)
|
||||
return i; /* the signature found, return index */
|
||||
|
||||
return -1; /* the signature not found */
|
||||
|
@ -214,9 +214,9 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
}
|
||||
if (watch.is_static != watches[i].is_static) {
|
||||
printf("(watch#%" PRIuPTR ") wrong field type: %s", i,
|
||||
(watch.is_static==JNI_TRUE)?"static":"instance");
|
||||
(watch.is_static == JNI_TRUE) ? "static" : "instance");
|
||||
printf(", expected: %s\n",
|
||||
(watches[i].is_static==JNI_TRUE)?"static":"instance");
|
||||
(watches[i].is_static == JNI_TRUE) ? "static" : "instance");
|
||||
result = STATUS_FAILED;
|
||||
}
|
||||
return;
|
||||
|
@ -213,9 +213,9 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
}
|
||||
if (watch.is_static != watches[i].is_static) {
|
||||
printf("(watch#%" PRIuPTR ") wrong field type: %s", i,
|
||||
(watch.is_static==JNI_TRUE)?"static":"instance");
|
||||
(watch.is_static == JNI_TRUE) ? "static" : "instance");
|
||||
printf(", expected: %s\n",
|
||||
(watches[i].is_static==JNI_TRUE)?"static":"instance");
|
||||
(watches[i].is_static == JNI_TRUE) ? "static" : "instance");
|
||||
result = STATUS_FAILED;
|
||||
}
|
||||
return;
|
||||
|
@ -193,9 +193,9 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
}
|
||||
if (watch.is_static != watches[i].is_static) {
|
||||
printf("(watch#%" PRIuPTR ") wrong field type: %s", i,
|
||||
(watch.is_static==JNI_TRUE)?"static":"instance");
|
||||
(watch.is_static == JNI_TRUE) ? "static" : "instance");
|
||||
printf(", expected: %s\n",
|
||||
(watches[i].is_static==JNI_TRUE)?"static":"instance");
|
||||
(watches[i].is_static == JNI_TRUE) ? "static" : "instance");
|
||||
result = STATUS_FAILED;
|
||||
}
|
||||
return;
|
||||
|
@ -179,9 +179,9 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
}
|
||||
if (watch.is_static != watches[i].is_static) {
|
||||
printf("(watch#%" PRIuPTR ") wrong field type: %s", i,
|
||||
(watch.is_static==JNI_TRUE)?"static":"instance");
|
||||
(watch.is_static == JNI_TRUE) ? "static" : "instance");
|
||||
printf(", expected: %s\n",
|
||||
(watches[i].is_static==JNI_TRUE)?"static":"instance");
|
||||
(watches[i].is_static == JNI_TRUE) ? "static" : "instance");
|
||||
result = STATUS_FAILED;
|
||||
}
|
||||
return;
|
||||
|
@ -282,9 +282,9 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
}
|
||||
if (watch.is_static != watches[i].is_static) {
|
||||
printf("(watch#%" PRIuPTR ") wrong field type: %s", i,
|
||||
(watch.is_static==JNI_TRUE)?"static":"instance");
|
||||
(watch.is_static == JNI_TRUE) ? "static" : "instance");
|
||||
printf(", expected: %s\n",
|
||||
(watches[i].is_static==JNI_TRUE)?"static":"instance");
|
||||
(watches[i].is_static == JNI_TRUE) ? "static" : "instance");
|
||||
result = STATUS_FAILED;
|
||||
}
|
||||
if (!isEqual((JNIEnv *)env, watch.f_sig, watch.val, watches[i].val)) {
|
||||
|
@ -281,9 +281,9 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
}
|
||||
if (watch.is_static != watches[i].is_static) {
|
||||
printf("(watch#%" PRIuPTR ") wrong field type: %s", i,
|
||||
(watch.is_static==JNI_TRUE)?"static":"instance");
|
||||
(watch.is_static == JNI_TRUE) ? "static" : "instance");
|
||||
printf(", expected: %s\n",
|
||||
(watches[i].is_static==JNI_TRUE)?"static":"instance");
|
||||
(watches[i].is_static == JNI_TRUE) ? "static" : "instance");
|
||||
result = STATUS_FAILED;
|
||||
}
|
||||
if (!isEqual((JNIEnv *)env, watch.f_sig, watch.val, watches[i].val)) {
|
||||
|
@ -200,7 +200,7 @@ void push(JNIEnv *env, jthread thr, jmethodID method, int depth) {
|
||||
new_item->depth = depth;
|
||||
threads[i].tos = new_item;
|
||||
push_count++;
|
||||
max_depth = (max_depth < depth) ? depth: max_depth;
|
||||
max_depth = (max_depth < depth) ? depth : max_depth;
|
||||
}
|
||||
|
||||
void JNICALL MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
|
@ -67,7 +67,7 @@ static int checkSig(JNIEnv *jni_env, jclass testedCls, int idx) {
|
||||
class_sig[idx][0]);
|
||||
|
||||
if (strcmp(class_sig[idx][1], sign) != 0 ||
|
||||
strcmp(class_sig[idx][2], (gen_sign==NULL)?"NULL":gen_sign) != 0) {
|
||||
strcmp(class_sig[idx][2], (gen_sign == NULL) ? "NULL" : gen_sign) != 0) {
|
||||
NSK_COMPLAIN5(
|
||||
"TEST FAILED: class: \"%s\" has\n"
|
||||
"\tsignature: \"%s\"\n"
|
||||
@ -75,19 +75,19 @@ static int checkSig(JNIEnv *jni_env, jclass testedCls, int idx) {
|
||||
"\tExpected: \"%s\"\n"
|
||||
"\t\"%s\"\n\n",
|
||||
class_sig[idx][0],
|
||||
sign, (gen_sign==NULL)?"NULL":gen_sign,
|
||||
sign, (gen_sign == NULL) ? "NULL" : gen_sign,
|
||||
class_sig[idx][1], class_sig[idx][2]);
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
else
|
||||
NSK_DISPLAY2("CHECK PASSED: signature: \"%s\",\n\tgeneric signature: \"%s\"\n",
|
||||
sign, (gen_sign==NULL)?"NULL":gen_sign);
|
||||
sign, (gen_sign == NULL) ? "NULL" : gen_sign);
|
||||
|
||||
NSK_DISPLAY0("Deallocating the signature array\n");
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) sign))) {
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
if (gen_sign!=NULL)
|
||||
if (gen_sign != NULL)
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) gen_sign))) {
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
|
@ -101,29 +101,29 @@ static int checkSig(JNIEnv *jni_env, jclass testedCls,
|
||||
name);
|
||||
|
||||
if (strcmp(fld_sig[idx][2], sign) != 0 ||
|
||||
strcmp(fld_sig[idx][3], (gen_sign==NULL)?"NULL":gen_sign) != 0) {
|
||||
strcmp(fld_sig[idx][3], (gen_sign == NULL) ? "NULL" : gen_sign) != 0) {
|
||||
NSK_COMPLAIN6(
|
||||
"TEST FAILED: %s field \"%s\" has\n"
|
||||
"\tsignature: \"%s\"\n"
|
||||
"\tgeneric signature: \"%s\"\n\n"
|
||||
"\tExpected: \"%s\"\n"
|
||||
"\t\t\"%s\"\n\n",
|
||||
(instance==0)?"instance":"static",
|
||||
(instance == 0) ? "instance" : "static",
|
||||
fld_sig[idx][0],
|
||||
sign, (gen_sign==NULL)?"NULL":gen_sign,
|
||||
sign, (gen_sign == NULL) ? "NULL" : gen_sign,
|
||||
fld_sig[idx][2], fld_sig[idx][3]);
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
else
|
||||
NSK_DISPLAY2("CHECK PASSED: signature: \"%s\",\n\tgeneric signature: \"%s\"\n",
|
||||
sign, (gen_sign==NULL)?"NULL":gen_sign);
|
||||
sign, (gen_sign == NULL) ? "NULL" : gen_sign);
|
||||
|
||||
NSK_DISPLAY0("Deallocating name & signature arrays\n");
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) name)))
|
||||
totRes = STATUS_FAILED;
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) sign)))
|
||||
totRes = STATUS_FAILED;
|
||||
if (gen_sign!=NULL)
|
||||
if (gen_sign != NULL)
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) gen_sign)))
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
@ -142,9 +142,9 @@ Java_nsk_jvmti_GetFieldName_getfldnm005_check(
|
||||
instance = strcmp(fld_sig[i][1], "instance");
|
||||
|
||||
NSK_DISPLAY2(">>> Finding %s field: %s ...\n",
|
||||
(instance==0)?"instance":"static",
|
||||
(instance == 0) ? "instance" : "static",
|
||||
fld_sig[i][0]);
|
||||
if (instance==0) {
|
||||
if (instance == 0) {
|
||||
if (!NSK_JNI_VERIFY(jni, (testedFld = jni->GetFieldID(objCls, fld_sig[i][0], fld_sig[i][2])) != NULL)) {
|
||||
NSK_COMPLAIN1("TEST FAILERE: unable to get field ID for \"%s\"\n\n",
|
||||
fld_sig[i][0]);
|
||||
|
@ -140,14 +140,14 @@ static void checkRedir(JNIEnv *env, int exCalls) {
|
||||
if (redir_calls == exCalls) {
|
||||
if (verbose)
|
||||
printf("\nCHECK PASSED: the %s JNI function table is returned by GetJNIFunctionTable():\n\t%d interception of GetVersion() calls as expected\n",
|
||||
(exCalls==0)?"original":"modified",
|
||||
(exCalls == 0) ? "original" : "modified",
|
||||
redir_calls);
|
||||
}
|
||||
else {
|
||||
result = STATUS_FAILED;
|
||||
printf("\nTEST FAILED: the %s JNI function table is returned by GetJNIFunctionTable() instead of the %s one:\n\t%d interception of GetVersion() calls instead of %d as expected\n",
|
||||
(exCalls==0)?"modified":"original",
|
||||
(exCalls==0)?"original":"modified",
|
||||
(exCalls == 0) ? "modified" : "original",
|
||||
(exCalls == 0) ? "original" : "modified",
|
||||
redir_calls, exCalls);
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ Java_nsk_jvmti_GetLineNumberTable_linetab003_check(JNIEnv *env, jclass cls) {
|
||||
printf("Error expected: JVMTI_ERROR_ABSENT_INFORMATION,\n");
|
||||
printf("\tactual: %s (%d)\n", TranslateError(err), err);
|
||||
printf(" meth() line number table (%d entries):%s\n",
|
||||
entryCount, (entryCount==0 ? " empty" : ""));
|
||||
entryCount, (entryCount == 0 ? " empty" : ""));
|
||||
for (i = 0; i < entryCount; i++) {
|
||||
printf(" start_location = 0x%x%08x,",
|
||||
(jint)(table[i].start_location >> 32),
|
||||
|
@ -121,7 +121,7 @@ Java_nsk_jvmti_GetLocalVariableTable_localtab003_check(JNIEnv *env, jclass cls)
|
||||
printf("Error expected: JVMTI_ERROR_ABSENT_INFORMATION,\n");
|
||||
printf("\tactual: %s (%d)\n", TranslateError(err), err);
|
||||
printf(" meth() local variable table (%d entries):%s\n",
|
||||
entryCount, (entryCount==0 ? " empty" : ""));
|
||||
entryCount, (entryCount == 0 ? " empty" : ""));
|
||||
for (i = 0; i < entryCount; i++) {
|
||||
printf(" name=\"%s\", sig=\"%s\"",
|
||||
table[i].name, table[i].signature);
|
||||
|
@ -104,7 +104,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
methInfo[i].mid = jni_env->GetStaticMethodID(testedCls, methInfo[i].m_name, methInfo[i].m_sign);
|
||||
if (methInfo[i].mid == NULL) {
|
||||
NSK_COMPLAIN3("TEST FAILURE: unable to get the method ID for the %s method \"%s\", signature \"%s\"\n\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
}
|
||||
@ -112,7 +112,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
/* get the LocalVariableTable attribute */
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->GetLocalVariableTable(methInfo[i].mid, &count, &lv_table))) {
|
||||
NSK_COMPLAIN3("TEST FAILED: unable to get local variable table\n\tfor the %s method \"%s\", signature \"%s\"\n\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
} else {
|
||||
@ -121,7 +121,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
NSK_COMPLAIN5(
|
||||
"TEST FAILED: %s method \"%s\", signature \"%s\": found %d vars in the LocalVariableTable, expected %d\n"
|
||||
"\tHere are the found vars:\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign,
|
||||
count, methInfo[i].vcount);
|
||||
for (j=0; j<count; j++)
|
||||
@ -135,7 +135,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
NSK_DISPLAY4(
|
||||
"Checking vars in the LocalVariableTable of the %s method \"%s\", signature \"%s\" ...\n"
|
||||
"\tfound %d local vars as expected\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign, count);
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
NSK_COMPLAIN6(
|
||||
"TEST FAILED: %s method: \"%s\", signature: \"%s\": var \"%s\" "
|
||||
"has signature \"%s\" in the LocalVariableTable, expected \"%s\"\n\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign,
|
||||
lv_table[j].name, lv_table[j].signature,
|
||||
methInfo[i].vars[k].v_sign);
|
||||
|
@ -112,7 +112,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
methInfo[i].mid = jni_env->GetStaticMethodID(testedCls, methInfo[i].m_name, methInfo[i].m_sign);
|
||||
if (methInfo[i].mid == NULL) {
|
||||
NSK_COMPLAIN3("TEST FAILURE: unable to get the method ID for the %s method \"%s\", signature \"%s\"\n\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
}
|
||||
@ -120,24 +120,24 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
/* get the LocalVariableTable attribute */
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->GetLocalVariableTable(methInfo[i].mid, &count, &lv_table))) {
|
||||
NSK_COMPLAIN3("TEST FAILED: unable to get local variable table\n\tfor the %s method \"%s\", signature \"%s\"\n\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
} else {
|
||||
if (count != methInfo[i].vcount) {
|
||||
totRes = STATUS_FAILED;
|
||||
NSK_COMPLAIN5(
|
||||
"TEST FAILED: %s method \"%s\", signature \"%s\":"
|
||||
"TEST FAILED: %s method \"%s\", signature \"%s\" : "
|
||||
"found %d vars in the LocalVariableTable, expected %d\n"
|
||||
"\tHere are the found vars:\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign,
|
||||
count, methInfo[i].vcount);
|
||||
for (j=0; j<count; j++)
|
||||
NSK_COMPLAIN4("\t%d) name: \"%s\"\n\tsignature: \"%s\"\n\tgeneric signature: \"%s\"\n",
|
||||
j+1, lv_table[j].name,
|
||||
lv_table[j].signature,
|
||||
(lv_table[j].generic_signature==NULL)?"NULL":lv_table[j].generic_signature);
|
||||
(lv_table[j].generic_signature == NULL) ? "NULL" : lv_table[j].generic_signature);
|
||||
NSK_COMPLAIN0("\n");
|
||||
|
||||
continue;
|
||||
@ -147,7 +147,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
">>> Checking vars in the LocalVariableTable of the %s method \"%s\","
|
||||
"signature \"%s\" ...\n"
|
||||
"\t%d local vars as expected\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign, count);
|
||||
}
|
||||
|
||||
@ -155,19 +155,19 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
for (k=0; k<count; k++) {
|
||||
if (strcmp(lv_table[j].name, methInfo[i].vars[k].v_name) == 0) {
|
||||
if ((strcmp(lv_table[j].signature, methInfo[i].vars[k].v_sign) != 0) ||
|
||||
(strcmp((lv_table[j].generic_signature==NULL)?"NULL":lv_table[j].generic_signature,
|
||||
(strcmp((lv_table[j].generic_signature == NULL) ? "NULL" : lv_table[j].generic_signature,
|
||||
methInfo[i].vars[k].v_gen_sign) != 0)) {
|
||||
NSK_COMPLAIN8(
|
||||
"TEST FAILED: %s method: \"%s\" \"%s\":\n"
|
||||
"\tvar \"%s\" has signature \"%s\",\n"
|
||||
"\tgeneric signature \"%s\"\n\n"
|
||||
"\tExpected: \"%s\"\n\t\t\"%s\"\n\n",
|
||||
methInfo[i].inst?"instance":"static",
|
||||
methInfo[i].inst ? "instance" : "static",
|
||||
methInfo[i].m_name, methInfo[i].m_sign,
|
||||
lv_table[j].name, lv_table[j].signature,
|
||||
(lv_table[j].generic_signature==NULL)?"NULL":lv_table[j].generic_signature,
|
||||
(lv_table[j].generic_signature == NULL) ? "NULL" : lv_table[j].generic_signature,
|
||||
methInfo[i].vars[k].v_sign,
|
||||
(methInfo[i].vars[k].v_gen_sign==NULL)?"NULL":methInfo[i].vars[k].v_gen_sign);
|
||||
(methInfo[i].vars[k].v_gen_sign == NULL) ? "NULL" : methInfo[i].vars[k].v_gen_sign);
|
||||
totRes = STATUS_FAILED;
|
||||
break;
|
||||
}
|
||||
@ -175,7 +175,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) {
|
||||
NSK_DISPLAY3("CHECK PASSED: var: \"%s\",\n\tsignature: \"%s\",\n\tgeneric signature: \"%s\"\n",
|
||||
lv_table[j].name,
|
||||
lv_table[j].signature,
|
||||
(lv_table[j].generic_signature==NULL)?"NULL":lv_table[j].generic_signature);
|
||||
(lv_table[j].generic_signature == NULL) ? "NULL" : lv_table[j].generic_signature);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,17 +98,17 @@ static int checkSig(JNIEnv *jni_env, jmethodID testedMeth,
|
||||
meth_sig[clsIdx][methIdx][0]);
|
||||
|
||||
if (strcmp(meth_sig[clsIdx][methIdx][2], sign) != 0 ||
|
||||
strcmp(meth_sig[clsIdx][methIdx][3], (gen_sign==NULL)?"NULL":gen_sign) != 0) {
|
||||
strcmp(meth_sig[clsIdx][methIdx][3], (gen_sign == NULL) ? "NULL" : gen_sign) != 0) {
|
||||
NSK_COMPLAIN5("TEST FAILED: class: \"%s\" \
|
||||
has\n\tsignature: \"%s\"\n\tgeneric signature: \"%s\"\n\n\tExpected: \"%s\"\n\t\t\"%s\"\n\n",
|
||||
meth_sig[clsIdx][methIdx][0],
|
||||
sign, (gen_sign==NULL)?"NULL":gen_sign,
|
||||
sign, (gen_sign == NULL) ? "NULL" : gen_sign,
|
||||
meth_sig[clsIdx][methIdx][2], meth_sig[clsIdx][methIdx][3]);
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
else
|
||||
NSK_DISPLAY2("CHECK PASSED: signature: \"%s\",\n\tgeneric signature: \"%s\"\n",
|
||||
sign, (gen_sign==NULL)?"NULL":gen_sign);
|
||||
sign, (gen_sign == NULL) ? "NULL" : gen_sign);
|
||||
|
||||
NSK_DISPLAY0("Deallocating name & signature arrays\n");
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) name))) {
|
||||
@ -117,7 +117,7 @@ has\n\tsignature: \"%s\"\n\tgeneric signature: \"%s\"\n\n\tExpected: \"%s\"\n\t\
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) sign))) {
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
if (gen_sign!=NULL)
|
||||
if (gen_sign != NULL)
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) gen_sign))) {
|
||||
totRes = STATUS_FAILED;
|
||||
}
|
||||
@ -137,9 +137,9 @@ Java_nsk_jvmti_GetMethodName_methname003_check(
|
||||
instance = strcmp(meth_sig[clsIdx][i][1], "instance");
|
||||
|
||||
NSK_DISPLAY2(">>> Finding %s method: %s ...\n",
|
||||
(instance==0)?"instance":"static",
|
||||
(instance == 0) ? "instance" : "static",
|
||||
meth_sig[clsIdx][i][0]);
|
||||
if (instance==0) {
|
||||
if (instance == 0) {
|
||||
if (!NSK_JNI_VERIFY(jni, (testedMeth = jni->GetMethodID(objCls, meth_sig[clsIdx][i][0], meth_sig[clsIdx][i][2])) != NULL)) {
|
||||
NSK_COMPLAIN2("TEST FAILERE: unable to get method ID for \"%s\" \"%s\"\n\n",
|
||||
meth_sig[clsIdx][i][0], meth_sig[clsIdx][i][2]);
|
||||
|
@ -102,7 +102,7 @@ Java_nsk_jvmti_GetTopThreadGroups_topthrgrp001_check(JNIEnv *env, jclass cls) {
|
||||
printf(">>> parent: 0x%p\n", inf.parent);
|
||||
printf(">>> max priority: %d\n", inf.max_priority);
|
||||
printf(">>> is daemon: %s\n",
|
||||
(inf.is_daemon==JNI_TRUE) ? "true" : "false");
|
||||
(inf.is_daemon == JNI_TRUE) ? "true" : "false");
|
||||
}
|
||||
if (inf.parent != NULL) {
|
||||
printf("ERROR: thread group is not parentless!\n");
|
||||
|
@ -127,7 +127,7 @@ jboolean is_primitive_type(const char *signature) {
|
||||
int get_tag_type(const char *signature) {
|
||||
if (is_primitive_type(signature)) {
|
||||
return TAG_TYPE_PRIMITIVE;
|
||||
} else if (signature[0]=='[' && is_primitive_type(signature+1)) {
|
||||
} else if (signature[0] == '[' && is_primitive_type(signature+1)) {
|
||||
return TAG_TYPE_ARRAY;
|
||||
} else if (!strcmp(signature, "Ljava/lang/String;")) {
|
||||
return TAG_TYPE_STRING;
|
||||
@ -143,21 +143,21 @@ int get_tag_type(const char *signature) {
|
||||
jboolean verify_value(jvalue value, jvmtiPrimitiveType type) {
|
||||
switch (type) {
|
||||
case JVMTI_PRIMITIVE_TYPE_BOOLEAN:
|
||||
return value.z==BOOLEAN;
|
||||
return value.z == BOOLEAN;
|
||||
case JVMTI_PRIMITIVE_TYPE_BYTE:
|
||||
return value.b==BYTE;
|
||||
return value.b == BYTE;
|
||||
case JVMTI_PRIMITIVE_TYPE_CHAR:
|
||||
return value.c==CHAR;
|
||||
return value.c == CHAR;
|
||||
case JVMTI_PRIMITIVE_TYPE_SHORT:
|
||||
return value.s==SHORT;
|
||||
return value.s == SHORT;
|
||||
case JVMTI_PRIMITIVE_TYPE_INT:
|
||||
return value.i==INT;
|
||||
return value.i == INT;
|
||||
case JVMTI_PRIMITIVE_TYPE_LONG:
|
||||
return value.j==LONG;
|
||||
return value.j == LONG;
|
||||
case JVMTI_PRIMITIVE_TYPE_FLOAT:
|
||||
return value.f==FLOAT;
|
||||
return value.f == FLOAT;
|
||||
case JVMTI_PRIMITIVE_TYPE_DOUBLE:
|
||||
return value.d==DOUBLE;
|
||||
return value.d == DOUBLE;
|
||||
default:
|
||||
NSK_COMPLAIN1("Unknown type: %X.",type);
|
||||
return JNI_FALSE;
|
||||
@ -245,7 +245,7 @@ jint JNICALL string_callback(jlong class_tag,
|
||||
int i;
|
||||
|
||||
//skip all untegged strings
|
||||
if (*tag_ptr==0) {
|
||||
if (*tag_ptr == 0) {
|
||||
return 0;
|
||||
} else if (DECODE_TYPE(*tag_ptr) != TAG_TYPE_STRING) {
|
||||
NSK_COMPLAIN2("jvmtiStringPrimitiveValueCallback was invoked for an object "
|
||||
@ -341,7 +341,7 @@ jint JNICALL heap_callback(jlong class_tag,
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
object_free_callback(jvmtiEnv* jvmti, jlong tag) {
|
||||
if (DECODE_TYPE(tag)==TAG_TYPE_PRIMITIVE) {
|
||||
if (DECODE_TYPE(tag) == TAG_TYPE_PRIMITIVE) {
|
||||
int object = DECODE_OBJECT(tag);
|
||||
objects_info[object].collected = 1;
|
||||
NSK_DISPLAY1("Object %s collected.\n",
|
||||
@ -523,7 +523,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
|
||||
}
|
||||
|
||||
NSK_DISPLAY0("Tagging fields.\n");
|
||||
if (!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
|
||||
if (!NSK_VERIFY(JNI_OK == tag_objects(jvmti, jni))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
|
||||
}
|
||||
|
||||
NSK_DISPLAY0("Tagging fields.\n");
|
||||
if (!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
|
||||
if (!NSK_VERIFY(JNI_OK == tag_objects(jvmti, jni))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ jint JNICALL array_callback(jlong class_tag,
|
||||
int matched = 1;
|
||||
int i;
|
||||
for (i = 0; i < element_count && matched; i++) {
|
||||
matched = ((jint*)objects_info[object].fields[field].value)[i]==
|
||||
matched = ((jint*)objects_info[object].fields[field].value)[i] ==
|
||||
((jint*)elements)[i];
|
||||
}
|
||||
if (matched)
|
||||
@ -268,22 +268,18 @@ void set_expected_value(field_info_t *field, int tagged, int is_static) {
|
||||
if (field->primitive) {
|
||||
field->size = (int) sizeof(jint);
|
||||
if (is_static) {
|
||||
field->value = (void*)(tagged ? &TAGGED_STATIC_INT_VALUE:
|
||||
&UNTAGGED_STATIC_INT_VALUE);
|
||||
field->value = (void*)(tagged ? &TAGGED_STATIC_INT_VALUE : &UNTAGGED_STATIC_INT_VALUE);
|
||||
} else {
|
||||
field->value = (void*)(tagged ? &TAGGED_INT_VALUE:
|
||||
&UNTAGGED_INT_VALUE);
|
||||
field->value = (void*)(tagged ? &TAGGED_INT_VALUE : &UNTAGGED_INT_VALUE);
|
||||
}
|
||||
field->type = TYPE_FIELD;
|
||||
} else if (0==strcmp(field->signature,STRING_SIGNATURE)) {
|
||||
field->value = (void*)(tagged ? TAGGED_STRING_VALUE:
|
||||
UNTAGGED_STRING_VALUE);
|
||||
} else if (0 == strcmp(field->signature,STRING_SIGNATURE)) {
|
||||
field->value = (void*)(tagged ? TAGGED_STRING_VALUE : UNTAGGED_STRING_VALUE);
|
||||
field->size = (int) wcslen((wchar_t*)field->value);
|
||||
field->type = TYPE_STRING;
|
||||
} else if (0==strcmp(field->signature,INT_ARRAY_SIGNATURE)) {
|
||||
} else if (0 == strcmp(field->signature,INT_ARRAY_SIGNATURE)) {
|
||||
field->size = INT_ARRAY_LENGTH;
|
||||
field->value = (void*)(tagged ? TAGGED_INT_ARRAY_VALUE:
|
||||
UNTAGGED_INT_ARRAY_VALUE);
|
||||
field->value = (void*)(tagged ? TAGGED_INT_ARRAY_VALUE : UNTAGGED_INT_ARRAY_VALUE);
|
||||
field->type = TYPE_ARRAY;
|
||||
}
|
||||
}
|
||||
@ -427,7 +423,7 @@ void release_object_info(jvmtiEnv *jvmti, JNIEnv *jni) {
|
||||
void verify_objects(int reachable) {
|
||||
int object;
|
||||
int field;
|
||||
for (object = 0; object < (reachable?TEST_OBJECTS_COUNT:TAGGED_OBJECTS); object++) {
|
||||
for (object = 0; object < (reachable ? TEST_OBJECTS_COUNT : TAGGED_OBJECTS); object++) {
|
||||
for (field = 0; field < objects_info[object].fields_count; field++) {
|
||||
// If primitive field of object that was not collected or
|
||||
// non primitive field that was not collected was not found
|
||||
@ -468,7 +464,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
|
||||
}
|
||||
|
||||
NSK_DISPLAY0("Tagging fields.\n");
|
||||
if (!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
|
||||
if (!NSK_VERIFY(JNI_OK == tag_objects(jvmti, jni))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -82,10 +82,10 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
|
||||
NSK_DISPLAY2("NativeMethodBind received for \"%s %s\"\n",
|
||||
methNam, methSig);
|
||||
|
||||
if (!(methNam==NULL))
|
||||
if (methNam != NULL)
|
||||
if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methNam)))
|
||||
NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method name\n\n");
|
||||
if (!(methSig==NULL))
|
||||
if (methSig != NULL)
|
||||
if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methSig)))
|
||||
NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method signature\n\n");
|
||||
|
||||
|
@ -287,7 +287,7 @@ void nativeMeth2(JNIEnv *env, jobject obj, jint vrb,
|
||||
tot_result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (vrb ==1) {
|
||||
if (vrb == 1) {
|
||||
printf("nativeMeth2(): calling the Java activeMethod()\n");
|
||||
fflush(stdout);
|
||||
}
|
||||
@ -297,7 +297,7 @@ void nativeMeth2(JNIEnv *env, jobject obj, jint vrb,
|
||||
JNIEXPORT void JNICALL
|
||||
Java_nsk_jvmti_PopFrame_popframe004_nativeMeth(JNIEnv *env, jobject obj, jint vrb,
|
||||
jobject frameThr) {
|
||||
if (vrb ==1) {
|
||||
if (vrb == 1) {
|
||||
printf("nativeMeth(): calling the native nativeMeth2()\n");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ Java_nsk_jvmti_RedefineClasses_redefclass008_setBreakpoints(JNIEnv *env,
|
||||
">>>>>>>> #%d Invoke SetBreakpoint():\n"
|
||||
"\tbreakpoint in the %s method: name=\"%s\"; "
|
||||
"signature=\"%s\"; location=%d\n",
|
||||
i, breakpoints[i].inst?"instance":"static",
|
||||
i, breakpoints[i].inst ? "instance" : "static",
|
||||
breakpoints[i].m_name, breakpoints[i].m_sign, breakpoints[i].loc);
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ Java_nsk_jvmti_RedefineClasses_redefclass008_getResult(JNIEnv *env,
|
||||
"TEST FAILED: Breakpoint #%d in the %s method:\n"
|
||||
"\tname=\"%s\"; signature=\"%s\"; location=%d was not cleared:\n"
|
||||
"\tClearBreakpoint() returned the error %d: %s\n\n",
|
||||
i, breakpoints[i].inst?"instance":"static",
|
||||
i, breakpoints[i].inst ? "instance" : "static",
|
||||
breakpoints[i].m_name, breakpoints[i].m_sign,
|
||||
breakpoints[i].loc, err, TranslateError(err));
|
||||
totRes = STATUS_FAILED;
|
||||
@ -278,7 +278,7 @@ Java_nsk_jvmti_RedefineClasses_redefclass008_getResult(JNIEnv *env,
|
||||
"Check #%d PASSED: Breakpoint in the %s method:\n"
|
||||
"\tname=\"%s\"; signature=\"%s\"; location=%d was cleared:\n"
|
||||
"\tClearBreakpoint() returned the error %d: %s\n\n",
|
||||
i, breakpoints[i].inst?"instance":"static",
|
||||
i, breakpoints[i].inst ? "instance" : "static",
|
||||
breakpoints[i].m_name, breakpoints[i].m_sign,
|
||||
breakpoints[i].loc, err, TranslateError(err));
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[],
|
||||
}
|
||||
if (methodsInfo[i].mid == NULL) {
|
||||
printf("%s: Failed to get the method ID for the%s%s method \"%s\", signature \"%s\"\n",
|
||||
__FILE__, full?" ":" original ", methodsInfo[i].inst?"instance":"static",
|
||||
__FILE__, full ? " " : " original ", methodsInfo[i].inst ? "instance":"static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
}
|
||||
@ -187,7 +187,7 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[],
|
||||
printf("%s: Failed to call GetLocalVariableTable(): error=%d: %s\n",
|
||||
__FILE__, err, TranslateError(err));
|
||||
printf("\tfor the%s%s method \"%s\", signature \"%s\"\n\n",
|
||||
full?" ":" original ", methodsInfo[i].inst?"instance":"static",
|
||||
full ? " " : " original ", methodsInfo[i].inst ? "instance":"static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
} else {
|
||||
@ -195,7 +195,7 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[],
|
||||
printf(
|
||||
"TEST FAILED: %s%s method \"%s\", signature \"%s\": "
|
||||
"found %d vars in the LocalVariableTable, expected %d\n",
|
||||
full?" ":" original ", methodsInfo[i].inst?"instance":"static",
|
||||
full ? " " : " original ", methodsInfo[i].inst ? "instance":"static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign,
|
||||
count, methodsInfo[i].vcount);
|
||||
totRes = STATUS_FAILED;
|
||||
@ -206,7 +206,7 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[],
|
||||
"\nChecking vars in the LocalVariableTable of the %s method \"%s\", "
|
||||
"signature \"%s\" ...\n"
|
||||
"\tfound %d local vars as expected\n",
|
||||
methodsInfo[i].inst?"instance":"static",
|
||||
methodsInfo[i].inst ? "instance" : "static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign, count);
|
||||
|
||||
if (full) {
|
||||
@ -217,7 +217,7 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[],
|
||||
printf(
|
||||
"TEST FAILED: %s method \"%s\", signature \"%s\": var \"%s\" "
|
||||
"has signature \"%s\" in the LocalVariableTable, expected \"%s\"\n",
|
||||
methodsInfo[i].inst?"instance":"static",
|
||||
methodsInfo[i].inst ? "instance" : "static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign,
|
||||
lv_table[j].name, lv_table[j].signature,
|
||||
methodsInfo[i].vars[k].v_sign);
|
||||
|
@ -154,7 +154,8 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[], jint vrb) {
|
||||
}
|
||||
if (methodsInfo[i].mid == NULL) {
|
||||
printf("%s: Failed to get the method ID for the%s%s method \"%s\", signature \"%s\"\n",
|
||||
__FILE__, (vrb==2)?" original ":" ", methodsInfo[i].inst?"instance":"static",
|
||||
__FILE__, (vrb == 2) ? " original " : " ",
|
||||
methodsInfo[i].inst ? "instance" : "static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
}
|
||||
@ -165,15 +166,16 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[], jint vrb) {
|
||||
printf("%s: Failed to call GetLineNumberTable(): error=%d: %s\n",
|
||||
__FILE__, err, TranslateError(err));
|
||||
printf("\tfor the%s%s method \"%s\", signature \"%s\"\n\n",
|
||||
(vrb==2)?" original ":" ", methodsInfo[i].inst?"instance":"static",
|
||||
(vrb == 2) ? " original " : " ",
|
||||
methodsInfo[i].inst ? "instance" : "static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign);
|
||||
return STATUS_FAILED;
|
||||
} else {
|
||||
if (count != methodsInfo[i].lcount) {
|
||||
printf(
|
||||
"TEST %s %s method \"%s\", signature \"%s\": found %d lines in the LineNumberTable, expected %d\n",
|
||||
(vrb==2)?"BUG: original ":"FAILED:",
|
||||
methodsInfo[i].inst?"instance":"static",
|
||||
(vrb == 2) ? "BUG: original " : "FAILED:",
|
||||
methodsInfo[i].inst ? "instance" : "static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign,
|
||||
count, methodsInfo[i].lcount);
|
||||
totRes = STATUS_FAILED;
|
||||
@ -183,7 +185,7 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[], jint vrb) {
|
||||
printf(
|
||||
"\nChecking line numbers in the LineNumberTable of the %s method \"%s\", signature \"%s\" ...\n"
|
||||
"\toverall number of lines: %d as expected\n",
|
||||
methodsInfo[i].inst?"instance":"static",
|
||||
methodsInfo[i].inst ? "instance" : "static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign, count);
|
||||
|
||||
for (j=0; j<count; j++) {
|
||||
@ -196,8 +198,8 @@ int checkAttr(JNIEnv *env, jclass redefCls, methInfo methodsInfo[], jint vrb) {
|
||||
printf(
|
||||
"TEST %s %s method \"%s\", signature \"%s\": "
|
||||
"entry #%d has value %d in the LineNumberTable, expected %d\n",
|
||||
(vrb==2)?"BUG: original":"FAILED:",
|
||||
methodsInfo[i].inst?"instance":"static",
|
||||
(vrb == 2) ? "BUG: original" : "FAILED:",
|
||||
methodsInfo[i].inst ? "instance" : "static",
|
||||
methodsInfo[i].m_name, methodsInfo[i].m_sign,
|
||||
j, ln_table[j].line_number, chkval);
|
||||
totRes = STATUS_FAILED;
|
||||
|
@ -199,15 +199,15 @@ void checkCall(int step, int exMonEntCalls, const char *msg) {
|
||||
if (monent_calls == exMonEntCalls) {
|
||||
if (verbose)
|
||||
printf("\nCHECK PASSED: the %s JNI function MonitorEnter() has been %s inside %s:\n\t%d intercepted call(s) as expected\n",
|
||||
(step==1)?"tested":"original",
|
||||
(step==1)?"redirected":"restored", msg,
|
||||
(step == 1) ? "tested" : "original",
|
||||
(step == 1) ? "redirected" : "restored", msg,
|
||||
monent_calls);
|
||||
}
|
||||
else {
|
||||
result = STATUS_FAILED;
|
||||
printf("\nTEST FAILED: the %s JNI function MonitorEnter() has not been %s inside %s:\n\t%d intercepted call(s) instead of %d as expected\n",
|
||||
(step==1)?"tested":"original",
|
||||
(step==1)?"redirected":"restored", msg,
|
||||
(step == 1) ? "tested" : "original",
|
||||
(step == 1) ? "redirected" : "restored", msg,
|
||||
monent_calls, exMonEntCalls);
|
||||
}
|
||||
}
|
||||
@ -382,10 +382,10 @@ Java_nsk_jvmti_SetJNIFunctionTable_setjniftab001_check(JNIEnv *env, jobject obj)
|
||||
and check the assertion with current thread and new threads */
|
||||
if (verbose)
|
||||
printf("\nc) Checking the restored JNI function table ...\n");
|
||||
doRestore((nextEnv==NULL)? env:nextEnv);
|
||||
doRestore((nextEnv == NULL) ? env : nextEnv);
|
||||
|
||||
zeroCounter();
|
||||
doExec((nextEnv==NULL)? env:nextEnv, 0);
|
||||
doExec((nextEnv == NULL) ? env : nextEnv, 0);
|
||||
checkCall(2, 0, "main thread");
|
||||
|
||||
zeroCounter();
|
||||
|
@ -121,7 +121,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
|
||||
|
||||
printf("INFO: made %d late calls to JVM/TI SuspendThread()\n",
|
||||
late_count);
|
||||
printf("INFO: N_LATE_CALLS==%d value is %slarge enough to cause a "
|
||||
printf("INFO: N_LATE_CALLS == %d value is %slarge enough to cause a "
|
||||
"SuspendThread() call after thread exit.\n", N_LATE_CALLS,
|
||||
(late_count == N_LATE_CALLS) ? "NOT " : "");
|
||||
|
||||
|
@ -335,7 +335,7 @@ static int checkLocalVariableFunctions() {
|
||||
*/
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (strcmp(local_variable_table[i].name, "o") ==0) {
|
||||
if (strcmp(local_variable_table[i].name, "o") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalObject\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalObject(thread, 1, local_variable_table[i].slot, &object_value)))
|
||||
@ -345,7 +345,7 @@ static int checkLocalVariableFunctions() {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalObject(thread, 1, local_variable_table[i].slot, object_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "i") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "i") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalInt\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalInt(thread, 1, local_variable_table[i].slot, &int_value)))
|
||||
@ -355,7 +355,7 @@ static int checkLocalVariableFunctions() {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalInt(thread, 1, local_variable_table[i].slot, int_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "l") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "l") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalLong\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalLong(thread, 1, local_variable_table[i].slot, &long_value)))
|
||||
@ -365,7 +365,7 @@ static int checkLocalVariableFunctions() {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalLong(thread, 1, local_variable_table[i].slot, long_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "f") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "f") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalFloat\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalFloat(thread, 1, local_variable_table[i].slot, &float_value)))
|
||||
@ -375,7 +375,7 @@ static int checkLocalVariableFunctions() {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalFloat(thread, 1, local_variable_table[i].slot, float_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "d") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "d") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalDouble\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalDouble(thread, 1, local_variable_table[i].slot, &double_value)))
|
||||
|
@ -556,7 +556,7 @@ static int checkLocalVariableFunctions(jvmtiEnv* jvmti) {
|
||||
return NSK_FALSE;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (strcmp(local_variable_table[i].name, "o") ==0) {
|
||||
if (strcmp(local_variable_table[i].name, "o") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalObject\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalObject(thread, 1, local_variable_table[i].slot, &object_value)))
|
||||
@ -566,7 +566,7 @@ static int checkLocalVariableFunctions(jvmtiEnv* jvmti) {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalObject(thread, 1, local_variable_table[i].slot, object_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "i") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "i") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalInt\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalInt(thread, 1, local_variable_table[i].slot, &int_value)))
|
||||
@ -576,7 +576,7 @@ static int checkLocalVariableFunctions(jvmtiEnv* jvmti) {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalInt(thread, 1, local_variable_table[i].slot, int_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "l") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "l") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalLong\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalLong(thread, 1, local_variable_table[i].slot, &long_value)))
|
||||
@ -586,7 +586,7 @@ static int checkLocalVariableFunctions(jvmtiEnv* jvmti) {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalLong(thread, 1, local_variable_table[i].slot, long_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "f") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "f") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalFloat\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalFloat(thread, 1, local_variable_table[i].slot, &float_value)))
|
||||
@ -596,7 +596,7 @@ static int checkLocalVariableFunctions(jvmtiEnv* jvmti) {
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->SetLocalFloat(thread, 1, local_variable_table[i].slot, float_value)))
|
||||
return NSK_FALSE;
|
||||
} else if (strcmp(local_variable_table[i].name, "d") ==0) {
|
||||
} else if (strcmp(local_variable_table[i].name, "d") == 0) {
|
||||
NSK_DISPLAY0("Checking positive: GetLocalDouble\n");
|
||||
if (!NSK_JVMTI_VERIFY(
|
||||
jvmti->GetLocalDouble(thread, 1, local_variable_table[i].slot, &double_value)))
|
||||
|
@ -122,7 +122,7 @@ MonitorWaited(jvmtiEnv *jvmti, JNIEnv* jni,
|
||||
waitedEventsCount++;
|
||||
NSK_DISPLAY0("MonitorWaited event:\n");
|
||||
NSK_DISPLAY3("\tthread: %p, object: %p, timed_out: %s\n",
|
||||
thr, obj, (timed_out==JNI_TRUE) ? "true" : "false");
|
||||
thr, obj, (timed_out == JNI_TRUE) ? "true" : "false");
|
||||
NSK_DISPLAY1("\tGetTime: %s\n",
|
||||
jlong_to_string(waitedTime, buffer));
|
||||
NSK_DISPLAY1("\tthread CPU time: %s\n",
|
||||
|
@ -96,7 +96,7 @@ cbDynamicCodeGenerated2(jvmtiEnv *jvmti_env, const char *name,
|
||||
rec->sign = 1;
|
||||
NSK_DISPLAY3("checked: 0x%p %7d %s\n", rec->address, rec->length,
|
||||
rec->name);
|
||||
if (strncmp(rec->name, name, compLength)!=0) {
|
||||
if (strncmp(rec->name, name, compLength) != 0) {
|
||||
NSK_DISPLAY2("\t<%s> was renamed to <%s>\n", rec->name, name);
|
||||
}
|
||||
return;
|
||||
|
@ -75,7 +75,7 @@ handler(jvmtiEvent event, jvmtiEnv* jvmti, JNIEnv* jni_env,
|
||||
|
||||
className = jni_env->GetStringUTFChars(jclassName, 0);
|
||||
|
||||
if (className != NULL && (strcmp(className, EXPECTED_CLASS_NAME)==0)) {
|
||||
if (className != NULL && (strcmp(className, EXPECTED_CLASS_NAME) == 0)) {
|
||||
|
||||
if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
|
||||
nsk_jvmti_setFailStatus();
|
||||
|
@ -75,7 +75,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jvmtiEnv * jvmti;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -169,14 +169,14 @@ static void doChecks(jvmtiEnv *jvmti_env,
|
||||
(methBytesCount != redefMethBytesCount && isObsolete == JNI_FALSE)) {
|
||||
NSK_DISPLAY3("[%s] CHECK PASSED: IsMethodObsolete = %d(%s) as expected\n",
|
||||
event, (int)isObsolete,
|
||||
(isObsolete==JNI_TRUE)?"TRUE":"FALSE");
|
||||
(isObsolete == JNI_TRUE) ? "TRUE" : "FALSE");
|
||||
}
|
||||
else {
|
||||
nsk_jvmti_setFailStatus();
|
||||
NSK_COMPLAIN4("[%s] TEST FAILED: IsMethodObsolete = %d(%s), expected: %s\n",
|
||||
event, (int)isObsolete,
|
||||
(isObsolete == JNI_TRUE)?"TRUE":"FALSE",
|
||||
(methBytesCount == redefMethBytesCount)?"TRUE":"FALSE");
|
||||
(isObsolete == JNI_TRUE) ? "TRUE" : "FALSE",
|
||||
(methBytesCount == redefMethBytesCount) ? "TRUE" : "FALSE");
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ void JNICALL MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
jthread thr, jmethodID method) {
|
||||
|
||||
if (expectedMeth(jvmti_env, "MethodEntry",
|
||||
method, expHSMethod, expHSSignature)==1) {
|
||||
method, expHSMethod, expHSSignature) == 1) {
|
||||
if (!NSK_JVMTI_VERIFY(jvmti_env->GetBytecodes(method, &redefMethBytesCount, &redefMethBytes)))
|
||||
nsk_jvmti_setFailStatus();
|
||||
else {
|
||||
@ -207,7 +207,7 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr,
|
||||
jmethodID catch_method, jlocation catch_location) {
|
||||
|
||||
if (expectedMeth(jvmti_env, "Exception",
|
||||
method, expHSMethod, expHSSignature)==1) {
|
||||
method, expHSMethod, expHSSignature) == 1) {
|
||||
NSK_DISPLAY1("[Exception] thread=0x%p\n", thr);
|
||||
|
||||
doHotSwap(jvmti_env, method, "Exception");
|
||||
@ -221,7 +221,7 @@ MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
jboolean was_poped_by_exc, jvalue return_value) {
|
||||
|
||||
if (expectedMeth(jvmti_env, "MethodExit",
|
||||
method, expHSMethod, expHSSignature)==1) {
|
||||
method, expHSMethod, expHSSignature) == 1) {
|
||||
NSK_DISPLAY1("[MethodExit] thread=0x%p\n", thr);
|
||||
|
||||
doHotSwap(jvmti_env, method, "MethodExit");
|
||||
@ -233,7 +233,7 @@ void JNICALL
|
||||
FramePop(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
jthread thr, jmethodID method, jboolean wasPopedByException) {
|
||||
if (expectedMeth(jvmti_env, "FramePop",
|
||||
method, expHSMethod, expHSSignature)==1) {
|
||||
method, expHSMethod, expHSSignature) == 1) {
|
||||
NSK_DISPLAY1("[FramePop] thread=0x%p\n", thr);
|
||||
|
||||
doHotSwap(jvmti_env, method, "FramePop");
|
||||
|
@ -74,7 +74,7 @@ void JNICALL callbackMethodExit(jvmtiEnv *jvmti_env,
|
||||
nsk_printf(" Agent:: redefine class success ..\n");
|
||||
nsk_printf("Agent::SUSPENDING>> \n");
|
||||
err=jvmti_env->SuspendThread(thread);
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
thread_suspend_status = suspended;
|
||||
nsk_printf("Agent:: Thread successfully suspended..\n");
|
||||
} else if (err == JVMTI_ERROR_THREAD_SUSPENDED) {
|
||||
@ -102,7 +102,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
redefineNumber=0;
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -104,7 +104,7 @@ void JNICALL callbackSingleStep(jvmtiEnv *jvmti, JNIEnv* jni,
|
||||
}
|
||||
nsk_printf(" End of REDEFINE CLASS LOADER \n");
|
||||
err=jvmti->SuspendThread(thread);
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
nsk_printf("Agent:: Succeded in suspending..\n");
|
||||
} else {
|
||||
nsk_printf(" ## Error occured %s \n",TranslateError(err));
|
||||
@ -139,7 +139,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jint rc ;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -105,7 +105,7 @@ void JNICALL callbackSingleStep(jvmtiEnv *jvmti,
|
||||
return;
|
||||
}
|
||||
err=jvmti->SuspendThread(thread);
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
nsk_printf("Agent:: Succeded in suspending..\n");
|
||||
} else {
|
||||
nsk_printf(" ## Error occured %s \n",TranslateError(err));
|
||||
@ -140,7 +140,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jint rc ;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -64,7 +64,7 @@ callbackClassLoad(jvmtiEnv *jvmti_env,
|
||||
jclass klass) {
|
||||
char * name;
|
||||
name = getClassName(jvmti_env,klass);
|
||||
if ((strcmp(name,CLASS_NAME) == 0) && (redefineNumber== 1)) {
|
||||
if ((strcmp(name,CLASS_NAME) == 0) && (redefineNumber == 1)) {
|
||||
char fileName[512];
|
||||
nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName,
|
||||
sizeof(fileName)/sizeof(char));
|
||||
@ -89,7 +89,7 @@ callbackClassPrepare(jvmtiEnv *jvmti_env,
|
||||
jclass klass) {
|
||||
char * name;
|
||||
name = getClassName(jvmti_env, klass);
|
||||
if ((strcmp(name, CLASS_NAME) ==0) && (redefineNumber == 0)) {
|
||||
if ((strcmp(name, CLASS_NAME) == 0) && (redefineNumber == 0)) {
|
||||
char fileName[512];
|
||||
nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName,
|
||||
sizeof(fileName)/sizeof(char));
|
||||
@ -118,7 +118,7 @@ callbackClassFileLoadHock(jvmtiEnv *jvmti_env,
|
||||
const unsigned char* class_data,
|
||||
jint* new_class_data_len,
|
||||
unsigned char** new_class_data) {
|
||||
if (name != NULL && strcmp(name, NAME)==0 && (redefineNumber == 1)) {
|
||||
if (name != NULL && strcmp(name, NAME) == 0 && (redefineNumber == 1)) {
|
||||
NSK_DISPLAY1(">>>>>>callbackClassFileLoadHock ... Name=%s... >>\n",name);
|
||||
/*redefineClass(jvmti_env, myTestClass);*/
|
||||
}
|
||||
@ -175,7 +175,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jint rc ;
|
||||
NSK_DISPLAY0(" VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
NSK_COMPLAIN0(" Could not load JVMTI interface \n");
|
||||
} else {
|
||||
/* Open simple block for better memor usage. */
|
||||
|
@ -77,7 +77,7 @@ callbackClassPrepare(jvmtiEnv *jvmti,
|
||||
err= jvmti->SetBreakpoint(method, start+1);
|
||||
if (err == JVMTI_ERROR_DUPLICATE) {
|
||||
printf("Agent::JVMTI_ERROR_DUPLICATE");
|
||||
} else if (err ==JVMTI_ERROR_INVALID_METHODID) {
|
||||
} else if (err == JVMTI_ERROR_INVALID_METHODID) {
|
||||
printf("Agent::JVMTI_ERROR_INVALID_METHODID ");
|
||||
} else if (err == JVMTI_ERROR_INVALID_LOCATION) {
|
||||
printf("Agent::JVMTI_ERROR_INVALID_LOCATION ");
|
||||
@ -128,7 +128,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jint rc ;
|
||||
printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -104,7 +104,7 @@ void JNICALL callbackBreakpoint(jvmtiEnv *jvmti_env,
|
||||
}
|
||||
nsk_printf(" End of REDEFINE CLASS LOADER \n");
|
||||
err=jvmti->SuspendThread(thread);
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
nsk_printf("Agent:: Succeded in suspending..\n");
|
||||
} else if (err == JVMTI_ERROR_THREAD_SUSPENDED) {
|
||||
nsk_printf("Agent:: JVMTI_ERROR_THREAD_SUSPENDED \n");
|
||||
@ -133,7 +133,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jint rc ;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -47,7 +47,7 @@ void JNICALL callbackClassPrepare(jvmtiEnv *jvmti_env,
|
||||
nsk_jvmti_disableNotification(jvmti_env, JVMTI_EVENT_CLASS_PREPARE, NULL);
|
||||
nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName,
|
||||
sizeof(fileName)/sizeof(char));
|
||||
if (nsk_jvmti_redefineClass(jvmti_env, klass, fileName) == NSK_TRUE) {
|
||||
if (nsk_jvmti_redefineClass(jvmti_env, klass, fileName) == NSK_TRUE) {
|
||||
nsk_printf("Agent:: Redefine successful.\n");
|
||||
} else {
|
||||
nsk_printf("Agent:: Redefine failed.\n");
|
||||
|
@ -67,7 +67,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jvmtiEnv * jvmti;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -67,7 +67,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jvmtiEnv * jvmti;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -69,7 +69,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -70,7 +70,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -67,7 +67,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jvmtiEnv * jvmti;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -69,7 +69,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jvmtiEnv * jvmti;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -68,7 +68,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jvmtiEnv * jvmti;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
@ -65,7 +65,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
|
||||
jvmtiEnv * jvmti;
|
||||
nsk_printf("Agent:: VM.. Started..\n");
|
||||
rc=vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1);
|
||||
if (rc!= JNI_OK) {
|
||||
if (rc != JNI_OK) {
|
||||
nsk_printf("Agent:: Could not load JVMTI interface \n");
|
||||
return JNI_ERR;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user