src/share/vm/services/heapDumper.cpp

Print this page




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 # include "incls/_precompiled.incl"
  26 # include "incls/_heapDumper.cpp.incl"


















  27 
  28 /*
  29  * HPROF binary format - description copied from:
  30  *   src/share/demo/jvmti/hprof/hprof_io.c
  31  *
  32  *
  33  *  header    "JAVA PROFILE 1.0.1" or "JAVA PROFILE 1.0.2"
  34  *            (0-terminated)
  35  *
  36  *  u4        size of identifiers. Identifiers are used to represent
  37  *            UTF8 strings, objects, stack traces, etc. They usually
  38  *            have the same size as host pointers. For example, on
  39  *            Solaris and Win32, the size is 4.
  40  * u4         high word
  41  * u4         low word    number of milliseconds since 0:00 GMT, 1/1/70
  42  * [record]*  a sequence of records.
  43  *
  44  *
  45  * Record format:
  46  *




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/symbolTable.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "classfile/vmSymbols.hpp"
  29 #include "gc_implementation/shared/vmGCOperations.hpp"
  30 #include "memory/genCollectedHeap.hpp"
  31 #include "memory/universe.hpp"
  32 #include "oops/objArrayKlass.hpp"
  33 #include "runtime/javaCalls.hpp"
  34 #include "runtime/jniHandles.hpp"
  35 #include "runtime/reflectionUtils.hpp"
  36 #include "runtime/vframe.hpp"
  37 #include "runtime/vmThread.hpp"
  38 #include "runtime/vm_operations.hpp"
  39 #include "services/heapDumper.hpp"
  40 #include "services/threadService.hpp"
  41 #include "utilities/ostream.hpp"
  42 #ifndef SERIALGC
  43 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
  44 #endif
  45 
  46 /*
  47  * HPROF binary format - description copied from:
  48  *   src/share/demo/jvmti/hprof/hprof_io.c
  49  *
  50  *
  51  *  header    "JAVA PROFILE 1.0.1" or "JAVA PROFILE 1.0.2"
  52  *            (0-terminated)
  53  *
  54  *  u4        size of identifiers. Identifiers are used to represent
  55  *            UTF8 strings, objects, stack traces, etc. They usually
  56  *            have the same size as host pointers. For example, on
  57  *            Solaris and Win32, the size is 4.
  58  * u4         high word
  59  * u4         low word    number of milliseconds since 0:00 GMT, 1/1/70
  60  * [record]*  a sequence of records.
  61  *
  62  *
  63  * Record format:
  64  *