org.gridkit.jvmtool::heaplib-pom

HeapLib parent pom

License

License

GroupId

GroupId

org.gridkit.jvmtool
ArtifactId

ArtifactId

heaplib-pom
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

pom
Description

Description

org.gridkit.jvmtool::heaplib-pom
HeapLib parent pom
Project URL

Project URL

http://code.google.com/p/gridkit/heaplib-pom
Source Code Management

Source Code Management

https://github.com/aragozin/heaplib

Download heaplib-pom

Filename Size
heaplib-pom-0.2.pom 6 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/org.gridkit.jvmtool/heaplib-pom/ -->
<dependency>
    <groupId>org.gridkit.jvmtool</groupId>
    <artifactId>heaplib-pom</artifactId>
    <version>0.2</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.gridkit.jvmtool/heaplib-pom/
implementation 'org.gridkit.jvmtool:heaplib-pom:0.2'
// https://jarcasting.com/artifacts/org.gridkit.jvmtool/heaplib-pom/
implementation ("org.gridkit.jvmtool:heaplib-pom:0.2")
'org.gridkit.jvmtool:heaplib-pom:pom:0.2'
<dependency org="org.gridkit.jvmtool" name="heaplib-pom" rev="0.2">
  <artifact name="heaplib-pom" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.gridkit.jvmtool', module='heaplib-pom', version='0.2')
)
libraryDependencies += "org.gridkit.jvmtool" % "heaplib-pom" % "0.2"
[org.gridkit.jvmtool/heaplib-pom "0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • hprof-heap
  • hprof-oql-engine
  • heaplib
  • heap-cli

HeapLib

HeapLib a tool/library for analyzing JVM heap dumps. HeapLib is using modified heap parser from Apache NetBeans (same library is used by VisualVM).

Main driver for this project was a need in automated analyzing of heap dump on remote servers.

In addition for original Heap class implementation from NetBeans library this project has an alteranative which:

  • Works with heap dump file without any additional on disk files
  • Process GZip compressed heap dump files directly
  • Cannot calculate retained size or walk object references in backward direction

Besides an API, you can use executable jar for console to execute OQL/JavaScript.

Using HeapLib from Java code

HeapLib is a library you can use from Java code. You can find few examples in hprof-heap/src/test/java/org/gridkit/jvmtool/heapdump/example/ path formatted as JUnit tests.

Using HeapLib CLI

You can use executable jar to execute OQL/JavaScript scripts from console.

To get executable java build project with mvn clean package. Executable jar would be placed under name heap-cli/target/heap-cli-0.1-SNAPSHOT.jar.

Below few commands support by executable:

  • java -jar heap-cli-*.jar --commands print list of supported command
  • java -jar heap-cli-*.jar histo -d dump.hprof produce class histogram from path
  • java -jar heap-cli-*.jar exec --noindex -d dump.hprof -j script.oql execute script on heap dump open in diskless mode (no on-disk indexes should be generated)

Few script examples could be would under hprof-oql-engine/src/test/resources/oql/ path.

Versions

Version
0.2
0.1