< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006a.cpp
Print this page
rev 52100 : 8212082: Remove the NSK_CPP_STUB macros for remaining vmTestbase/jvmti/[sS]*
Summary:
Reviewed-by:
*** 52,72 ****
char *name = NULL;
char *signature = NULL;
CompiledMethodLoadEventsCount++;
! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
! jvmti_env, method, &name, &signature, NULL))) {
nsk_jvmti_setFailStatus();
return;
}
NSK_DISPLAY3("CompiledMethodLoad event: %s%s (0x%p)\n",
name, signature, code_addr);
if (name != NULL)
! NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
if (signature != NULL)
! NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
}
static void JNICALL
CompiledMethodUnload(jvmtiEnv *jvmti_env, jmethodID method,
const void* code_addr) {
--- 52,71 ----
char *name = NULL;
char *signature = NULL;
CompiledMethodLoadEventsCount++;
! if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
nsk_jvmti_setFailStatus();
return;
}
NSK_DISPLAY3("CompiledMethodLoad event: %s%s (0x%p)\n",
name, signature, code_addr);
if (name != NULL)
! jvmti_env->Deallocate((unsigned char*)name);
if (signature != NULL)
! jvmti_env->Deallocate((unsigned char*)signature);
}
static void JNICALL
CompiledMethodUnload(jvmtiEnv *jvmti_env, jmethodID method,
const void* code_addr) {
*** 80,91 ****
// Check for the case that the class has been unloaded
err = jvmti_env->GetMethodName(method, &name, &sig, NULL);
if (err == JVMTI_ERROR_NONE) {
NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n",
name, sig, code_addr);
! NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
! NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig);
}
}
/* ========================================================================== */
--- 79,90 ----
// Check for the case that the class has been unloaded
err = jvmti_env->GetMethodName(method, &name, &sig, NULL);
if (err == JVMTI_ERROR_NONE) {
NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n",
name, sig, code_addr);
! jvmti_env->Deallocate((unsigned char*)name);
! jvmti_env->Deallocate((unsigned char*)sig);
}
}
/* ========================================================================== */
*** 143,153 ****
if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
return JNI_ERR;
memset(&caps, 0, sizeof(caps));
caps.can_generate_compiled_method_load_events = 1;
! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) {
return JNI_ERR;
}
memset(&callbacks, 0, sizeof(callbacks));
callbacks.CompiledMethodLoad = &CompiledMethodLoad;
--- 142,152 ----
if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
return JNI_ERR;
memset(&caps, 0, sizeof(caps));
caps.can_generate_compiled_method_load_events = 1;
! if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
return JNI_ERR;
}
memset(&callbacks, 0, sizeof(callbacks));
callbacks.CompiledMethodLoad = &CompiledMethodLoad;
< prev index next >