hprof_util.h File Reference

#include "debug_malloc.h"
Include dependency graph for hprof_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define WITH_LOCAL_REFS(env, number)
#define END_WITH_LOCAL_REFS
#define CHECK_EXCEPTIONS(env)
#define END_CHECK_EXCEPTIONS
#define HPROF_MALLOC(size)   hprof_malloc(size)
#define HPROF_FREE(ptr)   hprof_free(ptr)

Functions

JNIEnv * getEnv (void)
jobject newGlobalReference (JNIEnv *env, jobject object)
jobject newWeakGlobalReference (JNIEnv *env, jobject object)
void deleteGlobalReference (JNIEnv *env, jobject object)
jobject newLocalReference (JNIEnv *env, jobject object)
void deleteLocalReference (JNIEnv *env, jobject object)
void deleteWeakGlobalReference (JNIEnv *env, jobject object)
jclass getObjectClass (JNIEnv *env, jobject object)
jmethodID getMethodID (JNIEnv *env, jclass clazz, const char *name, const char *sig)
jclass getSuperclass (JNIEnv *env, jclass klass)
jmethodID getStaticMethodID (JNIEnv *env, jclass clazz, const char *name, const char *sig)
jfieldID getStaticFieldID (JNIEnv *env, jclass clazz, const char *name, const char *sig)
jclass findClass (JNIEnv *env, const char *name)
void setStaticIntField (JNIEnv *env, jclass clazz, jfieldID field, jint value)
jboolean isSameObject (JNIEnv *env, jobject o1, jobject o2)
void pushLocalFrame (JNIEnv *env, jint capacity)
void popLocalFrame (JNIEnv *env, jobject ret)
jobject exceptionOccurred (JNIEnv *env)
void exceptionDescribe (JNIEnv *env)
void exceptionClear (JNIEnv *env)
void registerNatives (JNIEnv *env, jclass clazz, JNINativeMethod *methods, jint count)
char * getErrorName (jvmtiError error_number)
jvmtiPhase getPhase (void)
char * phaseString (jvmtiPhase phase)
void disposeEnvironment (void)
jlong getObjectSize (jobject object)
jobject getClassLoader (jclass klass)
jint getClassStatus (jclass klass)
jlong getTag (jobject object)
void setTag (jobject object, jlong tag)
void getObjectMonitorUsage (jobject object, jvmtiMonitorUsage *uinfo)
void getOwnedMonitorInfo (jthread thread, jobject **ppobjects, jint *pcount)
void getSystemProperty (const char *name, char **value)
void getClassSignature (jclass klass, char **psignature, char **pgeneric_signature)
void getSourceFileName (jclass klass, char **src_name_ptr)
jvmtiPrimitiveType sigToPrimType (char *sig)
int sigToPrimSize (char *sig)
char primTypeToSigChar (jvmtiPrimitiveType primType)
void getAllClassFieldInfo (JNIEnv *env, jclass klass, jint *field_count_ptr, FieldInfo **fields_ptr)
void getMethodName (jmethodID method, char **name_ptr, char **signature_ptr)
void getMethodClass (jmethodID method, jclass *pclazz)
jboolean isMethodNative (jmethodID method)
void getPotentialCapabilities (jvmtiCapabilities *capabilities)
void addCapabilities (jvmtiCapabilities *capabilities)
void setEventCallbacks (jvmtiEventCallbacks *pcallbacks)
void setEventNotificationMode (jvmtiEventMode mode, jvmtiEvent event, jthread thread)
void * getThreadLocalStorage (jthread thread)
void setThreadLocalStorage (jthread thread, void *ptr)
void getThreadState (jthread thread, jint *threadState)
void getThreadInfo (jthread thread, jvmtiThreadInfo *info)
void getThreadGroupInfo (jthreadGroup thread_group, jvmtiThreadGroupInfo *info)
void getLoadedClasses (jclass **ppclasses, jint *pcount)
jint getLineNumber (jmethodID method, jlocation location)
jlong getMaxMemory (JNIEnv *env)
void createAgentThread (JNIEnv *env, const char *name, jvmtiStartFunction func)
jlong getThreadCpuTime (jthread thread)
void getStackTrace (jthread thread, jvmtiFrameInfo *pframes, jint depth, jint *pcount)
void getThreadListStackTraces (jint count, jthread *threads, jint depth, jvmtiStackInfo **stack_info)
void getFrameCount (jthread thread, jint *pcount)
void followReferences (jvmtiHeapCallbacks *pHeapCallbacks, void *user_data)
void runGC (void)
void getJvmti (void)
jint jvmtiVersion (void)
jrawMonitorID createRawMonitor (const char *str)
void rawMonitorEnter (jrawMonitorID m)
void rawMonitorWait (jrawMonitorID m, jlong pause_time)
void rawMonitorNotifyAll (jrawMonitorID m)
void rawMonitorExit (jrawMonitorID m)
void destroyRawMonitor (jrawMonitorID m)
void * jvmtiAllocate (int size)
void jvmtiDeallocate (void *ptr)
void * hprof_malloc (int size)
void hprof_free (void *ptr)

