From 686d706030ff2948e7f87e50648e41c274b791fa 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:09:21 -0600 Subject: [PATCH] [release/v1.2] docs: update pyroscope.java JVM configuration (#1801) 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 abe52d718e..912a29ac4a 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: