< prev index next >

src/java.instrument/share/native/libinstrument/InstrumentationImplNativeMethods.c

Print this page
rev 12879 : 8136556: Add the ability to perform static builds of MacOSX x64 binaries
Reviewed-by: ihse, bdelsart, gadams, lfoltan, rriggs, hseigel, twisti
   1 /*
   2  * Copyright (c) 2003, 2008, 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  31 #include    "JavaExceptions.h"
  32 #include    "FileSystemSupport.h"   /* For uintptr_t */
  33 #include    "sun_instrument_InstrumentationImpl.h"
  34 
  35 /*
  36  * Copyright 2003 Wily Technology, Inc.
  37  */
  38 
  39 /**
  40  * This module contains the native method implementations to back the
  41  * sun.instrument.InstrumentationImpl class.
  42  * The bridge between Java and native code is built by storing a native
  43  * pointer to the JPLISAgent data structure in a 64 bit scalar field
  44  * in the InstrumentationImpl instance which is passed to each method.
  45  */
  46 
  47 
  48 /*
  49  * Native methods
  50  */





  51 
  52 /*
  53  * Class:     sun_instrument_InstrumentationImpl
  54  * Method:    isModifiableClass0
  55  * Signature: (Ljava/lang/Class;)Z
  56  */
  57 JNIEXPORT jboolean JNICALL
  58 Java_sun_instrument_InstrumentationImpl_isModifiableClass0
  59   (JNIEnv * jnienv, jobject implThis, jlong agent, jclass clazz) {
  60     return isModifiableClass(jnienv, (JPLISAgent*)(intptr_t)agent, clazz);
  61 }
  62 
  63 /*
  64  * Class:     sun_instrument_InstrumentationImpl
  65  * Method:    isRetransformClassesSupported0
  66  * Signature: ()Z
  67  */
  68 JNIEXPORT jboolean JNICALL
  69 Java_sun_instrument_InstrumentationImpl_isRetransformClassesSupported0
  70   (JNIEnv * jnienv, jobject implThis, jlong agent) {


   1 /*
   2  * Copyright (c) 2003, 2015, 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  31 #include    "JavaExceptions.h"
  32 #include    "FileSystemSupport.h"   /* For uintptr_t */
  33 #include    "sun_instrument_InstrumentationImpl.h"
  34 
  35 /*
  36  * Copyright 2003 Wily Technology, Inc.
  37  */
  38 
  39 /**
  40  * This module contains the native method implementations to back the
  41  * sun.instrument.InstrumentationImpl class.
  42  * The bridge between Java and native code is built by storing a native
  43  * pointer to the JPLISAgent data structure in a 64 bit scalar field
  44  * in the InstrumentationImpl instance which is passed to each method.
  45  */
  46 
  47 
  48 /*
  49  * Native methods
  50  */
  51 
  52 /*
  53  * Declare library specific JNI_Onload entry if static build
  54  */
  55 DEF_STATIC_JNI_OnLoad
  56 
  57 /*
  58  * Class:     sun_instrument_InstrumentationImpl
  59  * Method:    isModifiableClass0
  60  * Signature: (Ljava/lang/Class;)Z
  61  */
  62 JNIEXPORT jboolean JNICALL
  63 Java_sun_instrument_InstrumentationImpl_isModifiableClass0
  64   (JNIEnv * jnienv, jobject implThis, jlong agent, jclass clazz) {
  65     return isModifiableClass(jnienv, (JPLISAgent*)(intptr_t)agent, clazz);
  66 }
  67 
  68 /*
  69  * Class:     sun_instrument_InstrumentationImpl
  70  * Method:    isRetransformClassesSupported0
  71  * Signature: ()Z
  72  */
  73 JNIEXPORT jboolean JNICALL
  74 Java_sun_instrument_InstrumentationImpl_isRetransformClassesSupported0
  75   (JNIEnv * jnienv, jobject implThis, jlong agent) {


< prev index next >