org.gridkit.jvmtool::hprof-oql-engine

HPROF heap dump parser

License

License

GroupId

GroupId

org.gridkit.jvmtool
ArtifactId

ArtifactId

hprof-oql-engine
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

org.gridkit.jvmtool::hprof-oql-engine
HPROF heap dump parser
Project URL

Project URL

http://code.google.com/p/gridkit/hprof-oql-engine

Download hprof-oql-engine

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.gridkit.jvmtool : hprof-heap jar 0.2

test (3)

Group / Artifact Type Version
junit : junit jar 4.11
org.assertj : assertj-core jar 1.6.0
org.gridkit.lab : jvm-attach-api jar 1.4

Project Modules

There are no modules declared in this project.

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