hprof.h

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

H
416
字号
/* * @(#)hprof.h	1.13 06/10/10 * * Copyright  1990-2008 Sun Microsystems, Inc. All Rights Reserved.   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER   *    * This program is free software; you can redistribute it and/or   * modify it under the terms of the GNU General Public License version   * 2 only, as published by the Free Software Foundation.    *    * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   * General Public License version 2 for more details (a copy is   * included at /legal/license.txt).    *    * You should have received a copy of the GNU General Public License   * version 2 along with this work; if not, write to the Free Software   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA   * 02110-1301 USA    *    * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa   * Clara, CA 95054 or visit www.sun.com if you need additional   * information or have any questions.  * */#ifndef _HPROF_H_#define _HPROF_H_#include "hprof_md.h"#include "jni.h"#include "jvmpi.h"#include "jlong.h"#include "hprof_global.h"#include "hprof_setup.h"#include "hprof_trace.h"#include "hprof_thread.h"#include "hprof_heapdump.h"#include "hprof_site.h"#include "hprof_io.h"#include "hprof_listener.h"#include "hprof_cpu.h"#include "hprof_monitor.h"#include "hprof_class.h"#include "hprof_method.h"#include "hprof_jni.h"#include "hprof_object.h"#include "hprof_name.h"#include "hprof_sys.h"#include "hprof_gc.h"/* * -Xhprof binary format: (result either written to a file or sent over * the network). *  * WARNING: This format is still under development, and is subject to * change without notice. * *  header    "JAVA PROFILE 1.0.1" (0-terminated) *  u4        size of identifiers. Identifiers are used to represent *            UTF8 strings, objects, stack traces, etc. They usually *            have the same size as host pointers. For example, on *            Solaris and Win32, the size is 4. * u4         high word  * u4         low word    number of milliseconds since 0:00 GMT, 1/1/70 * [record]*  a sequence of records. *//* * Record format: * * u1         a TAG denoting the type of the record * u4         number of *microseconds* since the time stamp in the *            header. (wraps around in a little more than an hour) * 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 TAGs are supported: * * TAG           BODY       notes *---------------------------------------------------------- * HPROF_UTF8               a UTF8-encoded name   * *               id         name ID *               [u1]*      UTF8 characters (no trailing zero) * * HPROF_LOAD_CLASS         a newly loaded class * *                u4        class serial number (> 0) *                id        class object ID *                u4        stack trace serial number *                id        class name ID * * HPROF_UNLOAD_CLASS       an unloading class * *                u4        class serial_number * * HPROF_FRAME              a Java stack frame * *                id        stack frame ID *                id        method name ID *                id        method signature ID *                id        source file name ID *                u4        class serial number *                i4        line number. >0: normal *                                       -1: unknown *                                       -2: compiled method *                                       -3: native method * * HPROF_TRACE              a Java stack trace * *               u4         stack trace serial number *               u4         thread serial number *               u4         number of frames *               [id]*      stack frame IDs * * * HPROF_ALLOC_SITES        a set of heap allocation sites, obtained after GC * *               u2         flags 0x0001: incremental vs. complete *                                0x0002: sorted by allocation vs. live *                                0x0004: whether to force a GC *               u4         cutoff ratio *               u4         total live bytes *               u4         total live instances *               u8         total bytes allocated *               u8         total instances allocated *               u4         number of sites that follow *               [u1        is_array: 0:  normal object *                                    2:  object array *                                    4:  boolean array *                                    5:  char array *                                    6:  float array *                                    7:  double array *                                    8:  byte array *                                    9:  short array *                                    10: int array *                                    11: long array *                u4        class serial number (may be zero during startup) *                u4        stack trace serial number *                u4        number of bytes alive *                u4        number of instances alive *                u4        number of bytes allocated *                u4]*      number of instance allocated * * HPROF_START_THREAD       a newly started thread. * *               u4         thread serial number (> 0) *               id         thread object ID *               u4         stack trace serial number *               id         thread name ID *               id         thread group name ID *               id         thread group parent name ID * * HPROF_END_THREAD         a terminating thread.  * *               u4         thread serial number * * HPROF_HEAP_SUMMARY       heap summary * *               u4         total live bytes *               u4         total live instances *               u8         total bytes allocated *               u8         total instances allocated * * HPROF_HEAP_DUMP          denote a heap dump * *               [heap dump sub-records]* * *                          There are four kinds of heap dump sub-records: * *               u1         sub-record type * *               HPROF_GC_ROOT_UNKNOWN         unknown root * *                          id         object ID * *               HPROF_GC_ROOT_THREAD_OBJ      thread object * *                          id         thread object ID  (may be 0 for a *                                     thread newly attached through JNI) *                          u4         thread sequence number *                          u4         stack trace sequence number * *               HPROF_GC_ROOT_JNI_GLOBAL      JNI global ref root * *                          id         object ID *                          id         JNI global ref ID * *               HPROF_GC_ROOT_JNI_LOCAL       JNI local ref * *                          id         object ID *                          u4         thread serial number *                          u4         frame # in stack trace (-1 for empty) * *               HPROF_GC_ROOT_JAVA_FRAME      Java stack frame * *                          id         object ID *                          u4         thread serial number *                          u4         frame # in stack trace (-1 for empty) * *               HPROF_GC_ROOT_NATIVE_STACK    Native stack *

⌨️ 快捷键说明

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