From 5252bd724554e51b8417613a08bbe1184ca02474 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:04:45 -0600 Subject: [PATCH] [release/v1.4] docs: update pyroscope.java JVM configuration (#1803) Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> Co-authored-by: Marc Sanmiquel --- .../reference/components/pyroscope/pyroscope.java.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/sources/reference/components/pyroscope/pyroscope.java.md b/docs/sources/reference/components/pyroscope/pyroscope.java.md index 08fcb16a6f..e94384544c 100644 --- a/docs/sources/reference/components/pyroscope/pyroscope.java.md +++ b/docs/sources/reference/components/pyroscope/pyroscope.java.md @@ -23,6 +23,16 @@ pyroscope.java "LABEL" { } ``` +## Target JVM configuration + +When you use `pyroscope.java` to profile Java applications, you can configure the target JVMs with some command line flags that ensure accurate profiling, especially for inlined methods. Add the following flags to your Java application's startup command: + +```java +-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints +``` + +For more details, refer to [Restrictions/Limitations](https://github.com/async-profiler/async-profiler?tab=readme-ov-file#restrictionslimitations) in the async-profiler documentation. + ## Arguments The following arguments are supported: