when jdk version greater than 9, perfcounter command print more info (#2371)

pull/2422/head
GGGGGHT 2 years ago committed by GitHub
parent b57379da65
commit db3141e9d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
}

@ -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
```

@ -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
```

@ -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`

@ -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`

Loading…
Cancel
Save