Dynamic Code Optimizer Functions
The Dynamic Code Optimizer is a source code optimization tool that collects performance data while running C/C++ source code and provides optimization suggestions. The tool supports function-level top-down analysis, function trace analysis, and memory profiling, helping developers understand the service execution logic, quickly identify performance bottlenecks, and receive actionable optimization suggestions. By using this tool, performance issues can be resolved faster, improving both development efficiency and operational efficiency. The tool supports servers powered by the Kunpeng 950 processor and some new models of the Kunpeng 920 processor, as well as x86 servers. Among these, the false sharing detection feature is available only on Kunpeng 950 servers.
Prerequisites
- The Dynamic Code Optimizer has been installed.
- The tool is contained in an independent package (DevKit-Optimizer-CLI-x.x.x-Linux-xxx.tar.gz). Extract the package and switch to the tool directory.
Command Function
Collects performance data for specified processes, analyzes the collected data to provide source code optimization suggestions, as well as displays the collected data and generates visual analysis reports.
Syntax
./devopt.sh [-h | --help] [-v | --version] {record,report,script,path} ...
Example
Run the following command to view the functions supported by the Dynamic Code Optimizer:
1 | ./devopt.sh -h
|
Command output:
USAGE
devopt.sh [-h | --help] [-v | --version] {record,report,script,path} ...
DESCRIPTION
A code optimizer with data collection, analysis, and visualization capabilities.
It analyzes performance bottlenecks based on collected data and provides code optimization suggestions.
SUBCOMMANDS
record Collects data of a specified process and generates a data file.
report Analyzes the collected data and displays the analysis result on the terminal.
script Reads a data file and displays the original collected data.
path Analyzes data files and generates a visual analysis report.
OPTIONS
-h, --help
Displays help information and exits.
-v, --version
Displays the version and exits.
Subcommand |
Description |
|---|---|
record |
Collects data for a specified process, including CPU microarchitecture performance events, function call trace information, and memory access data, and generates data files. |
report |
Analyzes the generated data files, computes the proportion of each microarchitectural pipeline using the top-down method, and displays the analysis results in the terminal. |
script |
Reads data files and displays their contents, suitable for data inspection and debugging scenarios. |
path |
Generates HTML-based visual analysis reports from data files, enabling easy inspection of high-frequency function call traces and latency information. |