Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libjni-gdal / include / jni_linux / jvmpi.h @ 5888

History | View | Annotate | Download (21.7 KB)

1
/*
2
 * @(#)jvmpi.h        1.27 03/01/23
3
 *
4
 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
5
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6
 */
7

    
8
#ifndef _JAVASOFT_JVMPI_H_
9
#define _JAVASOFT_JVMPI_H_
10

    
11
#include "jni.h"
12

    
13
#define JVMPI_VERSION_1   ((jint)0x10000001)  /* implied 0 for minor version */
14
#define JVMPI_VERSION_1_1 ((jint)0x10000002)
15
#define JVMPI_VERSION_1_2 ((jint)0x10000003)
16

    
17
#ifdef __cplusplus
18
extern "C" {
19
#endif
20
  typedef void (*jvmpi_void_function_of_void)(void *);
21
#ifdef __cplusplus
22
}
23
#endif
24

    
25
/****************************************************************
26
 * Profiler interface data structures.
27
 ****************************************************************/
28
/* identifier types. */
29
struct _jobjectID;
30
typedef struct _jobjectID * jobjectID;       /* type of object ids */ 
31

    
32
/* raw monitors */
33
struct _JVMPI_RawMonitor;
34
typedef struct _JVMPI_RawMonitor * JVMPI_RawMonitor;
35

    
36
/* call frame */
37
typedef struct {
38
    jint lineno;                      /* line number in the source file */
39
    jmethodID method_id;              /* method executed in this frame */
40
} JVMPI_CallFrame;
41

    
42
/* call trace */
43
typedef struct {
44
    JNIEnv *env_id;                   /* Env where trace was recorded */
45
    jint num_frames;                  /* number of frames in this trace */
46
    JVMPI_CallFrame *frames;          /* frames */
47
} JVMPI_CallTrace;
48

    
49
/* method */
50
typedef struct {
51
    char *method_name;                /* name of method */
52
    char *method_signature;           /* signature of method */
53
    jint start_lineno;                /* -1 if native, abstract .. */
54
    jint end_lineno;                  /* -1 if native, abstract .. */
55
    jmethodID method_id;              /* id assigned to this method */
56
} JVMPI_Method;
57

    
58
/* Field */
59
typedef struct {
60
    char *field_name;                 /* name of field */
61
    char *field_signature;            /* signature of field */
62
} JVMPI_Field;
63

    
64
/* line number info for a compiled method */
65
typedef struct {
66
    jint offset;                      /* offset from beginning of method */
67
    jint lineno;                      /* lineno from beginning of src file */
68
} JVMPI_Lineno;
69

    
70
/* event */
71
typedef struct {
72
    jint event_type;                  /* event_type */
73
    JNIEnv *env_id;                   /* env where this event occured */
74
  
75
    union {
76
        struct {
77
            const char *class_name;   /* class name */
78
            char *source_name;        /* name of source file */
79
            jint num_interfaces;      /* number of interfaces implemented */
80
              jint num_methods;         /* number of methods in the class */
81
            JVMPI_Method *methods;    /* methods */
82
            jint num_static_fields;   /* number of static fields */
83
            JVMPI_Field *statics;     /* static fields */
84
            jint num_instance_fields; /* number of instance fields */
85
            JVMPI_Field *instances;   /* instance fields */
86
            jobjectID class_id;       /* id of the class object */
87
        } class_load;
88

    
89
        struct {
90
            jobjectID class_id;       /* id of the class object */
91
        } class_unload;
92

    
93
        struct {
94
            unsigned char *class_data;        /* content of class file */
95
            jint class_data_len;              /* class file length */
96
            unsigned char *new_class_data;    /* instrumented class file */
97
            jint new_class_data_len;          /* new class file length */
98
            void * (*malloc_f)(unsigned int); /* memory allocation function */
99
        } class_load_hook;
100

    
101
        struct {
102
            jint arena_id;
103
            jobjectID class_id;       /* id of object class */
104
            jint is_array;            /* JVMPI_NORMAL_OBJECT, ... */
105
            jint size;                /* size in number of bytes */
106
            jobjectID obj_id;         /* id assigned to this object */
107
        } obj_alloc;
108

    
109
        struct {
110
            jobjectID obj_id;         /* id of the object */
111
        } obj_free;
112

    
113
        struct {
114
            jint arena_id;            /* cur arena id */
115
            jobjectID obj_id;         /* cur object id */
116
            jint new_arena_id;        /* new arena id */
117
            jobjectID new_obj_id;     /* new object id */          
118
        } obj_move;
119

    
120
        struct {
121
            jint arena_id;            /* id of arena */
122
            const char *arena_name;   /* name of arena */
123
        } new_arena;
124

    
125
        struct {
126
            jint arena_id;            /* id of arena */
127
        } delete_arena;
128

    
129
        struct {
130
            char *thread_name;        /* name of thread */
131
            char *group_name;         /* name of group */
132
            char *parent_name;        /* name of parent */
133
            jobjectID thread_id;      /* id of the thread object */
134
            JNIEnv *thread_env_id;
135
        } thread_start;
136

    
137
        struct {
138
            int dump_level;           /* level of the heap dump info */
139
            char *begin;              /* where all the root records begin,
140
                                         please see the heap dump buffer 
141
                                         format described below */
142
            char *end;                /* where the object records end. */
143
            jint num_traces;          /* number of thread traces, 
144
                                         0 if dump level = JVMPI_DUMP_LEVEL_0 */
145
            JVMPI_CallTrace *traces;  /* thread traces collected during 
146
                                         heap dump */ 
147
        } heap_dump;
148

    
149
        struct {
150
            jobjectID obj_id;         /* object id */
151
            jobject ref_id;           /* id assigned to the globalref */
152
        } jni_globalref_alloc;
153
      
154
        struct {
155
            jobject ref_id;           /* id of the global ref */
156
        } jni_globalref_free;
157

    
158
        struct {
159
            jmethodID method_id;      /* method */
160
        } method;
161

    
162
        struct {
163
            jmethodID method_id;      /* id of method */
164
            jobjectID obj_id;         /* id of target object */
165
        } method_entry2;
166

    
167
        struct {
168
            jmethodID method_id;        /* id of compiled method */
169
            void *code_addr;            /* code start addr. in memory */
170
            jint code_size;             /* code size */
171
            jint lineno_table_size;     /* size of lineno table */
172
            JVMPI_Lineno *lineno_table; /* lineno info */
173
        } compiled_method_load;
174
        
175
        struct {
176
            jmethodID method_id;        /* id of unloaded compiled method */
177
        } compiled_method_unload;
178

    
179
        struct {
180
            jmethodID method_id; /* id of the method the instruction belongs to */
181
            jint offset;         /* instruction offset in the method's bytecode */
182
            union {
183
                struct {
184
                    jboolean is_true; /* whether true or false branch is taken  */
185
                } if_info;
186
                struct {
187
                    jint key; /* top stack value used as an index */
188
                    jint low; /* min value of the index           */
189
                    jint hi;  /* max value of the index           */
190
                } tableswitch_info;
191
                struct {
192
                    jint chosen_pair_index; /* actually chosen pair index (0-based)
193
                                             * if chosen_pair_index == pairs_total then
194
                                             * the 'default' branch is taken
195
                                             */
196
                    jint pairs_total;       /* total number of lookupswitch pairs */
197
                } lookupswitch_info;
198
            } u;
199
        } instruction;
200
        
201
        struct {
202
            char *begin;                /* beginning of dump buffer, 
203
                                           see below for format */
204
            char *end;                  /* end of dump buffer */
205
            jint num_traces;            /* number of traces */
206
            JVMPI_CallTrace *traces;    /* traces of all threads */
207
            jint *threads_status;       /* status of all threads */
208
        } monitor_dump;
209

    
210
        struct {
211
            const char *name;           /* name of raw monitor */
212
            JVMPI_RawMonitor id;        /* id */
213
        } raw_monitor;
214

    
215
        struct {
216
            jobjectID object;           /* Java object */
217
        } monitor;
218

    
219
        struct {
220
            jobjectID object;           /* Java object */
221
            jlong timeout;              /* timeout period */
222
        } monitor_wait;
223

    
224
        struct {
225
            jlong used_objects;
226
            jlong used_object_space;
227
            jlong total_object_space;
228
        } gc_info;
229

    
230
        struct {
231
            jint data_len;
232
            char *data;
233
        } object_dump;
234
    } u;
235
} JVMPI_Event;
236

    
237
/* interface functions */
238
typedef struct {
239
    jint version;   /* JVMPI version */
240
    
241
    /* ------interface implemented by the profiler------ */
242

    
243
    /**
244
     * Function called by the JVM to notify an event. 
245
     */
246
    void (*NotifyEvent)(JVMPI_Event *event);
247
  
248
    /* ------interface implemented by the JVM------ */
249
    
250
    /**
251
     * Function called by the profiler to enable/disable/send notification 
252
     * for a particular event type.  
253
     * 
254
     * event_type - event_type
255
     * arg - event specific arg
256
     *
257
     * return JVMPI_NOT_AVAILABLE, JVMPI_SUCCESS or JVMPI_FAIL
258
     */
259
    jint (*EnableEvent)(jint event_type, void *arg);
260
    jint (*DisableEvent)(jint event_type, void *arg);
261
    jint (*RequestEvent)(jint event_type, void *arg);
262
  
263
    /**
264
     * Function called by the profiler to get a stack
265
     * trace from the JVM.
266
     *
267
     * trace - trace data structure to be filled
268
     * depth - maximum depth of the trace.
269
     */
270
    void (*GetCallTrace)(JVMPI_CallTrace *trace, jint depth);
271

    
272
    /**
273
     * Function called by profiler when it wants to exit/stop.
274
     */
275
    void (*ProfilerExit)(jint);
276

    
277
    /**
278
     * Utility functions provided by the JVM.
279
     */
280
    JVMPI_RawMonitor (*RawMonitorCreate)(char *lock_name);
281
    void (*RawMonitorEnter)(JVMPI_RawMonitor lock_id);
282
    void (*RawMonitorExit)(JVMPI_RawMonitor lock_id);
283
    void (*RawMonitorWait)(JVMPI_RawMonitor lock_id, jlong ms);
284
    void (*RawMonitorNotifyAll)(JVMPI_RawMonitor lock_id);
285
    void (*RawMonitorDestroy)(JVMPI_RawMonitor lock_id);
286

    
287
    /**
288
     * Function called by the profiler to get the current thread's CPU time.
289
     *
290
     * return time in nanoseconds;
291
     */
292
    jlong (*GetCurrentThreadCpuTime)(void);
293

    
294
    void (*SuspendThread)(JNIEnv *env);
295
    void (*ResumeThread)(JNIEnv *env);
296
    jint (*GetThreadStatus)(JNIEnv *env);
297
    jboolean (*ThreadHasRun)(JNIEnv *env);
298

    
299
    /* This function can be called safely only after JVMPI_EVENT_VM_INIT_DONE
300
       notification by the JVM. */
301
    jint (*CreateSystemThread)(char *name, jint priority, void (*f)(void *));
302

    
303
    /* thread local storage access functions to avoid locking in time 
304
       critical functions */
305
    void (*SetThreadLocalStorage)(JNIEnv *env_id, void *ptr);
306
    void * (*GetThreadLocalStorage)(JNIEnv *env_id);
307

    
308
    /* control GC */
309
    void (*DisableGC)(void);
310
    void (*EnableGC)(void);
311
    void (*RunGC)(void);
312

    
313
    jobjectID (*GetThreadObject)(JNIEnv *env);
314
    jobjectID (*GetMethodClass)(jmethodID mid);
315

    
316
    /* JNI <-> jobject conversions */
317
    jobject   (*jobjectID2jobject)(jobjectID jid);
318
    jobjectID (*jobject2jobjectID)(jobject jobj);
319

    
320
    void (*SuspendThreadList)
321
      (jint reqCount, JNIEnv **reqList, jint *results);
322
    void (*ResumeThreadList)
323
      (jint reqCount, JNIEnv **reqList, jint *results);
324
} JVMPI_Interface;
325

    
326
/* type of argument passed to RequestEvent for heap dumps */
327
typedef struct {
328
    jint heap_dump_level;
329
} JVMPI_HeapDumpArg;
330

    
331
/**********************************************************************
332
 * Constants and formats used in JVM Profiler Interface.
333
 **********************************************************************/