Define Documentation

#define CHECK_EXCEPTIONS ( env   ) 
Value:
{                                                                   \
        JNIEnv *_env = (env);                                           \
        jobject _exception;                                             \
        _exception = exceptionOccurred(_env);                           \
        if ( _exception != NULL ) {                                     \
            exceptionDescribe(_env);                                    \
            HPROF_ERROR(JNI_TRUE, "Unexpected Exception found beforehand");\
        }                                                               \
        {

Definition at line 53 of file hprof_util.h.

#define END_CHECK_EXCEPTIONS
Value:
}                                                               \
        _exception = exceptionOccurred(_env);                           \
        if ( _exception != NULL ) {                                     \
            exceptionDescribe(_env);                                    \
            HPROF_ERROR(JNI_TRUE, "Unexpected Exception found afterward");\
        }                                                               \
    }

Definition at line 64 of file hprof_util.h.

#define END_WITH_LOCAL_REFS
Value:
} /* END OF WITH SCOPE */               \
        popLocalFrame(_env, NULL);              \
    }

Definition at line 47 of file hprof_util.h.

#define HPROF_FREE ( ptr   )     hprof_free(ptr)

Definition at line 187 of file hprof_util.h.

#define HPROF_MALLOC ( size   )     hprof_malloc(size)

Definition at line 186 of file hprof_util.h.

