< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetExtensionEventCallback/setextevent001/setextevent001.cpp

Print this page
rev 52200 : [mq]: spaces


  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #include <string.h>
  25 #include "jvmti.h"
  26 #include "agent_common.h"
  27 #include "jni_tools.h"
  28 #include "jvmti_tools.h"
  29 
  30 extern "C" {
  31 
  32 /* ============================================================================= */
  33 
  34 static jlong timeout = 0;
  35 
  36 /* ============================================================================= */
  37 
  38 static void JNICALL
  39 callbackExtensionEvent(jvmtiEnv* jvmti, ... ) {
  40     NSK_DISPLAY0("    event: callbackExtensionEvent\n");
  41 }
  42 
  43 /** Check extension events. */
  44 static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) {
  45     int success = NSK_TRUE;
  46     jint extCount = 0;
  47     jvmtiExtensionEventInfo* extList = NULL;
  48     int i;
  49 
  50     NSK_DISPLAY0("Get extension events list\n");
  51     if (!NSK_JVMTI_VERIFY(jvmti->GetExtensionEvents(&extCount, &extList))) {
  52         return NSK_FALSE;
  53     }
  54     NSK_DISPLAY1("  ... got count: %d\n", (int)extCount);
  55     NSK_DISPLAY1("  ... got list:  0x%p\n", (void*)extList);
  56 
  57     if (extCount <= 0) {
  58         NSK_DISPLAY1("# WARNING: No extension events implemented to check: %d\n", extCount);
  59     } else {




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #include <string.h>
  25 #include "jvmti.h"
  26 #include "agent_common.h"
  27 #include "jni_tools.h"
  28 #include "jvmti_tools.h"
  29 
  30 extern "C" {
  31 
  32 /* ============================================================================= */
  33 
  34 static jlong timeout = 0;
  35 
  36 /* ============================================================================= */
  37 
  38 static void JNICALL
  39 callbackExtensionEvent(jvmtiEnv* jvmti, ...) {
  40     NSK_DISPLAY0("    event: callbackExtensionEvent\n");
  41 }
  42 
  43 /** Check extension events. */
  44 static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) {
  45     int success = NSK_TRUE;
  46     jint extCount = 0;
  47     jvmtiExtensionEventInfo* extList = NULL;
  48     int i;
  49 
  50     NSK_DISPLAY0("Get extension events list\n");
  51     if (!NSK_JVMTI_VERIFY(jvmti->GetExtensionEvents(&extCount, &extList))) {
  52         return NSK_FALSE;
  53     }
  54     NSK_DISPLAY1("  ... got count: %d\n", (int)extCount);
  55     NSK_DISPLAY1("  ... got list:  0x%p\n", (void*)extList);
  56 
  57     if (extCount <= 0) {
  58         NSK_DISPLAY1("# WARNING: No extension events implemented to check: %d\n", extCount);
  59     } else {


< prev index next >