334
/*
335
 * Event type constants.
336
 */
337
#define JVMPI_EVENT_METHOD_ENTRY            ((jint)1) 
338
#define JVMPI_EVENT_METHOD_ENTRY2           ((jint)2) 
339
#define JVMPI_EVENT_METHOD_EXIT             ((jint)3) 
340

    
341
#define JVMPI_EVENT_OBJECT_ALLOC            ((jint)4) 
342
#define JVMPI_EVENT_OBJECT_FREE             ((jint)5) 
343
#define JVMPI_EVENT_OBJECT_MOVE             ((jint)6) 
344

    
345
#define JVMPI_EVENT_COMPILED_METHOD_LOAD    ((jint)7) 
346
#define JVMPI_EVENT_COMPILED_METHOD_UNLOAD  ((jint)8) 
347

    
348
#define JVMPI_EVENT_INSTRUCTION_START       ((jint)9) 
349

    
350
#define JVMPI_EVENT_THREAD_START           ((jint)33) 
351
#define JVMPI_EVENT_THREAD_END             ((jint)34) 
352

    
353
#define JVMPI_EVENT_CLASS_LOAD_HOOK        ((jint)35) 
354

    
355
#define JVMPI_EVENT_HEAP_DUMP                     ((jint)37) 
356
#define JVMPI_EVENT_JNI_GLOBALREF_ALLOC           ((jint)38) 
357
#define JVMPI_EVENT_JNI_GLOBALREF_FREE            ((jint)39) 
358
#define JVMPI_EVENT_JNI_WEAK_GLOBALREF_ALLOC      ((jint)40) 
359
#define JVMPI_EVENT_JNI_WEAK_GLOBALREF_FREE       ((jint)41) 
360
#define JVMPI_EVENT_CLASS_LOAD                    ((jint)42) 
361
#define JVMPI_EVENT_CLASS_UNLOAD                  ((jint)43) 
362
#define JVMPI_EVENT_DATA_DUMP_REQUEST             ((jint)44) 
363
#define JVMPI_EVENT_DATA_RESET_REQUEST            ((jint)45) 
364

    
365
#define JVMPI_EVENT_JVM_INIT_DONE          ((jint)46) 
366
#define JVMPI_EVENT_JVM_SHUT_DOWN          ((jint)47) 
367

    
368
#define JVMPI_EVENT_ARENA_NEW              ((jint)48)
369
#define JVMPI_EVENT_ARENA_DELETE           ((jint)49)
370

    
371
#define JVMPI_EVENT_OBJECT_DUMP            ((jint)50)
372

    
373
#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTER   ((jint)51)
374
#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTERED ((jint)52)
375
#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_EXIT    ((jint)53)
376
#define JVMPI_EVENT_MONITOR_CONTENDED_ENTER       ((jint)54)
377
#define JVMPI_EVENT_MONITOR_CONTENDED_ENTERED     ((jint)55)
378
#define JVMPI_EVENT_MONITOR_CONTENDED_EXIT        ((jint)56)
379
#define JVMPI_EVENT_MONITOR_WAIT                  ((jint)57)
380
#define JVMPI_EVENT_MONITOR_WAITED                ((jint)58)
381
#define JVMPI_EVENT_MONITOR_DUMP                  ((jint)59)
382

    
383
#define JVMPI_EVENT_GC_START                      ((jint)60)
384
#define JVMPI_EVENT_GC_FINISH                     ((jint)61)
385

    
386
#define JVMPI_MAX_EVENT_TYPE_VAL                  ((jint)61)
387

    
388
/* old definitions, to be removed */
389
#define JVMPI_EVENT_LOAD_COMPILED_METHOD          ((jint)7) 
390
#define JVMPI_EVENT_UNLOAD_COMPILED_METHOD        ((jint)8) 
391
#define JVMPI_EVENT_NEW_ARENA                     ((jint)48)
392
#define JVMPI_EVENT_DELETE_ARENA                  ((jint)49)
393
#define JVMPI_EVENT_DUMP_DATA_REQUEST             ((jint)44) 
394
#define JVMPI_EVENT_RESET_DATA_REQUEST            ((jint)45) 
395
#define JVMPI_EVENT_OBJ_ALLOC                     ((jint)4) 
396
#define JVMPI_EVENT_OBJ_FREE                      ((jint)5) 
397
#define JVMPI_EVENT_OBJ_MOVE                      ((jint)6) 
398

    
399
#define JVMPI_REQUESTED_EVENT                     ((jint)0x10000000)
400

    
401

    
402
 