#define WITH_LOCAL_REFS ( env,
number   ) 
Value:
{                                           \
        JNIEnv *_env = (env);                   \
        pushLocalFrame(_env, number);           \
        {

Definition at line 41 of file hprof_util.h.


Function Documentation

void addCapabilities ( jvmtiCapabilities *  capabilities  ) 

Definition at line 1293 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void createAgentThread ( JNIEnv *  env,
const char *  name,
jvmtiStartFunction  func 
)

Definition at line 1530 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

jrawMonitorID createRawMonitor ( const char *  str  ) 

Definition at line 232 of file hprof_util.c.

Here is the caller graph for this function:

void deleteGlobalReference ( JNIEnv *  env,
jobject  object 
)

Definition at line 379 of file hprof_util.c.

Here is the caller graph for this function:

void deleteLocalReference ( JNIEnv *  env,
jobject  object 
)

Definition at line 399 of file hprof_util.c.

Here is the caller graph for this function:

void deleteWeakGlobalReference ( JNIEnv *  env,
jobject  object 
)

Definition at line 407 of file hprof_util.c.

Here is the caller graph for this function:

void destroyRawMonitor ( jrawMonitorID  m  ) 

Definition at line 303 of file hprof_util.c.

Here is the caller graph for this function:

void disposeEnvironment ( void   ) 

Definition at line 684 of file hprof_util.c.

void exceptionClear ( JNIEnv *  env  ) 

Definition at line 349 of file hprof_util.c.

Here is the caller graph for this function:

void exceptionDescribe ( JNIEnv *  env  ) 

Definition at line 343 of file hprof_util.c.

jobject exceptionOccurred ( JNIEnv *  env  ) 

Definition at line 337 of file hprof_util.c.

jclass findClass ( JNIEnv *  env,
const char *  name 
)

Definition at line 477 of file hprof_util.c.

Here is the caller graph for this function:

void followReferences ( jvmtiHeapCallbacks *  pHeapCallbacks,
void *  user_data 
)

Definition at line 1656 of file hprof_util.c.

Here is the caller graph for this function:

void getAllClassFieldInfo ( JNIEnv *  env,
jclass  klass,
jint *  field_count_ptr,
FieldInfo **  fields_ptr 
)

Definition at line 1202 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

jobject getClassLoader ( jclass  klass  ) 

Definition at line 744 of file hprof_util.c.

Here is the caller graph for this function:

void getClassSignature ( jclass  klass,
char **  psignature,
char **  pgeneric_signature 
)

Definition at line 839 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

jint getClassStatus ( jclass  klass  ) 

Definition at line 723 of file hprof_util.c.

Here is the caller graph for this function:

JNIEnv* getEnv ( void   ) 

Definition at line 63 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* getErrorName ( jvmtiError  error_number  ) 

Definition at line 645 of file hprof_util.c.

Here is the caller graph for this function:

void getFrameCount ( jthread  thread,
jint *  pcount 
)

Definition at line 1605 of file hprof_util.c.

Here is the caller graph for this function:

void getJvmti ( void   ) 

Definition at line 1683 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

jint getLineNumber ( jmethodID  method,
jlocation  location 
)

Definition at line 1485 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void getLoadedClasses ( jclass **  ppclasses,
jint *  pcount 
)

Definition at line 1403 of file hprof_util.c.

Here is the caller graph for this function:

jlong getMaxMemory ( JNIEnv *  env  ) 

Definition at line 1506 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void getMethodClass ( jmethodID  method,
jclass *  pclazz 
)

Definition at line 1231 of file hprof_util.c.

Here is the caller graph for this function:

jmethodID getMethodID ( JNIEnv *  env,
jclass  clazz,
const char *  name,
const char *  sig 
)

Definition at line 456 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void getMethodName ( jmethodID  method,
char **  name_ptr,
char **  signature_ptr 
)

Definition at line 1261 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

jclass getObjectClass ( JNIEnv *  env,
jobject  object 
)

Definition at line 415 of file hprof_util.c.

Here is the caller graph for this function:

void getObjectMonitorUsage ( jobject  object,
jvmtiMonitorUsage *  uinfo 
)

Definition at line 790 of file hprof_util.c.

Here is the caller graph for this function:

jlong getObjectSize ( jobject  object  ) 

Definition at line 691 of file hprof_util.c.

Here is the caller graph for this function:

void getOwnedMonitorInfo ( jthread  thread,
jobject **  ppobjects,
jint *  pcount 
)

Definition at line 803 of file hprof_util.c.

Here is the caller graph for this function:

jvmtiPhase getPhase ( void   ) 

Definition at line 656 of file hprof_util.c.

Here is the caller graph for this function:

void getPotentialCapabilities ( jvmtiCapabilities *  capabilities  ) 

Definition at line 1279 of file hprof_util.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void getSourceFileName ( jclass  klass,
char **  src_name_ptr 
)

Definition at line 859 of file hprof_util.c.

Here is the caller graph for this function:

void getStackTrace ( jthread  thread,
jvmtiFrameInfo *  pframes,
jint  depth,
jint *  pcount 
)

Definition at line 1621 of file hprof_util.c.

Here is the caller graph for this function:

jfieldID getStaticFieldID ( JNIEnv *  env,
jclass  clazz,
const char *  name,
const char *  sig 
)

Definition at line 493 of file hprof_util.c.

Here is the caller graph for this function:

jmethodID getStaticMethodID ( JNIEnv *  env,
jclass  clazz,
const char *  name,
const char *  sig 
)

Definition at line 440 of file hprof_util.c.

Here is the caller graph for this function:

jclass getSuperclass ( JNIEnv *  env,
jclass  klass 
)

Definition at line 428 of file hprof_util.c.

Here is the caller graph for this function:

void getSystemProperty ( const char *  name,
char **  value 
)

Definition at line 825 of file hprof_util.c.

Here is the caller graph for this function:

jlong getTag ( jobject  object  ) 

Definition at line 761 of file hprof_util.c.

Here is the caller graph for this function:

jlong getThreadCpuTime ( jthread  thread  ) 

Definition at line 1588 of file hprof_util.c.

void getThreadGroupInfo ( jthreadGroup  thread_group,
jvmtiThreadGroupInfo *  info 
)

Definition at line 1388 of file hprof_util.c.

Here is the caller graph for this function:

void getThreadInfo ( jthread  thread,
jvmtiThreadInfo *  info 
)

Definition at line 1372 of file hprof_util.c.

Here is the caller graph for this function:

void getThreadListStackTraces ( jint  count,
jthread *  threads,
jint  depth,
jvmtiStackInfo **  stack_info 
)

Definition at line 1638 of file hprof_util.c.

Here is the caller graph for this function:

void* getThreadLocalStorage ( jthread  thread  ) 

Definition at line 1319 of file hprof_util.c.

Here is the caller graph for this function:

void getThreadState ( jthread  thread,
jint *  threadState 
)

Definition at line 1357 of file hprof_util.c.

Here is the caller graph for this function:

void hprof_free ( void *  ptr  ) 

Definition at line 166 of file hprof_util.c.

void* hprof_malloc ( int  size  ) 

Definition at line 153 of file hprof_util.c.

jboolean isMethodNative ( jmethodID  method  ) 

Definition at line 1246 of file hprof_util.c.

Here is the caller graph for this function:

jboolean isSameObject ( JNIEnv *  env,
jobject  o1,
jobject  o2 
)

Definition at line 590 of file hprof_util.c.

Here is the caller graph for this function:

void* jvmtiAllocate ( int  size  ) 

Definition at line 89 of file hprof_util.c.

Here is the caller graph for this function:

void jvmtiDeallocate ( void *  ptr  ) 

Definition at line 108 of file hprof_util.c.

Here is the caller graph for this function:

jint jvmtiVersion ( void   ) 

Definition at line 176 of file hprof_util.c.

Here is the caller graph for this function:

jobject newGlobalReference ( JNIEnv *  env,
jobject  object 
)

Definition at line 355 of file hprof_util.c.

Here is the caller graph for this function:

jobject newLocalReference ( JNIEnv *  env,
jobject  object 
)

Definition at line 387 of file hprof_util.c.

Here is the caller graph for this function:

jobject newWeakGlobalReference ( JNIEnv *  env,
jobject  object 
)

Definition at line 367 of file hprof_util.c.

Here is the caller graph for this function:

char* phaseString ( jvmtiPhase  phase  ) 

Definition at line 666 of file hprof_util.c.

Here is the caller graph for this function:

void popLocalFrame ( JNIEnv *  env,
jobject  ret 
)

Definition at line 614 of file hprof_util.c.

char primTypeToSigChar ( jvmtiPrimitiveType  primType  ) 

Definition at line 988 of file hprof_util.c.

Here is the caller graph for this function:

void pushLocalFrame ( JNIEnv *  env,
jint  capacity 
)

Definition at line 600 of file hprof_util.c.

void rawMonitorEnter ( jrawMonitorID  m  ) 

Definition at line 247 of file hprof_util.c.

Here is the caller graph for this function:

void rawMonitorExit ( jrawMonitorID  m  ) 

Definition at line 287 of file hprof_util.c.

Here is the caller graph for this function:

void rawMonitorNotifyAll ( jrawMonitorID  m  ) 

Definition at line 275 of file hprof_util.c.

Here is the caller graph for this function:

void rawMonitorWait ( jrawMonitorID  m,
jlong  pause_time 
)

Definition at line 263 of file hprof_util.c.

Here is the caller graph for this function:

void registerNatives ( JNIEnv *  env,
jclass  clazz,
JNINativeMethod *  methods,
jint  count 
)

Definition at line 626 of file hprof_util.c.

Here is the caller graph for this function:

void runGC ( void   ) 

Definition at line 1669 of file hprof_util.c.

Here is the caller graph for this function:

void setEventCallbacks ( jvmtiEventCallbacks *  pcallbacks  ) 

Definition at line 1306 of file hprof_util.c.

Here is the caller graph for this function:

void setEventNotificationMode ( jvmtiEventMode  mode,
jvmtiEvent  event,
jthread  thread 
)

Definition at line 322 of file hprof_util.c.

Here is the caller graph for this function:

void setStaticIntField ( JNIEnv *  env,
jclass  clazz,
jfieldID  field,
jint  value 
)

Definition at line 508 of file hprof_util.c.

Here is the caller graph for this function:

void setTag ( jobject  object,
jlong  tag 
)

Definition at line 777 of file hprof_util.c.

Here is the caller graph for this function:

void setThreadLocalStorage ( jthread  thread,
void *  ptr 
)

Definition at line 1340 of file hprof_util.c.

Here is the caller graph for this function:

int sigToPrimSize ( char *  sig  ) 

Definition at line 1066 of file hprof_util.c.

Here is the caller graph for this function:

jvmtiPrimitiveType sigToPrimType ( char *  sig  ) 

Definition at line 1027 of file hprof_util.c.

Here is the caller graph for this function:


Generated on 19 Nov 2012 for hprof by  doxygen 1.6.1