Skip to content

Commit 76f6aaa

Browse files
authored
Merge pull request #107 from retronym/topic/fixup-jfr
Fix JVM options for JFR profiling
2 parents 86aa5af + aa4dd5a commit 76f6aaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

project/Profilers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ case object basic extends Profiler("basic") {
3535
def command(outDir: File): String = "-jvmArgs -Xprof -prof hs_comp -prof gc -prof stack -prof hs_rt -prof scala.tools.nsc.ThreadCpuTimeProfiler"
3636
}
3737
case object jfr extends Profiler("jfr") {
38-
def command(outDir: File): String = s"""-prof "jfr:dir=${outDir.getAbsolutePath};stackDepth=1024;postProcessor=scala.bench.JfrToFlamegraph;verbose=true" """
38+
def command(outDir: File): String = s"""-jvmArgs -XX:+UnlockCommercialFeatures -prof "jfr:dir=${outDir.getAbsolutePath};stackDepth=1024;postProcessor=scala.bench.JfrToFlamegraph;verbose=true" """
3939
}
4040
sealed abstract class async(event: String) extends Profiler("async-" + event) {
4141
val framebuf = 33554432
4242
def command(outDir: File): String = {
43-
s"""-prof -jvmArgs -XX:+UnlockCommercialFeatures "async:dir=${outDir.getAbsolutePath};libPath=${System.getenv("ASYNC_PROFILER_DIR")}/build/libasyncProfiler.so;minwidth=1;width=1800;verbose=true;event=$event;filter=${event == "wall"};flat=40;trace=10;framebuf=${framebuf};output=flamegraph,jfr,text" """
43+
s"""-prof "async:dir=${outDir.getAbsolutePath};libPath=${System.getenv("ASYNC_PROFILER_DIR")}/build/libasyncProfiler.so;minwidth=1;width=1800;verbose=true;event=$event;filter=${event == "wall"};flat=40;trace=10;framebuf=${framebuf};output=flamegraph,jfr,text" """
4444
} // + ";simplename=true" TODO add this after upgrading next sbt-jmh release
4545
}
4646
case object asyncCpu extends async("cpu")

0 commit comments

Comments
 (0)