403
/* 
404
 * enabling/disabling event notification.
405
 */
406
/* results */
407
#define JVMPI_SUCCESS                    ((jint)0)
408
#define JVMPI_NOT_AVAILABLE              ((jint)1)
409
#define JVMPI_FAIL                       ((jint)-1)
410

    
411
/*
412
 * Thread status
413
 */
414
enum {
415
    JVMPI_THREAD_RUNNABLE = 1,
416
    JVMPI_THREAD_MONITOR_WAIT,
417
    JVMPI_THREAD_CONDVAR_WAIT
418
};
419

    
420
#define JVMPI_THREAD_SUSPENDED        0x8000
421
#define JVMPI_THREAD_INTERRUPTED      0x4000
422

    
423
/*
424
 * Thread priority
425
 */
426
#define JVMPI_MINIMUM_PRIORITY            1
427
#define JVMPI_MAXIMUM_PRIORITY            10
428
#define JVMPI_NORMAL_PRIORITY            5
429

    
430
/*
431
 * Object type constants.
432
 */
433
#define JVMPI_NORMAL_OBJECT                 ((jint)0)
434
#define JVMPI_CLASS                         ((jint)2)
435
#define JVMPI_BOOLEAN                         ((jint)4)
436
#define JVMPI_CHAR                       ((jint)5)
437
#define JVMPI_FLOAT                      ((jint)6)
438
#define JVMPI_DOUBLE                     ((jint)7)
439
#define JVMPI_BYTE                       ((jint)8)
440
#define JVMPI_SHORT                      ((jint)9)
441
#define JVMPI_INT                        ((jint)10)
442
#define JVMPI_LONG                       ((jint)11)    
443

    
444
/*
445
 * Monitor dump constants.
446
 */
