jvmpi.h
Go to the documentation of this file.
00001 /*
00002  * @(#)jvmpi.h  1.27 03/01/23
00003  *
00004  * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
00005  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
00006  */
00007 
00008 #ifndef _JAVASOFT_JVMPI_H_
00009 #define _JAVASOFT_JVMPI_H_
00010 
00011 #include "jni.h"
00012 
00013 #define JVMPI_VERSION_1   ((jint)0x10000001)  /* implied 0 for minor version */
00014 #define JVMPI_VERSION_1_1 ((jint)0x10000002)
00015 #define JVMPI_VERSION_1_2 ((jint)0x10000003)
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020   typedef void (*jvmpi_void_function_of_void)(void *);
00021 #ifdef __cplusplus
00022 }
00023 #endif
00024 
00025 /****************************************************************
00026  * Profiler interface data structures.
00027  ****************************************************************/
00028 /* identifier types. */
00029 struct _jobjectID;
00030 typedef struct _jobjectID * jobjectID;       /* type of object ids */ 
00031 
00032 /* raw monitors */
00033 struct _JVMPI_RawMonitor;
00034 typedef struct _JVMPI_RawMonitor * JVMPI_RawMonitor;
00035 
00036 /* call frame */
00037 typedef struct {
00038     jint lineno;                      /* line number in the source file */
00039     jmethodID method_id;              /* method executed in this frame */
00040 } JVMPI_CallFrame;
00041 
00042 /* call trace */
00043 typedef struct {
00044     JNIEnv *env_id;                   /* Env where trace was recorded */
00045     jint num_frames;                  /* number of frames in this trace */
00046     JVMPI_CallFrame *frames;          /* frames */
00047 } JVMPI_CallTrace;
00048 
00049 /* method */
00050 typedef struct {
00051     char *method_name;                /* name of method */
00052     char *method_signature;           /* signature of method */
00053     jint start_lineno;                /* -1 if native, abstract .. */
00054     jint end_lineno;                  /* -1 if native, abstract .. */
00055     jmethodID method_id;              /* id assigned to this method */
00056 } JVMPI_Method;
00057 
00058 /* Field */
00059 typedef struct {
00060     char *field_name;                 /* name of field */
00061     char *field_signature;            /* signature of field */
00062 } JVMPI_Field;
00063 
00064 /* line number info for a compiled method */
00065 typedef struct {
00066     jint offset;                      /* offset from beginning of method */
00067     jint lineno;                      /* lineno from beginning of src file */
00068 } JVMPI_Lineno;
00069 
00070 /* event */
00071 typedef struct {
00072     jint event_type;                  /* event_type */
00073     JNIEnv *env_id;                   /* env where this event occured */
00074   
00075     union {
00076         struct {
00077             const char *class_name;   /* class name */
00078             char *source_name;        /* name of source file */
00079             jint num_interfaces;      /* number of interfaces implemented */
00080             jint num_methods;         /* number of methods in the class */
00081             JVMPI_Method *methods;    /* methods */
00082             jint num_static_fields;   /* number of static fields */
00083             JVMPI_Field *statics;     /* static fields */
00084             jint num_instance_fields; /* number of instance fields */
00085             JVMPI_Field *instances;   /* instance fields */
00086             jobjectID class_id;       /* id of the class object */
00087         } class_load;
00088 
00089         struct {
00090             jobjectID class_id;       /* id of the class object */
00091         } class_unload;
00092 
00093         struct {
00094             unsigned char *class_data;        /* content of class file */
00095             jint class_data_len;              /* class file length */
00096             unsigned char *new_class_data;    /* instrumented class file */
00097             jint new_class_data_len;          /* new class file length */
00098             void * (*malloc_f)(unsigned int); /* memory allocation function */
00099         } class_load_hook;
00100 
00101         struct {
00102             jint arena_id;
00103             jobjectID class_id;       /* id of object class */
00104             jint is_array;            /* JVMPI_NORMAL_OBJECT, ... */
00105             jint size;                /* size in number of bytes */
00106             jobjectID obj_id;         /* id assigned to this object */
00107         } obj_alloc;
00108 
00109         struct {
00110             jobjectID obj_id;         /* id of the object */
00111         } obj_free;
00112 
00113         struct {
00114             jint arena_id;            /* cur arena id */
00115             jobjectID obj_id;         /* cur object id */
00116             jint new_arena_id;        /* new arena id */
00117             jobjectID new_obj_id;     /* new object id */         
00118         } obj_move;
00119 
00120         struct {
00121             jint arena_id;            /* id of arena */
00122             const char *arena_name;   /* name of arena */
00123         } new_arena;
00124 
00125         struct {
00126             jint arena_id;            /* id of arena */
00127         } delete_arena;
00128 
00129         struct {
00130             char *thread_name;        /* name of thread */
00131             char *group_name;         /* name of group */
00132             char *parent_name;        /* name of parent */
00133             jobjectID thread_id;      /* id of the thread object */
00134             JNIEnv *thread_env_id;
00135         } thread_start;
00136 
00137         struct {
00138             int dump_level;           /* level of the heap dump info */
00139             char *begin;              /* where all the root records begin,
00140                                          please see the heap dump buffer 
00141                                          format described below */
00142             char *end;                /* where the object records end. */
00143             jint num_traces;          /* number of thread traces, 
00144                                          0 if dump level = JVMPI_DUMP_LEVEL_0 */
00145             JVMPI_CallTrace *traces;  /* thread traces collected during 
00146                                          heap dump */ 
00147         } heap_dump;
00148 
00149         struct {
00150             jobjectID obj_id;         /* object id */
00151             jobject ref_id;           /* id assigned to the globalref */
00152         } jni_globalref_alloc;
00153       
00154         struct {
00155             jobject ref_id;           /* id of the global ref */
00156         } jni_globalref_free;
00157 
00158         struct {
00159             jmethodID method_id;      /* method */
00160         } method;
00161 
00162         struct {
00163             jmethodID method_id;      /* id of method */
00164             jobjectID obj_id;         /* id of target object */
00165         } method_entry2;
00166 
00167         struct {
00168             jmethodID method_id;        /* id of compiled method */
00169             void *code_addr;            /* code start addr. in memory */
00170             jint code_size;             /* code size */
00171             jint lineno_table_size;     /* size of lineno table */
00172             JVMPI_Lineno *lineno_table; /* lineno info */
00173         } compiled_method_load;
00174         
00175         struct {
00176             jmethodID method_id;        /* id of unloaded compiled method */
00177         } compiled_method_unload;
00178 
00179         struct {
00180             jmethodID method_id; /* id of the method the instruction belongs to */
00181             jint offset;         /* instruction offset in the method's bytecode */
00182             union {
00183                 struct {
00184                     jboolean is_true; /* whether true or false branch is taken  */
00185                 } if_info;
00186                 struct {
00187                     jint key; /* top stack value used as an index */
00188                     jint low; /* min value of the index           */
00189                     jint hi;  /* max value of the index           */
00190                 } tableswitch_info;
00191                 struct {
00192                     jint chosen_pair_index; /* actually chosen pair index (0-based)
00193                                              * if chosen_pair_index == pairs_total then
00194                                              * the 'default' branch is taken
00195                                              */
00196                     jint pairs_total;       /* total number of lookupswitch pairs */
00197                 } lookupswitch_info;
00198             } u;
00199         } instruction;
00200         
00201         struct {
00202             char *begin;                /* beginning of dump buffer, 
00203                                            see below for format */
00204             char *end;                  /* end of dump buffer */
00205             jint num_traces;            /* number of traces */
00206             JVMPI_CallTrace *traces;    /* traces of all threads */
00207             jint *threads_status;       /* status of all threads */
00208         } monitor_dump;
00209 
00210         struct {
00211             const char *name;           /* name of raw monitor */
00212             JVMPI_RawMonitor id;        /* id */
00213         } raw_monitor;
00214 
00215         struct {
00216             jobjectID object;           /* Java object */
00217         } monitor;
00218 
00219         struct {
00220             jobjectID object;           /* Java object */
00221             jlong timeout;              /* timeout period */
00222         } monitor_wait;
00223 
00224         struct {
00225             jlong used_objects;
00226             jlong used_object_space;
00227             jlong total_object_space;
00228         } gc_info;
00229 
00230         struct {
00231             jint data_len;
00232             char *data;
00233         } object_dump;
00234     } u;
00235 } JVMPI_Event;
00236 
00237 /* interface functions */
00238 typedef struct {
00239     jint version;   /* JVMPI version */
00240     
00241     /* ------interface implemented by the profiler------ */
00242 
00246     void (*NotifyEvent)(JVMPI_Event *event);
00247   
00248     /* ------interface implemented by the JVM------ */
00249     
00259     jint (*EnableEvent)(jint event_type, void *arg);
00260     jint (*DisableEvent)(jint event_type, void *arg);
00261     jint (*RequestEvent)(jint event_type, void *arg);
00262   
00270     void (*GetCallTrace)(JVMPI_CallTrace *trace, jint depth);
00271 
00275     void (*ProfilerExit)(jint);
00276 
00280     JVMPI_RawMonitor (*RawMonitorCreate)(char *lock_name);
00281     void (*RawMonitorEnter)(JVMPI_RawMonitor lock_id);
00282     void (*RawMonitorExit)(JVMPI_RawMonitor lock_id);
00283     void (*RawMonitorWait)(JVMPI_RawMonitor lock_id, jlong ms);
00284     void (*RawMonitorNotifyAll)(JVMPI_RawMonitor lock_id);
00285     void (*RawMonitorDestroy)(JVMPI_RawMonitor lock_id);
00286 
00292     jlong (*GetCurrentThreadCpuTime)(void);
00293 
00294     void (*SuspendThread)(JNIEnv *env);
00295     void (*ResumeThread)(JNIEnv *env);
00296     jint (*GetThreadStatus)(JNIEnv *env);
00297     jboolean (*ThreadHasRun)(JNIEnv *env);
00298 
00299     /* This function can be called safely only after JVMPI_EVENT_VM_INIT_DONE
00300        notification by the JVM. */
00301     jint (*CreateSystemThread)(char *name, jint priority, void (*f)(void *));
00302 
00303     /* thread local storage access functions to avoid locking in time 
00304        critical functions */
00305     void (*SetThreadLocalStorage)(JNIEnv *env_id, void *ptr);
00306     void * (*GetThreadLocalStorage)(JNIEnv *env_id);
00307 
00308     /* control GC */
00309     void (*DisableGC)(void);
00310     void (*EnableGC)(void);
00311     void (*RunGC)(void);
00312 
00313     jobjectID (*GetThreadObject)(JNIEnv *env);
00314     jobjectID (*GetMethodClass)(jmethodID mid);
00315 
00316     /* JNI <-> jobject conversions */
00317     jobject   (*jobjectID2jobject)(jobjectID jid);
00318     jobjectID (*jobject2jobjectID)(jobject jobj);
00319 
00320     void (*SuspendThreadList)
00321       (jint reqCount, JNIEnv **reqList, jint *results);
00322     void (*ResumeThreadList)
00323       (jint reqCount, JNIEnv **reqList, jint *results);
00324 } JVMPI_Interface;
00325 
00326 /* type of argument passed to RequestEvent for heap dumps */
00327 typedef struct {
00328     jint heap_dump_level;
00329 } JVMPI_HeapDumpArg;
00330 
00331 /**********************************************************************
00332  * Constants and formats used in JVM Profiler Interface.
00333  **********************************************************************/
00334 /*
00335  * Event type constants.
00336  */
00337 #define JVMPI_EVENT_METHOD_ENTRY            ((jint)1) 
00338 #define JVMPI_EVENT_METHOD_ENTRY2           ((jint)2) 
00339 #define JVMPI_EVENT_METHOD_EXIT             ((jint)3) 
00340 
00341 #define JVMPI_EVENT_OBJECT_ALLOC            ((jint)4) 
00342 #define JVMPI_EVENT_OBJECT_FREE             ((jint)5) 
00343 #define JVMPI_EVENT_OBJECT_MOVE             ((jint)6) 
00344 
00345 #define JVMPI_EVENT_COMPILED_METHOD_LOAD    ((jint)7) 
00346 #define JVMPI_EVENT_COMPILED_METHOD_UNLOAD  ((jint)8) 
00347 
00348 #define JVMPI_EVENT_INSTRUCTION_START       ((jint)9) 
00349 
00350 #define JVMPI_EVENT_THREAD_START           ((jint)33) 
00351 #define JVMPI_EVENT_THREAD_END             ((jint)34) 
00352 
00353 #define JVMPI_EVENT_CLASS_LOAD_HOOK        ((jint)35) 
00354 
00355 #define JVMPI_EVENT_HEAP_DUMP                     ((jint)37) 
00356 #define JVMPI_EVENT_JNI_GLOBALREF_ALLOC           ((jint)38) 
00357 #define JVMPI_EVENT_JNI_GLOBALREF_FREE            ((jint)39) 
00358 #define JVMPI_EVENT_JNI_WEAK_GLOBALREF_ALLOC      ((jint)40) 
00359 #define JVMPI_EVENT_JNI_WEAK_GLOBALREF_FREE       ((jint)41) 
00360 #define JVMPI_EVENT_CLASS_LOAD                    ((jint)42) 
00361 #define JVMPI_EVENT_CLASS_UNLOAD                  ((jint)43) 
00362 #define JVMPI_EVENT_DATA_DUMP_REQUEST             ((jint)44) 
00363 #define JVMPI_EVENT_DATA_RESET_REQUEST            ((jint)45) 
00364 
00365 #define JVMPI_EVENT_JVM_INIT_DONE          ((jint)46) 
00366 #define JVMPI_EVENT_JVM_SHUT_DOWN          ((jint)47) 
00367 
00368 #define JVMPI_EVENT_ARENA_NEW              ((jint)48)
00369 #define JVMPI_EVENT_ARENA_DELETE           ((jint)49)
00370 
00371 #define JVMPI_EVENT_OBJECT_DUMP            ((jint)50)
00372 
00373 #define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTER   ((jint)51)
00374 #define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTERED ((jint)52)
00375 #define JVMPI_EVENT_RAW_MONITOR_CONTENDED_EXIT    ((jint)53)
00376 #define JVMPI_EVENT_MONITOR_CONTENDED_ENTER       ((jint)54)
00377 #define JVMPI_EVENT_MONITOR_CONTENDED_ENTERED     ((jint)55)
00378 #define JVMPI_EVENT_MONITOR_CONTENDED_EXIT        ((jint)56)
00379 #define JVMPI_EVENT_MONITOR_WAIT                  ((jint)57)
00380 #define JVMPI_EVENT_MONITOR_WAITED                ((jint)58)
00381 #define JVMPI_EVENT_MONITOR_DUMP                  ((jint)59)
00382 
00383 #define JVMPI_EVENT_GC_START                      ((jint)60)
00384 #define JVMPI_EVENT_GC_FINISH                     ((jint)61)
00385 
00386 #define JVMPI_MAX_EVENT_TYPE_VAL                  ((jint)61)
00387 
00388 /* old definitions, to be removed */
00389 #define JVMPI_EVENT_LOAD_COMPILED_METHOD          ((jint)7) 
00390 #define JVMPI_EVENT_UNLOAD_COMPILED_METHOD        ((jint)8) 
00391 #define JVMPI_EVENT_NEW_ARENA                     ((jint)48)
00392 #define JVMPI_EVENT_DELETE_ARENA                  ((jint)49)
00393 #define JVMPI_EVENT_DUMP_DATA_REQUEST             ((jint)44) 
00394 #define JVMPI_EVENT_RESET_DATA_REQUEST            ((jint)45) 
00395 #define JVMPI_EVENT_OBJ_ALLOC                     ((jint)4) 
00396 #define JVMPI_EVENT_OBJ_FREE                      ((jint)5) 
00397 #define JVMPI_EVENT_OBJ_MOVE                      ((jint)6) 
00398 
00399 #define JVMPI_REQUESTED_EVENT                     ((jint)0x10000000)
00400 
00401 
00402  
00403 /* 
00404  * enabling/disabling event notification.
00405  */
00406 /* results */
00407 #define JVMPI_SUCCESS                    ((jint)0)
00408 #define JVMPI_NOT_AVAILABLE              ((jint)1)
00409 #define JVMPI_FAIL                       ((jint)-1)
00410 
00411 /*
00412  * Thread status
00413  */
00414 enum {
00415     JVMPI_THREAD_RUNNABLE = 1,
00416     JVMPI_THREAD_MONITOR_WAIT,
00417     JVMPI_THREAD_CONDVAR_WAIT
00418 };
00419 
00420 #define JVMPI_THREAD_SUSPENDED        0x8000
00421 #define JVMPI_THREAD_INTERRUPTED      0x4000
00422 
00423 /*
00424  * Thread priority
00425  */
00426 #define JVMPI_MINIMUM_PRIORITY      1
00427 #define JVMPI_MAXIMUM_PRIORITY      10
00428 #define JVMPI_NORMAL_PRIORITY       5
00429 
00430 /*
00431  * Object type constants.
00432  */
00433 #define JVMPI_NORMAL_OBJECT              ((jint)0)
00434 #define JVMPI_CLASS                      ((jint)2)
00435 #define JVMPI_BOOLEAN                    ((jint)4)
00436 #define JVMPI_CHAR                       ((jint)5)
00437 #define JVMPI_FLOAT                      ((jint)6)
00438 #define JVMPI_DOUBLE                     ((jint)7)
00439 #define JVMPI_BYTE                       ((jint)8)
00440 #define JVMPI_SHORT                      ((jint)9)
00441 #define JVMPI_INT                        ((jint)10)
00442 #define JVMPI_LONG                       ((jint)11)    
00443 
00444 /*
00445  * Monitor dump constants.
00446  */
00447 
00448 #define JVMPI_MONITOR_JAVA          0x01
00449 #define JVMPI_MONITOR_RAW           0x02
00450 
00451 /*
00452  * Heap dump constants.
00453  */
00454 #define JVMPI_GC_ROOT_UNKNOWN       0xff
00455 #define JVMPI_GC_ROOT_JNI_GLOBAL    0x01
00456 #define JVMPI_GC_ROOT_JNI_LOCAL     0x02
00457 #define JVMPI_GC_ROOT_JAVA_FRAME    0x03
00458 #define JVMPI_GC_ROOT_NATIVE_STACK  0x04
00459 #define JVMPI_GC_ROOT_STICKY_CLASS  0x05
00460 #define JVMPI_GC_ROOT_THREAD_BLOCK  0x06
00461 #define JVMPI_GC_ROOT_MONITOR_USED  0x07
00462 #define JVMPI_GC_ROOT_THREAD_OBJ    0x08
00463 
00464 #define JVMPI_GC_CLASS_DUMP         0x20
00465 #define JVMPI_GC_INSTANCE_DUMP      0x21 
00466 #define JVMPI_GC_OBJ_ARRAY_DUMP     0x22
00467 #define JVMPI_GC_PRIM_ARRAY_DUMP    0x23
00468 
00469 /*
00470  * Dump levels
00471  */
00472 #define JVMPI_DUMP_LEVEL_0    ((jint)0)
00473 #define JVMPI_DUMP_LEVEL_1    ((jint)1)
00474 #define JVMPI_DUMP_LEVEL_2    ((jint)2)
00475 
00476 /* Types used in dumps -
00477  *
00478  * u1: 1 byte
00479  * u2: 2 bytes
00480  * u4: 4 bytes
00481  * u8: 8 bytes
00482  *
00483  * ty: u1 where:
00484  *     JVMPI_CLASS:   object
00485  *     JVMPI_BOOLEAN: boolean
00486  *     JVMPI_CHAR:    char
00487  *     JVMPI_FLOAT:   float
00488  *     JVMPI_DOUBLE:  double
00489  *     JVMPI_BYTE:    byte
00490  *     JVMPI_SHORT:   short
00491  *     JVMPI_INT:     int
00492  *     JVMPI_LONG:    long
00493  *
00494  * vl: values, exact type depends on the type of the value:
00495  *     JVMPI_BOOLEAN & JVMPI_BYTE:   u1
00496  *     JVMPI_SHORT & JVMPI_CHAR:     u2
00497  *     JVMPI_INT & JVMPI_FLOAT:      u4
00498  *     JVMPI_LONG & JVMPI_DOUBLE:    u8
00499  *     JVMPI_CLASS:                  jobjectID
00500  */
00501 
00502 /* Format of the monitor dump buffer:
00503  *
00504  *               u1                          monitor type
00505  *
00506  *               JVMPI_MONITOR_JAVA          Java monitor
00507  *
00508  *                          jobjectID        object
00509  *                          JNIEnv *         owner thread
00510  *                          u4               entry count
00511  *                          u4               # of threads waiting to enter
00512  *                          [JNIEnv *]*      threads waiting to enter
00513  *                          u4               # of threads waiting to be notified
00514  *                          [JNIEnv *]*      threads waiting to be notified
00515  *
00516  *               JVMPI_MONITOR_RAW           raw monitor
00517  *
00518  *                          char *           name
00519  *                          JVMPI_RawMonitor raw monitor
00520  *                          JNIEnv *         owner thread
00521  *                          u4               entry count
00522  *                          u4               # of threads waiting to enter
00523  *                          [JNIEnv *]*      threads waiting to enter
00524  *                          u4               # of threads waiting to be notified
00525  *                          [JNIEnv *]*      threads waiting to be notified
00526  */
00527 
00528 /* Format of the heap dump buffer depends on the dump level 
00529  * specified in the JVMPI_HeapDumpArg passed to RequestEvent as arg. 
00530  * The default is JVMPI_DUMP_LEVEL_2.
00531  *
00532  * JVMPI_DUMP_LEVEL_0:
00533  * 
00534  *               u1                          object type (JVMPI_CLASS ...)
00535  *               jobjectID                   object
00536  *
00537  * JVMPI_DUMP_LEVEL_1 and JVMPI_DUMP_LEVEL_2 use the following format:  
00538  * In the case of JVMPI_DUMP_LEVEL_1 the values of primitive fields in object 
00539  * instance dumps , the values of primitive statics in class dumps and the 
00540  * values of primitive arrays are excluded.  JVMPI_DUMP_LEVEL_2 includes the
00541  * primitive values.
00542  *
00543  *               u1                          record type
00544  *
00545  *               JVMPI_GC_ROOT_UNKNOWN       unknown root
00546  *
00547  *                          jobjectID        object
00548  *
00549  *               JVMPI_GC_ROOT_JNI_GLOBAL    JNI global ref root
00550  *
00551  *                          jobjectID        object
00552  *                          jobject          JNI global reference
00553  *
00554  *               JVMPI_GC_ROOT_JNI_LOCAL     JNI local ref
00555  *
00556  *                          jobjectID        object
00557  *                          JNIEnv *         thread
00558  *                          u4               frame # in stack trace (-1 for empty)
00559  *
00560  *               JVMPI_GC_ROOT_JAVA_FRAME    Java stack frame
00561  *
00562  *                          jobjectID        object
00563  *                          JNIEnv *         thread
00564  *                          u4               frame # in stack trace (-1 for empty)
00565  *
00566  *               JVMPI_GC_ROOT_NATIVE_STACK  Native stack
00567  *
00568  *                          jobjectID        object
00569  *                          JNIEnv *         thread
00570  *
00571  *               JVMPI_GC_ROOT_STICKY_CLASS  System class
00572  *
00573  *                          jobjectID        class object
00574  *
00575  *               JVMPI_GC_ROOT_THREAD_BLOCK  Reference from thread block
00576  *
00577  *                          jobjectID        thread object
00578  *                          JNIEnv *         thread
00579  *
00580  *               JVMPI_GC_ROOT_MONITOR_USED  Busy monitor
00581  *
00582  *                          jobjectID        object
00583  *
00584  *               JVMPI_GC_CLASS_DUMP         dump of a class object
00585  *
00586  *                          jobjectID        class
00587  *                          jobjectID        super
00588  *                          jobjectID        class loader
00589  *                          jobjectID        signers
00590  *                          jobjectID        protection domain
00591  *                          jobjectID        class name
00592  *                          void *           reserved
00593  *
00594  *                          u4               instance size (in bytes)
00595  *
00596  *                          [jobjectID]*     interfaces
00597  *
00598  *                          u2               size of constant pool
00599  *                          [u2,             constant pool index,
00600  *                           ty,             type, 
00601  *                           vl]*            value
00602  *
00603  *                          [vl]*            static field values
00604  *
00605  *               JVMPI_GC_INSTANCE_DUMP      dump of a normal object
00606  *
00607  *                          jobjectID        object
00608  *                          jobjectID        class
00609  *                          u4               number of bytes that follow
00610  *                          [vl]*            instance field values (class, followed
00611  *                                           by super, super's super ...)
00612  *
00613  *               JVMPI_GC_OBJ_ARRAY_DUMP     dump of an object array
00614  *
00615  *                          jobjectID        array object
00616  *                          u4               number of elements
00617  *                          jobjectID        element class
00618  *                          [jobjectID]*     elements
00619  *
00620  *               JVMPI_GC_PRIM_ARRAY_DUMP    dump of a primitive array
00621  *
00622  *                          jobjectID        array object
00623  *                          u4               number of elements
00624  *                          ty               element type
00625  *                          [vl]*            elements
00626  *
00627  */
00628 
00629 /* Format of the dump received in JVMPI_EVENT_OBJECT_DUMP:
00630  * All the records have JVMPI_DUMP_LEVEL_2 information.
00631  *
00632  *               u1                          record type
00633  *
00634  *                     followed by a:
00635  *
00636  *                          JVMPI_GC_CLASS_DUMP,
00637  *                          JVMPI_GC_INSTANCE_DUMP,
00638  *                          JVMPI_GC_OBJ_ARRAY_DUMP, or
00639  *                          JVMPI_GC_PRIM_ARRAY_DUMP record.
00640  */
00641 
00642 #endif /* !_JAVASOFT_JVMPI_H_ */


pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:21