mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
generate jni header file by maven javah goal.
This commit is contained in:
@@ -87,6 +87,11 @@
|
||||
<version>1.0-alpha-11</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<javahIncludes>
|
||||
<javahInclude>
|
||||
<className>arthas.VmTool</className>
|
||||
</javahInclude>
|
||||
</javahIncludes>
|
||||
<jdkIncludePath>${project.basedir}/src/main/native/head</jdkIncludePath>
|
||||
<javahOS>${os_name}</javahOS>
|
||||
<sources>
|
||||
@@ -96,9 +101,6 @@
|
||||
<fileName>jni-library.cpp</fileName>
|
||||
</fileNames>
|
||||
</source>
|
||||
<source>
|
||||
<directory>src/main/native/include</directory>
|
||||
</source>
|
||||
</sources>
|
||||
|
||||
<compilerProvider>generic-classic</compilerProvider>
|
||||
@@ -127,6 +129,7 @@
|
||||
<id>javah</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>javah</goal>
|
||||
<goal>initialize</goal>
|
||||
<goal>compile</goal>
|
||||
<goal>link</goal>
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class arthas_VmTool */
|
||||
|
||||
#ifndef _Included_arthas_VmTool
|
||||
#define _Included_arthas_VmTool
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: arthas_VmTool
|
||||
* Method: check0
|
||||
* Signature: ()Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_arthas_VmTool_check0
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: arthas_VmTool
|
||||
* Method: forceGc0
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_arthas_VmTool_forceGc0
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: arthas_VmTool
|
||||
* Method: getInstances0
|
||||
* Signature: (Ljava/lang/Class;)[Ljava/lang/Object;
|
||||
*/
|
||||
JNIEXPORT jobjectArray JNICALL Java_arthas_VmTool_getInstances0
|
||||
(JNIEnv *, jclass, jclass);
|
||||
|
||||
/*
|
||||
* Class: arthas_VmTool
|
||||
* Method: sumInstanceSize0
|
||||
* Signature: (Ljava/lang/Class;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_arthas_VmTool_sumInstanceSize0
|
||||
(JNIEnv *, jclass, jclass);
|
||||
|
||||
/*
|
||||
* Class: arthas_VmTool
|
||||
* Method: getInstanceSize0
|
||||
* Signature: (Ljava/lang/Object;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_arthas_VmTool_getInstanceSize0
|
||||
(JNIEnv *, jclass, jobject);
|
||||
|
||||
/*
|
||||
* Class: arthas_VmTool
|
||||
* Method: countInstances0
|
||||
* Signature: (Ljava/lang/Class;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_arthas_VmTool_countInstances0
|
||||
(JNIEnv *, jclass, jclass);
|
||||
|
||||
/*
|
||||
* Class: arthas_VmTool
|
||||
* Method: getAllLoadedClasses0
|
||||
* Signature: ()[Ljava/lang/Class;
|
||||
*/
|
||||
JNIEXPORT jobjectArray JNICALL Java_arthas_VmTool_getAllLoadedClasses0
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <jni.h>
|
||||
#include <jni_md.h>
|
||||
#include <jvmti.h>
|
||||
#include "arthas_VmTool.h"
|
||||
#include "arthas_VmTool.h" // under target/native/javah/
|
||||
|
||||
//缓存
|
||||
static jclass cachedClass = NULL;
|
||||
|
||||
Reference in New Issue
Block a user