diff --git a/.gitignore b/.gitignore index 6e5ce28..b3b249c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ # Ignore Gradle build output directory build -app/out/ +out/ diff --git a/README.md b/README.md index 13df1f3..affc19f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,25 @@ The goal of this project is being able to track usage of off-heap memory and det The detection is made via a Java agent implemented by using [Byte Buddy](https://bytebuddy.net/) library. -### Get started +### Get started + +1. Create the agent jar file using this command: + + ``` + ./gradlew jar + ``` + ` + +2. Launch the agent along with your Java application by adding these options +to the Java command line: + +``` + -javaagent:$PWD/build/libs/unsafe-tracker-.jar \ + -Xbootclasspath/a:$PWD/build/libs/unsafe-tracker-.jar \` +``` + + +### Development 1. Compile the project using this command @@ -21,3 +39,8 @@ The detection is made via a Java agent implemented by using [Byte Buddy](https:/ ``` bash run.sh ``` + + +### Credits + +Thanks to Rafael Winterhalter for advising about the use of the [Byte Buddy](https://github.com/raphw/byte-buddy).