447

    
448
#define JVMPI_MONITOR_JAVA          0x01
449
#define JVMPI_MONITOR_RAW           0x02
450

    
451
/*
452
 * Heap dump constants.
453
 */
454
#define JVMPI_GC_ROOT_UNKNOWN       0xff
455
#define JVMPI_GC_ROOT_JNI_GLOBAL    0x01
456
#define JVMPI_GC_ROOT_JNI_LOCAL     0x02
457
#define JVMPI_GC_ROOT_JAVA_FRAME    0x03
458
#define JVMPI_GC_ROOT_NATIVE_STACK  0x04
459
#define JVMPI_GC_ROOT_STICKY_CLASS  0x05
460
#define JVMPI_GC_ROOT_THREAD_BLOCK  0x06
461
#define JVMPI_GC_ROOT_MONITOR_USED  0x07
462
#define JVMPI_GC_ROOT_THREAD_OBJ    0x08
463

    
464
#define JVMPI_GC_CLASS_DUMP         0x20
465
#define JVMPI_GC_INSTANCE_DUMP      0x21 
466
#define JVMPI_GC_OBJ_ARRAY_DUMP     0x22
467
#define JVMPI_GC_PRIM_ARRAY_DUMP    0x23
468

    
469
/*
470
 * Dump levels
471
 */
