< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/forcegc002.cpp

Print this page
rev 51942 : [mq]: refactor

*** 52,63 **** NSK_DISPLAY0("Enable event GarbageCollectionStart\n"); if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) return; NSK_DISPLAY0("Call ForceGarbageCollection()\n"); ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB1(ForceGarbageCollection, jvmti))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY0("Disable event GarbageCollectionStart\n"); --- 52,62 ---- NSK_DISPLAY0("Enable event GarbageCollectionStart\n"); if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) return; NSK_DISPLAY0("Call ForceGarbageCollection()\n"); ! if (!NSK_JVMTI_VERIFY(jvmti->ForceGarbageCollection())) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY0("Disable event GarbageCollectionStart\n");
*** 112,132 **** { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.can_generate_garbage_collection_events = 1; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) return JNI_ERR; } { jvmtiEventCallbacks eventCallbacks; memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.GarbageCollectionStart = callbackGarbageCollectionStart; ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3(SetEventCallbacks, jvmti, ! &eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL))) return JNI_ERR; --- 111,129 ---- { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.can_generate_garbage_collection_events = 1; ! if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; } { jvmtiEventCallbacks eventCallbacks; memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.GarbageCollectionStart = callbackGarbageCollectionStart; ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL))) return JNI_ERR;
< prev index next >