diff --git a/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java b/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java index 36e313315..bce04bef3 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java @@ -26,6 +26,7 @@ import sun.management.counter.perf.PerfInstrumentation; /** * @see sun.misc.Perf + * @see jdk.internal.perf.Perf * @see sun.management.counter.perf.PerfInstrumentation * @author hengyunabc 2020-02-16 */ @@ -55,7 +56,9 @@ public class PerfCounterCommand extends AnnotatedCommand { process.end(1, "please check arthas log. if java version >=9 , try to add jvm options when start your process: " + "--add-opens java.base/jdk.internal.perf=ALL-UNNAMED " - + "--add-exports java.base/jdk.internal.perf=ALL-UNNAMED"); + + "--add-exports java.base/jdk.internal.perf=ALL-UNNAMED " + + "--add-opens java.management/sun.management.counter.perf=ALL-UNNAMED " + + "--add-opens java.management/sun.management.counter=ALL-UNNAMED"); return; } diff --git a/site/docs/doc/perfcounter.md b/site/docs/doc/perfcounter.md index 04af53188..9343d59b7 100644 --- a/site/docs/doc/perfcounter.md +++ b/site/docs/doc/perfcounter.md @@ -39,5 +39,5 @@ $ perfcounter -d 如果没有打印出信息,应用在启动时,加下面的参数: ``` ---add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED +--add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED ``` diff --git a/site/docs/en/doc/perfcounter.md b/site/docs/en/doc/perfcounter.md index 788423ce3..491b7e143 100644 --- a/site/docs/en/doc/perfcounter.md +++ b/site/docs/en/doc/perfcounter.md @@ -39,5 +39,5 @@ $ perfcounter -d If the information is not printed, when the application starts, add the following parameters: ``` ---add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED +--add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED ``` diff --git a/tutorials/katacoda/command-perfcounter-cn/perfcounter.md b/tutorials/katacoda/command-perfcounter-cn/perfcounter.md index 32acec69a..d770ea6b7 100644 --- a/tutorials/katacoda/command-perfcounter-cn/perfcounter.md +++ b/tutorials/katacoda/command-perfcounter-cn/perfcounter.md @@ -57,4 +57,4 @@ $ perfcounter -d 如果没有打印出信息,应用在启动时,加下面的参数: -`--add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED` +`--add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED` diff --git a/tutorials/katacoda/command-perfcounter-en/perfcounter.md b/tutorials/katacoda/command-perfcounter-en/perfcounter.md index 7ff4b33f8..ec74e1ae2 100644 --- a/tutorials/katacoda/command-perfcounter-en/perfcounter.md +++ b/tutorials/katacoda/command-perfcounter-en/perfcounter.md @@ -57,4 +57,4 @@ $ perfcounter -d If the information is not printed, when the application starts, add the following parameters: -`--add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED` +`--add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED`