Build Affinity
The tool 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.
Prerequisites
- /opt is the default installation directory of the tool. The following uses this directory as an example. Replace it with the actual directory.
- In the IDE, the tool plugin can scan local projects. If the source code is included in a compressed package, decompress the package and select the decompressed folder.
Procedure
- On the left pane of the page, choose Affinity Analyzer > Build Affinity, and click
to create a task. See Figure 1.
Table 1 Parameters for build affinity Parameter
Description
Source File Path
Set this parameter using either of the following methods:
- Enter the absolute path of the source file.
- Click Select Folder on the right and select the folder for storing the source file.
Build Tool
Build tool to be used. The options are:
- make
- cmake
Compile Command
Command to be used to compile the source code.
The compile command varies according to the build tool configuration file. For details, see Identifying Compile Commands Using the Build Tool Configuration File.
- Click Check. After the analysis is complete, the build affinity analysis report page is displayed. See Figure 2.
- In the upper right corner of the page, you can click Download Report. Then click Download Report (.csv) or Download Report (.html) to download the analysis report. Alternatively, you can click
next to the task name and click Download Report (.csv) or Download Report (.html) to download the analysis report.
Table 2 Parameters in the report Parameter
Description
Source File Statistics
Files to Modify
Total number of files to be modified in the source file path.
Code Lines to Modify
Number of code lines to be modified.
Total Number of Suggestions
Total number of items recommended for modification. Modify these items to enhance application performance on the Kunpeng platform.
Modification Summary
Libraries to be replaced, packages to be downloaded, and acceleration methods.
- Click View in the Operation column to quickly go to the file content page.
- Click Obtain Resources in the Operation column to go to the page for obtaining required content in the Kunpeng library.
- Click View. The file content page is displayed. See Figure 3.
- Click Obtaining Resources to go to the page for obtaining required content in the Kunpeng library.
- The tool supports concurrent running of multiple build affinity analysis tasks.
- To cancel a task, click Close during the task running process.
- To modify the configuration of a successful or failed task, click
on the right of the task name to restart the task.
- In the upper right corner of the page, you can click Download Report. Then click Download Report (.csv) or Download Report (.html) to download the analysis report. Alternatively, you can click