472
#define JVMPI_DUMP_LEVEL_0    ((jint)0)
473
#define JVMPI_DUMP_LEVEL_1    ((jint)1)
474
#define JVMPI_DUMP_LEVEL_2    ((jint)2)
475

    
476
/* Types used in dumps -
477
 *
478
 * u1: 1 byte
479
 * u2: 2 bytes
480
 * u4: 4 bytes
481
 * u8: 8 bytes
482
 *
483
 * ty: u1 where:
484
 *     JVMPI_CLASS:   object
485
 *     JVMPI_BOOLEAN: boolean
486
 *     JVMPI_CHAR:    char
487
 *     JVMPI_FLOAT:   float
488
 *     JVMPI_DOUBLE:  double
489
 *     JVMPI_BYTE:    byte
490
 *     JVMPI_SHORT:   short
491
 *     JVMPI_INT:     int
492
 *     JVMPI_LONG:    long
493
 *
494
 * vl: values, exact type depends on the type of the value:
495
 *     JVMPI_BOOLEAN & JVMPI_BYTE:   u1
496
 *     JVMPI_SHORT & JVMPI_CHAR:     u2
497
 *     JVMPI_INT & JVMPI_FLOAT:      u4
498
 *     JVMPI_LONG & JVMPI_DOUBLE:    u8
499
 *     JVMPI_CLASS:                  jobjectID
500
 */
