/jmtrace

Primary LanguageJava

Prerequisite

  • OpenJDK 11
  • Gradle 7.2

Build

Just use gradle

# build and create an all-in-one jar
gradle build

# the output jar will be app/build/libs/app-all.jar
ls app/build/libs/app-all.jar

# (Optional) build examples jar
cd examples && gradle build && cd -

Test

We have written some test cases using junit. Use gradle to run those tests.

gradle test --info

The testcases are located in app/src/test/java/cn/xxxxxx/iser/jmtrace/testcases

Usage

You can use the script ./jmtrace

./jmtrace -jar <xxx.jar>

Or make

# build examples jar
make build-examples

# run with examples
make run-with WITH=app1 ARGS=""

Resource

Java agent and ASM

JVM Spec