缓存行对齐检查
缓存行对齐检查是对C/C++源码中结构体变量进行128字节对齐检查,提升访存性能。
命令格式
devkit advisor cacheline {-i INPUT_PATH | --input INPUT_PATH} [-o OUTPUT_PATH | --output OUTPUT_PATH] [-r {all,json,html,csv} | --report-type {all,json,html,csv}] [-l {0,1,2,3} | --log-level {0,1,2,3}] [--set-timeout TIMEOUT]
参数说明
参数 |
参数选项 |
参数说明 |
---|---|---|
-h/--help |
- |
获取帮助信息。 |
-i/--input |
- |
待扫描的源码文件夹路径。 |
-o/--output |
- |
扫描报告的存放路径,默认存放在当前执行路径下,报告名称为特性名称_时间戳。 |
-r/--report-type |
all/json/html/csv |
扫描报告的格式,默认为all。
|
-l/--log-level |
0/1/2/3 |
设置日志级别,默认为1。
|
--set-timeout |
- |
任务超时时间,单位为分钟,若执行时间超过超时时间则退出执行。默认无超时时间,任务将持续执行直到结束。 |
使用示例
以扫描“/home/advisor/project”路径下源码为例,其余均采用默认值,请根据实际情况替换成实际需要扫描的配置文件路径。
devkit advisor cacheline -i /home/advisor/project
返回信息如下,并输出报告。
Executing Cacheline Alignment Check task, please wait... Current progress: 100%: Scanned time: 2024/05/29 07:43:09 Configuration: Scan source code path: /home/advisor/project Generate report path: /home/DevKit_Software Generate report type: all Task Timeout Interval: The timeout period is not set. Log level: info Summary: Scanned 7 files, there are 1 recommended modifications. For the details information, please check: /home/DevKit_Software/cacheline_20240511065829_1846.json /home/DevKit_Software/cacheline_20240511065829_1846.csv /home/DevKit_Software/cacheline_20240511065829_1846.html
输出报告说明
参数 |
说明 |
---|---|
配置信息 |
显示软件源码文件存放路径。 |
需要修改的源码文件 |
显示存在缓存行对齐问题,并需要进行修改的源码文件路径等相关信息。 |
父主题: 亲和分析