< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/SingleStep/singlestep002/singlestep002.cpp

Print this page
rev 52185 : 8212148: Remove remaining NSK_CPP_STUBs
Summary: Remove remaining macros
Reviewed-by: amenkov, phh

*** 48,59 **** void JNICALL SingleStep(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, jmethodID method, jlocation location) { jvmtiPhase phase; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, ! jvmti_env, &phase))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to obtain phase of the VM execution during SingleStep callback\n\n"); } else { if (phase != JVMTI_PHASE_LIVE) { --- 48,58 ---- void JNICALL SingleStep(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, jmethodID method, jlocation location) { jvmtiPhase phase; ! if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to obtain phase of the VM execution during SingleStep callback\n\n"); } else { if (phase != JVMTI_PHASE_LIVE) {
*** 103,138 **** return JNI_ERR; /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_single_step_events = 1; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, ! jvmti, &caps))) return JNI_ERR; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, ! jvmti, &caps))) return JNI_ERR; if (!caps.can_generate_single_step_events) NSK_DISPLAY0("Warning: generation of single step events is not implemented\n"); /* set event callback */ NSK_DISPLAY0("setting event callbacks ...\n"); (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.SingleStep = &SingleStep; callbacks.VMDeath = &VMDeath; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, ! jvmti, &callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, ! jvmti, JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, NULL))) return JNI_ERR; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, ! jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); return JNI_OK; } --- 102,132 ---- return JNI_ERR; /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_single_step_events = 1; ! if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; ! if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_single_step_events) NSK_DISPLAY0("Warning: generation of single step events is not implemented\n"); /* set event callback */ NSK_DISPLAY0("setting event callbacks ...\n"); (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.SingleStep = &SingleStep; callbacks.VMDeath = &VMDeath; ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, NULL))) return JNI_ERR; ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); return JNI_OK; }
< prev index next >