53 _ext_events = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<jvmtiExtensionEventInfo*>(1,true); 54 55 // register our extension function 56 static jvmtiParamInfo func_params[] = { 57 { (char*)"IsClassUnloadingEnabled", JVMTI_KIND_OUT, JVMTI_TYPE_JBOOLEAN, JNI_FALSE } 58 }; 59 static jvmtiExtensionFunctionInfo ext_func = { 60 (jvmtiExtensionFunction)IsClassUnloadingEnabled, 61 (char*)"com.sun.hotspot.functions.IsClassUnloadingEnabled", 62 (char*)"Tell if class unloading is enabled (-noclassgc)", 63 sizeof(func_params)/sizeof(func_params[0]), 64 func_params, 65 0, // no non-universal errors 66 NULL 67 }; 68 _ext_functions->append(&ext_func); 69 70 // register our extension event 71 72 static jvmtiParamInfo event_params[] = { 73 { (char*)"JNI Environment", JVMTI_KIND_IN, JVMTI_TYPE_JNIENV, JNI_FALSE }, 74 { (char*)"Thread", JVMTI_KIND_IN, JVMTI_TYPE_JTHREAD, JNI_FALSE }, 75 { (char*)"Class", JVMTI_KIND_IN, JVMTI_TYPE_JCLASS, JNI_FALSE } 76 }; 77 static jvmtiExtensionEventInfo ext_event = { 78 EXT_EVENT_CLASS_UNLOAD, 79 (char*)"com.sun.hotspot.events.ClassUnload", 80 (char*)"CLASS_UNLOAD event", 81 sizeof(event_params)/sizeof(event_params[0]), 82 event_params 83 }; 84 _ext_events->append(&ext_event); 85 } 86 87 88 // return the list of extension functions 89 90 jvmtiError JvmtiExtensions::get_functions(JvmtiEnv* env, 91 jint* extension_count_ptr, 92 jvmtiExtensionFunctionInfo** extensions) 93 { 94 guarantee(_ext_functions != NULL, "registration not done"); 95 | 53 _ext_events = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<jvmtiExtensionEventInfo*>(1,true); 54 55 // register our extension function 56 static jvmtiParamInfo func_params[] = { 57 { (char*)"IsClassUnloadingEnabled", JVMTI_KIND_OUT, JVMTI_TYPE_JBOOLEAN, JNI_FALSE } 58 }; 59 static jvmtiExtensionFunctionInfo ext_func = { 60 (jvmtiExtensionFunction)IsClassUnloadingEnabled, 61 (char*)"com.sun.hotspot.functions.IsClassUnloadingEnabled", 62 (char*)"Tell if class unloading is enabled (-noclassgc)", 63 sizeof(func_params)/sizeof(func_params[0]), 64 func_params, 65 0, // no non-universal errors 66 NULL 67 }; 68 _ext_functions->append(&ext_func); 69 70 // register our extension event 71 72 static jvmtiParamInfo event_params[] = { 73 { (char*)"JNI Environment", JVMTI_KIND_IN_PTR, JVMTI_TYPE_JNIENV, JNI_FALSE }, 74 { (char*)"Class", JVMTI_KIND_IN_PTR, JVMTI_TYPE_CCHAR, JNI_FALSE } 75 }; 76 static jvmtiExtensionEventInfo ext_event = { 77 EXT_EVENT_CLASS_UNLOAD, 78 (char*)"com.sun.hotspot.events.ClassUnload", 79 (char*)"CLASS_UNLOAD event", 80 sizeof(event_params)/sizeof(event_params[0]), 81 event_params 82 }; 83 _ext_events->append(&ext_event); 84 } 85 86 87 // return the list of extension functions 88 89 jvmtiError JvmtiExtensions::get_functions(JvmtiEnv* env, 90 jint* extension_count_ptr, 91 jvmtiExtensionFunctionInfo** extensions) 92 { 93 guarantee(_ext_functions != NULL, "registration not done"); 94 |