501

    
502
/* Format of the monitor dump buffer:
503
 *
504
 *               u1                          monitor type
505
 *
506
 *               JVMPI_MONITOR_JAVA          Java monitor
507
 *
508
 *                          jobjectID        object
509
 *                          JNIEnv *         owner thread
510
 *                          u4               entry count
511
 *                          u4               # of threads waiting to enter
512
 *                          [JNIEnv *]*      threads waiting to enter
513
 *                          u4               # of threads waiting to be notified
514
 *                          [JNIEnv *]*      threads waiting to be notified
515
 *
516
 *               JVMPI_MONITOR_RAW           raw monitor
517
 *
518
 *                          char *           name
519
 *                          JVMPI_RawMonitor raw monitor
520
 *                          JNIEnv *         owner thread
521
 *                          u4               entry count
522
 *                          u4               # of threads waiting to enter
523
 *                          [JNIEnv *]*      threads waiting to enter
524
 *                          u4               # of threads waiting to be notified
525
 *                          [JNIEnv *]*      threads waiting to be notified
526
 */
527

    
528
/* Format of the heap dump buffer depends on the dump level 
529
 * specified in the JVMPI_HeapDumpArg passed to RequestEvent as arg. 
530
 * The default is JVMPI_DUMP_LEVEL_2.
531
 *
532
 * JVMPI_DUMP_LEVEL_0:
533
 * 
534
 *               u1                          object type (JVMPI_CLASS ...)
535
 *               jobjectID                   object
536
 *
537
 * JVMPI_DUMP_LEVEL_1 and JVMPI_DUMP_LEVEL_2 use the following format:  
538
 * In the case of JVMPI_DUMP_LEVEL_1 the values of primitive fields in object 
539
 * instance dumps , the values of primitive statics in class dumps and the 
540
 * values of primitive arrays are excluded.  JVMPI_DUMP_LEVEL_2 includes the
541
 * primitive values.
542
 *
543
 *               u1                          record type
544
 *
545
 *               JVMPI_GC_ROOT_UNKNOWN       unknown root
546
 *
547
 *                          jobjectID        object
548
 *
549
 *               JVMPI_GC_ROOT_JNI_GLOBAL    JNI global ref root
550
 *
551
 *                          jobjectID        object
552
 *                          jobject          JNI global reference
553
 *
554
 *               JVMPI_GC_ROOT_JNI_LOCAL     JNI local ref
555
 *
556
 *                          jobjectID        object
557
 *                          JNIEnv *         thread
558
 *                          u4               frame # in stack trace (-1 for empty)
559
 *
560
 *               JVMPI_GC_ROOT_JAVA_FRAME    Java stack frame
561
 *
562
 *                          jobjectID        object
563
 *                          JNIEnv *         thread
564
 *                          u4               frame # in stack trace (-1 for empty)
565
 *
566
 *               JVMPI_GC_ROOT_NATIVE_STACK  Native stack
567
 *
568
 *                          jobjectID        object
569
 *                          JNIEnv *         thread
570
 *
571
 *               JVMPI_GC_ROOT_STICKY_CLASS  System class
572
 *
573
 *                          jobjectID        class object
574
 *
575
 *               JVMPI_GC_ROOT_THREAD_BLOCK  Reference from thread block
576
 *
577
 *                          jobjectID        thread object
578
 *                          JNIEnv *         thread
579
 *
580
 *               JVMPI_GC_ROOT_MONITOR_USED  Busy monitor
581
 *
582
 *                          jobjectID        object
583
 *
584
 *               JVMPI_GC_CLASS_DUMP         dump of a class object
585
 *
586
 *                          jobjectID        class
587
 *                          jobjectID        super
588
 *                          jobjectID        class loader
589
 *                          jobjectID        signers
590
 *                          jobjectID        protection domain
591
 *                          jobjectID        class name
592
 *                          void *           reserved
593
 *
594
 *                          u4               instance size (in bytes)
595
 *
596
 *                          [jobjectID]*     interfaces
597
 *
598
 *                          u2               size of constant pool
599
 *                          [u2,             constant pool index,
600
 *                           ty,             type, 
601
 *                           vl]*            value
602
 *
603
 *                          [vl]*            static field values
604
 *
605
 *               JVMPI_GC_INSTANCE_DUMP      dump of a normal object
606
 *
607
 *                          jobjectID        object
608
 *                          jobjectID        class
609
 *                          u4               number of bytes that follow
610
 *                          [vl]*            instance field values (class, followed
611
 *                                           by super, super's super ...)
612
 *
613
 *               JVMPI_GC_OBJ_ARRAY_DUMP     dump of an object array
614
 *
615
 *                          jobjectID        array object
616
 *                          u4               number of elements
617
 *                          jobjectID        element class
618
 *                          [jobjectID]*     elements
619
 *
620
 *               JVMPI_GC_PRIM_ARRAY_DUMP    dump of a primitive array
621
 *
622
 *                          jobjectID        array object
623
 *                          u4               number of elements
624
 *                          ty               element type
625
 *                          [vl]*            elements
626
 *
627
 */
628

    
629
/* Format of the dump received in JVMPI_EVENT_OBJECT_DUMP:
630
 * All the records have JVMPI_DUMP_LEVEL_2 information.
631
 *
632
 *               u1                          record type
633
 *
634
 *                     followed by a:
635
 *
636
 *                          JVMPI_GC_CLASS_DUMP,
637
 *                          JVMPI_GC_INSTANCE_DUMP,
638
 *                          JVMPI_GC_OBJ_ARRAY_DUMP, or
639
 *                          JVMPI_GC_PRIM_ARRAY_DUMP record.
640
 */
641

    
642
#endif /* !_JAVASOFT_JVMPI_H_ */