1 /* 2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 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 25 # include "incls/_precompiled.incl" 26 # include "incls/_jvmtiExtensions.cpp.incl" 27 28 // the list of extension functions 29 GrowableArray<jvmtiExtensionFunctionInfo*>* JvmtiExtensions::_ext_functions; 30 31 // the list of extension events 32 GrowableArray<jvmtiExtensionEventInfo*>* JvmtiExtensions::_ext_events; 33 34 35 // extension function 36 static jvmtiError JNICALL IsClassUnloadingEnabled(const jvmtiEnv* env, jboolean* enabled, ...) { 37 if (enabled == NULL) { 38 return JVMTI_ERROR_NULL_POINTER; 39 } 40 *enabled = (jboolean)ClassUnloading; 41 return JVMTI_ERROR_NONE; 42 } 43 44 // register extension functions and events. In this implementation we 45 // have a single extension function (to prove the API) that tests if class 46 // unloading is enabled or disabled. We also have a single extension event | 1 /* 2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 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 25 #include "precompiled.hpp" 26 #include "prims/jvmtiExport.hpp" 27 #include "prims/jvmtiExtensions.hpp" 28 29 // the list of extension functions 30 GrowableArray<jvmtiExtensionFunctionInfo*>* JvmtiExtensions::_ext_functions; 31 32 // the list of extension events 33 GrowableArray<jvmtiExtensionEventInfo*>* JvmtiExtensions::_ext_events; 34 35 36 // extension function 37 static jvmtiError JNICALL IsClassUnloadingEnabled(const jvmtiEnv* env, jboolean* enabled, ...) { 38 if (enabled == NULL) { 39 return JVMTI_ERROR_NULL_POINTER; 40 } 41 *enabled = (jboolean)ClassUnloading; 42 return JVMTI_ERROR_NONE; 43 } 44 45 // register extension functions and events. In this implementation we 46 // have a single extension function (to prove the API) that tests if class 47 // unloading is enabled or disabled. We also have a single extension event |