report子命令
命令功能
分析生成的数据文件,通过Top-down方法计算微架构各流水线占比,在终端展示分析结果。
命令格式
./devopt.sh report [-h] -i INPUT [-p SOURCE_PATH]
参数说明
|
参数 |
参数选项 |
说明 |
|---|---|---|
|
-h/--help |
- |
可选参数,获取帮助信息。 |
|
-i/--input |
- |
必选参数,指定数据文件。 |
|
-p/--project |
- |
可选参数,指定源码文件存放的目录,用于源码定位。 |
使用示例
- 查看report命令支持的功能信息:
./devopt.sh report -h
返回信息如下:
USAGE devopt.sh report [-h] -i INPUT [-p SOURCE_PATH] DESCRIPTION Analyzes the collected data and displays the analysis result on the terminal. OPTIONS -h, --help Displays help information and exits. -i INPUT, --input INPUT Specifies a data file. -p SOURCE_PATH, --project SOURCE_PATH Specifies the source file directory, which is used to locate the source code. EXAMPLE # Analyze the collected data and view the analysis result in interactive mode. devopt.sh report -i /home/output/devopt_pid_timestamp.rawdata -p /home/project/test
- 使用report命令分析采集的数据,并进入交互模式查看分析结果。
1./devopt.sh report -i /home/output/devopt_3315674_20260513155321.rawdata -p /home/project/test
返回的是工具的总览界面,如下图所示。

表2 工具总览界面区域说明 区域
名称
说明
1
表格区域
展示源码文件中的函数信息,其字段介绍请参见表3。支持通过表格区域中的搜索框快速查询函数信息。
2
调用栈区域
展示函数的调用信息,支持通过快捷键“e”进行折叠与展开。
3
提示区域
展示内存源码优化流程,具体请参见使用示例。
4
快捷键区域
展示快捷键信息,其介绍请参见表4。
动态源码优化工具的x86压缩包不支持显示提示区域。
表3 表格区域字段介绍 字段
字段说明
func
源码文件中的函数名称。
file
函数所在源文件的名称。
module
函数所属模块。
percentage(%)
函数耗时占总耗时的百分比。
issue
检测到的问题类型。显示值为M时表示为伪共享问题。
avg(ms)
函数的平均耗时,单位为ms。
min(ms)
函数的最小耗时,单位为ms。
max(ms)
函数的最大耗时,单位为ms。
P99(ms)
99% 分位耗时。表示99%的函数耗时不超过此值。
frt_bound(%)
函数级topdown的Frontend Bound指标,包括Fetch Latency Bound(ITLB Miss、ICache Miss、BP_Misp_Flush、OoO Flush、Static Predictor Flush)、Fetch Bandwidth Bound。
mem_bound(%)
函数级topdown的Memory Bound指标,包括L1 Bound、L2 Bound、L3 or DRAM Bound、Store Bound。
core_bound(%)
函数级topdown的Core Bound指标,包括Exe Ports Util、Resource Bound*、FSU Stall、DIV Stall、FDIV Stall。
bad_spec(%)
函数级topdown的Bad Speculation指标,包括Branch Mispredicts(Indirect Branch、Push Branch、Pop Branch、Other Branch)、Machine Clears(Nuke Flush、Other Flush)。
retiring(%)
函数级topdown的Retiring指标,表示正常结束的指令占比。
- 选中总览界面中表格区域的任一行数据,按Enter快捷键可进入当前选中数据的明细页面,如下图所示。

表5 工具明细界面区域说明 区域
名称
说明
1
源码区域(Source Code)
展示函数所在的文件源码。
2
汇编区域(Assembly Code)
展示函数的汇编代码。
3
建议区域(Code Suggestions)
展示源码优化建议。
4
快捷键区域
展示快捷键信息,其介绍请参见表4。