Based on async-profiler 2.8.3
This is not a fork of async-profiler. This is a work derived from async-profiler but tailored very specifically for Datadog needs. If you need a full-fledged Java profiler head back to async-profiler
!TODO!
- This project contains Java code and is built by gradle, as such, you need to install a JDK in order to build it. Run
brew install openjdk
to install it on MacOS. If building and testing on Apple Silicon (M1+), be sure to install an aarch64 OpenJDK distribution, otherwise the architecture used for compilation and the JVM based test suite will not match, which means the tests will not be able to load the dynamic library at runtime. - The build requires cmake, which is included in XCode, but can also be installed by running
brew install cmake
Once prerequisites have been installed simple as ./gradlew build
. The resulting artifact is located in ddprof-lib/build/libs/ddprof-<version>.jar
For dd-trace-java you just need to set the java.profiler.jar
project property.
Eg. you can run the gradle build like this - ./gradlew clean -Pjava.profiler.jar=file://<path-to-artifact.jar> :dd-java-agent:shadowJar- which will result in a custom
dd-java-agent.jar` build containing your test version of Java profiler.