Monitoring and Analyzing Java Applications
Command Function
Diagnoses Java applications in monitoring and analysis modes.
Syntax
Parameter Description
Parameter |
Option |
Description |
|---|---|---|
-h/--help |
- |
Obtains help information. This parameter is optional. |
-a/--action |
monitor/report |
Working mode of the JVM Jitter Detector. This parameter is mandatory.
|
-e/--event |
jit.deoptimization/codecache.full |
Name of the event to be monitored or analyzed. The event can be a JIT de-optimization event or a code cache statistical event. This parameter is mandatory. If different events are specified in the command line and configuration file, the event specified in the command line prevails. |
Parameter |
Option |
Description |
|---|---|---|
-p/--pid |
PID |
ID of the Java process to be monitored. This parameter is mandatory. |
-c/--config |
kunpeng_devkit.cfg |
Configuration file. The tool provides a template configuration file in the config/kunpeng_devkit.cfg directory. This parameter is optional. |
Parameter |
Option |
Description |
|---|---|---|
-f/--file |
- |
JFR file to be analyzed. This parameter is mandatory. |
-o/--output |
- |
Path to the generated flame graphs for JFR de-optimization events. The default path is /diag/data in the tool directory. This parameter is optional. |
If the tool directory is /home/DevKit-CLI-xx.xx.xx-Linux-Kunpeng, the reference path to the configuration file is /home/DevKit-CLI-xx.xx.xx-Linux-Kunpeng/diag/config/kunpeng_devkit.cfg.
The verification file can be used to check whether the .cfg file content is correct. The verification file path is /home/DevKit-CLI-xx.xx.xx-Linux-Kunpeng/diag/config/kunpeng_devkit.xsd.
Parameter |
Description |
|---|---|
enabled |
Indicates whether to collect the specified event. |
period |
Collection interval. The default value is 100 ms for JIT events and 1000 ms for code cache events. Use a space between the number and unit. The unit is millisecond (ms), second (s), minute (m), hour (h), or day (d). |
duration |
Collection duration. The default value is 20 ms for JIT events and 100 ms for code cache events. Use a space between the number and unit. The unit is millisecond (ms), second (s), minute (m), hour (h), or day (d). |
jitTraceThreshold |
Threshold for triggering fine-grained JIT event collection. The default value is 0.1 (percentage of JIT events to all events). The value must be greater than 0. |
jitCollectDuration |
Sampling duration for each fine-grained JIT event collection. The default value is 1000 ms. |
jitOutputPath |
Path to the JFR files generated by JIT event collection. It can be a file directory or a full path to a file whose name ends with .jfr. |
computeMode |
Method for calculating the collection threshold. The default value is addCount. The options are as follows:
|
CompilerInlining |
Adds method inlining event collection. The default value is false. |
Compilation |
Adds compilation event collection. The default value is false. |
CompilationFailure |
Adds compilation failure event collection. The default value is false. |
CompilerConfiguration |
Adds compilation configuration event collection. The default value is false. |
CompilerPhase |
Adds compilation phase event collection. The default value is false. |
JITRestart |
Adds restart event collection. The default value is false. |
codeCacheTraceThreshold |
Threshold for triggering fine-grained code cache event collection. The default value is 0.35 (percentage of code cache events to all events). The value ranges from 0 to 1. |
codeCacheAlarmThreshold |
Threshold for triggering code cache event alarms. The default value is 0.75 (percentage of code cache events to all events). The value ranges from 0 to 1. |