File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ Or you can depend on the artifacts from maven central, they should be slightly m
4848
4949Others are of course available, see [ maven central] ( https://search.maven.org/artifact/me.bechberger/ap-loader ) .
5050
51+ You can also use [ JBang] ( https://jbang.dev ) to simplify the usage of ap-loader. There are examples in documentation below.
52+
5153Supported Platforms
5254-------------------
5355
@@ -68,7 +70,17 @@ Commands
6870
6971The following is a more in-depth description of the commands of ` java -jar ap-loader.jar ` .
7072
71- Be aware that it is recommended to use run the JVM with the
73+ To run with JBang you can do ` jbang ap-loader@jvm-profiling-tools/ap-loader ` or install it as an application:
74+
75+ ``` sh
76+ jbang app install ap-loader@jvm-profiling-tools/ap-loader
77+ ```
78+
79+ and run it directly with ` ap-loader ` instead of ` java -jar ap-loader.jar ` .
80+
81+ If you want to install a specific ` ap-loader ` rather than latest you can use ` jbang app install me.bechberger:ap-loader-all:<version> ` .
82+
83+ Be aware that it is recommended to run the JVM with the
7284` -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints ` flags.
7385This improves the accuracy of the profiler.
7486
@@ -160,6 +172,12 @@ This can be used to profile a Java process from the start.
160172java -javaagent:ap-loader.jar=start,event=cpu,file=profile.html < java arguments>
161173` ` `
162174
175+ With JBang you can do:
176+
177+ ` ` ` sh
178+ jbang --javaagent:ap-loader@jvm-profiling-tools/ap-loader=start,event=cpu,file=profile.html < java arguments>
179+ ` ` `
180+
163181See the [GitHub page of async-profiler](https://github.com/jvm-profiling-tools/async-profiler) for more details.
164182
165183Usage in Java Code
You can’t perform that action at this time.
0 commit comments