Skip to content

A minimal implementation of a Truffle-based language for analysing heap dumps.

Notifications You must be signed in to change notification settings

daemontus/heap-language

Repository files navigation

Heap Language

A minimal implementation of a Truffle-based language for analysing heap dumps.

To tun tests, execute:

./gradlew check

Producing coverage reports is possible using ./gradlew jacocoTestReport.

Benchmarks

JMH Benchmarks

To run a selected set of benchmarks using JMH, execute:

./gradlew :jmh-benchmark:jmh

If you wish to generate a runnable JMH jar with all benchmarks, you can do so using:

./gradlew :jmh-benchmark:shadowJar

which will create the jar in ./jmh-benchmark/build/libs/jmh-benchmark-all.jar.

Benchmark heap dump

To generate a test heap, execute:

./gradlew benchmarks:dump-generator:run

This will generate a predictable medium-sized heap dump in ./benchmarks/dumps/tumor_cell.hprof.

Custom benchmarks

To run a benchmark script file, execute:

./gradlew benchmarks:runner:bench -Dscript=path/to/oql.js -Dheap=path/to/heap/dump.hprof

Note that heap defaults to the benchmark heap dump specified above and that for now, the paths are relative to the benchmark/runner directory, not the root of the project.

You can choose which implementation of OQL should be used by specifying -Dengine=original or -Dengine=truffle. Default is truffle.

If you are running on GraalVM, you can dump compilation graphs to IGV automatically by adding -Digv=on.

The project should automatically use Graal compiler for JavaScript and Heap Language on Hotspot JDKs with version 11 and above. If you don't want this (run JS using Nashorn), specify -Dgraal=off.

Prepared benchmarks

There are some prepared benchmarks in benchmarks/scripts/. These typically have a custom gradle task benchXY associated with them where you don't have to specify the heap or the script:

./gradlew benchmarks:runner:bench01

Some of these benchmarks are also re-implmeneted using fully native Java code, in which case -Dengine=native is also available.

About

A minimal implementation of a Truffle-based language for analysing heap dumps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published