Build Affinity
The build affinity function analyzes the content in Makefile and CMakeLists.txt that can be replaced with content in the Kunpeng library, and provides replacement suggestions and function repair.
Command Function
Checks build affinity.
Syntax
devkit advisor affi-check {-i INPUT_PATH | --input INPUT_PATH} {-c COMMAND | --cmd COMMAND} [-o OUTPUT_PATH | --output OUTPUT_PATH] [-b {make,cmake} | --build-tool {make,cmake}] [-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]
Parameter Description
Parameter |
Option |
Description |
|---|---|---|
-i/--input |
- |
Path of the source code folder. |
-c/--cmd |
- |
Source code build command. |
-o/--output |
- |
Path for storing scan reports. By default, scan reports are stored in the current execution path. A report name is the format of Feature name_Timestamp. |
-b/--build-tool |
make/cmake |
Build tool, which defaults to make. |
--set-timeout |
- |
Timeout interval of a task, in minutes. If the execution duration exceeds the timeout interval, the task exits. By default, there is no timeout interval. The task will be executed until it is complete. |
-l/--log-level |
0/1/2/3 |
Log level, which defaults to 1.
|
-r/--report-type |
all/json/html/csv |
Scan report format, which defaults to all.
|
Example
In this example, the source code in the /opt/testcase/affinity/build/wtdbg2-2.5 directory is scanned, the build command is make, and reports in all formats are generated.
devkit advisor affi-check -i /opt/testcase/affinity/build/wtdbg2-2.5 -c 'make' -r all
Build Affinity Affinity task has been executed.
Scanned time: 2024/03/21 06:11:08
Scan status: Succeed. Some items are recommended to be modified.
Configuration:
Source code file path: /opt/testcase/affinity/build/wtdbg2-2.5
Log level: info
Report type: all
Timeout interval setting: The timeout period is not set.
Summary:
2 dependency files can be accelerated. There are 1 recommended modifications, 1 lines of code need to be modified.
For the detailed information, please check:
/home/build_source/affinity/affi-check_20240321061108_ef0a.json
/home/build_source/affinity/affi-check_20240321061108_ef0a.html
/home/build_source/affinity/affi-check_20240321061108_ef0a.csv
Output Report
Parameter |
Description |
|---|---|
Configuration |
Displays the software source file path. |
Source File to Be Modified |
Displays information such as the path of the source file that needs to be modified. |