hprof.h

来自「This is a resource based on j2me embedde」· C头文件 代码 · 共 416 行 · 第 1/2 页

H
416
字号
 *                          id         object ID *                          u4         thread serial number * *               HPROF_GC_ROOT_STICKY_CLASS    System class * *                          id         object ID * *               HPROF_GC_ROOT_THREAD_BLOCK    Reference from thread block * *                          id         object ID *                          u4         thread serial number * *               HPROF_GC_ROOT_MONITOR_USED    Busy monitor * *                          id         object ID * *               HPROF_GC_CLASS_DUMP           dump of a class object * *                          id         class object ID *                          u4         stack trace serial number *                          id         super class object ID *                          id         class loader object ID *                          id         signers object ID *                          id         protection domain object ID *                          id         reserved *                          id         reserved * *                          u4         instance size (in bytes) * *                          u2         size of constant pool *                          [u2,       constant pool index, *                           ty,       type  *                                     2:  object *                                     4:  boolean *                                     5:  char *                                     6:  float *                                     7:  double *                                     8:  byte *                                     9:  short *                                     10: int *                                     11: long *                           vl]*      and value * *                          u2         number of static fields *                          [id,       static field name, *                           ty,       type, *                           vl]*      and value * *                          u2         number of inst. fields (not inc. super) *                          [id,       instance field name, *                           ty]*      type * *               HPROF_GC_INSTANCE_DUMP        dump of a normal object * *                          id         object ID *                          u4         stack trace serial number *                          id         class object ID *                          u4         number of bytes that follow *                          [vl]*      instance field values (class, followed *                                     by super, super's super ...) * *               HPROF_GC_OBJ_ARRAY_DUMP       dump of an object array * *                          id         array object ID *                          u4         stack trace serial number *                          u4         number of elements *                          id         element class ID *                          [id]*      elements * *               HPROF_GC_PRIM_ARRAY_DUMP      dump of a primitive array * *                          id         array object ID *                          u4         stack trace serial number *                          u4         number of elements *                          u1         element type *                                     4:  boolean array *                                     5:  char array *                                     6:  float array *                                     7:  double array *                                     8:  byte array *                                     9:  short array *                                     10: int array *                                     11: long array *                          [u1]*      elements * * HPROF_CPU_SAMPLES        a set of sample traces of running threads * *                u4        total number of samples *                u4        # of traces *               [u4        # of samples *                u4]*      stack trace serial number * * HPROF_CONTROL_SETTINGS   the settings of on/off switches * *                u4        0x00000001: alloc traces on/off *                          0x00000002: cpu sampling on/off *                u2        stack trace depth * */#define HPROF_UTF8                    0x01#define HPROF_LOAD_CLASS              0x02#define HPROF_UNLOAD_CLASS            0x03#define HPROF_FRAME                   0x04#define HPROF_TRACE                   0x05#define HPROF_ALLOC_SITES             0x06#define HPROF_HEAP_SUMMARY            0x07#define HPROF_START_THREAD            0x0a#define HPROF_END_THREAD              0x0b#define HPROF_HEAP_DUMP               0x0c#define HPROF_CPU_SAMPLES             0x0d#define HPROF_CONTROL_SETTINGS        0x0e#define HPROF_LOCKSTATS_WAIT_TIME     0x10#define HPROF_LOCKSTATS_HOLD_TIME     0x11/*  * Heap dump constants */#define HPROF_GC_ROOT_UNKNOWN       0xff#define HPROF_GC_ROOT_JNI_GLOBAL    0x01#define HPROF_GC_ROOT_JNI_LOCAL     0x02#define HPROF_GC_ROOT_JAVA_FRAME    0x03#define HPROF_GC_ROOT_NATIVE_STACK  0x04#define HPROF_GC_ROOT_STICKY_CLASS  0x05#define HPROF_GC_ROOT_THREAD_BLOCK  0x06#define HPROF_GC_ROOT_MONITOR_USED  0x07#define HPROF_GC_ROOT_THREAD_OBJ    0x08#define HPROF_GC_CLASS_DUMP         0x20#define HPROF_GC_INSTANCE_DUMP      0x21 #define HPROF_GC_OBJ_ARRAY_DUMP     0x22#define HPROF_GC_PRIM_ARRAY_DUMP    0x23/* When the VM is collected via a socket to the profiling client, the * client may send the VM a set of commands. The commands have the  * following format: * * u1         a TAG denoting the type of the record * u4         a serial number * u4         number of bytes *remaining* in the record. Note that *            this number excludes the tag and the length field itself. * [u1]*      BODY of the record (a sequence of bytes) *//* The following commands are presently supported: * * TAG           BODY       notes * ---------------------------------------------------------- * HPROF_CMD_GC             force a GC. * * HPROF_CMD_DUMP_HEAP      obtain a heap dump * * HPROF_CMD_ALLOC_SITES    obtain allocation sites * *               u2         flags 0x0001: incremental vs. complete *                                0x0002: sorted by allocation vs. live *                                0x0004: whether to force a GC *               u4         cutoff ratio (0.0 ~ 1.0) * * HPROF_CMD_HEAP_SUMMARY   obtain heap summary * * HPROF_CMD_DUMP_TRACES    obtain all newly created traces * * HPROF_CMD_CPU_SAMPLES    obtain a HPROF_CPU_SAMPLES record * *               u2         ignored for now *               u4         cutoff ratio (0.0 ~ 1.0) * * HPROF_CMD_CONTROL        changing settings * *               u2         0x0001: alloc traces on *                          0x0002: alloc traces off * *                          0x0003: CPU sampling on * *                                  id:   thread object id (NULL for all) * *                          0x0004: CPU sampling off * *                                  id:   thread object id (NULL for all) * *                          0x0005: CPU sampling clear * *                          0x0006: clear alloc sites info * *                          0x0007: set max stack depth in CPU samples *                                  and alloc traces * *                                  u2:   new depth */#define HPROF_CMD_GC           0x01#define HPROF_CMD_DUMP_HEAP    0x02#define HPROF_CMD_ALLOC_SITES  0x03#define HPROF_CMD_HEAP_SUMMARY 0x04#define HPROF_CMD_EXIT         0x05#define HPROF_CMD_DUMP_TRACES  0x06#define HPROF_CMD_CPU_SAMPLES  0x07#define HPROF_CMD_CONTROL      0x08/* flags used in output of allocation sites */#define HPROF_SITE_DUMP_INCREMENTAL 0x01#define HPROF_SITE_SORT_BY_ALLOC    0x02#define HPROF_SITE_FORCE_GC         0x04#endif /*HPROF_H_*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?