内存一致性检查命令参考
内存一致性检查就是检查源码迁移在鲲鹏平台运行时可能存在的内存一致性问题,并提供插入内存屏障的建议。
命令功能
检查源码中存在的内存一致性问题。
命令格式
devkit advisor mm-check {-i INPUT_PATH | --input INPUT_PATH}[-f BC_PATH | --bc-file BC_PATH] [--autofix {true,false}] [--autofix-dir AUTOFIX_OUTPUT_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 |
- |
BC文件对应的源码文件夹路径。 |
-f/--bc-file |
- |
BC文件夹路径,该路径下必须存在BC文件。 说明:
|
--autofix |
true/false |
是否生成编译器配置文件,默认为false。 |
--autofix-dir |
- |
编译器配置文件的存放地址。默认生成在工具目录下的源码文件夹下,使用--autofix且参数必须为true时才能生效。 |
-o/--output |
- |
扫描报告的存放路径,默认存放在当前执行路径下,报告名称为特性名称_时间戳。 |
--set-timeout |
- |
任务超时时间,单位为分钟,若执行时间超过超时时间则退出执行。默认无超时时间,任务将持续执行直到结束。 |
-l/--log-level |
0/1/2/3 |
设置日志级别,默认为1。
|
-r/--report-type |
all/json/html/csv |
扫描报告的格式,默认为all。
|
使用示例
此处以扫描“/opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort”路径下源码为例,请根据实际情况替换成实际需要扫描的配置文件路径。
devkit advisor mm-check -i /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort -f /opt/DevKit/testcase/affinity/weak_cons/bc_file -l 0
返回信息如下,并输出报告。
Scanned time: 20240229061648 Configuration: Scan bc files path: /opt/DevKit/testcase/affinity/weak_cons/bc_file Scan source code path: /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort Autofix: false Generate report path: /home/DevKit_Software Generate report type: all Task Timeout Interval: The timeout period is not set. Log level: debug Summary: Scanned 2 bc files, there are 6 recommended modifications. For the details information, please check: /home/DevKit_Software/mem-check_20240229061648_7905.json /home/DevKit_Software/mem-check_20240229061648_7905.html /home/DevKit_Software/mem-check_20240229061648_7905.csv
输出报告说明
参数 |
说明 |
---|---|
配置信息 |
显示软件源码文件及BC文件存放路径。 |
需要修改的源码文件 |
显示需要存在内存一致性问题需要进行修改的源码文件路径等相关信息。 |
父主题: 内存一致性检查