Rate This Document
Findability
Accuracy
Completeness
Readability

Cache Line Alignment Check

The tool checks the 128-byte alignment of structure variables in the C/C++ source code to improve memory access performance.

Prerequisites

You have logged in to the Kunpeng DevKit.
  • /opt is the default installation directory of the tool. The following uses this directory as an example. Replace it with the actual directory.
  • On the WebUI, this feature requires uploading the files or compressed package. 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

  1. On the left pane of the page, choose Affinity Analyzer > Cache Line Alignment Check, and click to create a task. See Figure 1.
    Figure 1 Cache line alignment check
  2. You can select the source code to be checked in either of the following ways:
    • If you want to use uploaded source code, click the text box and select a source code path from the drop-down list or manually enter a source code path.
    • Click Upload on the right to upload the package or folder. (The package is automatically decompressed during the upload.)
      • Only TAR, TAR.BZ, TAR.BZ2, TAR.GZ, TAR.XZ, TBZ, TBZ2, TGZ, TXZ and ZIP packages can be uploaded. Only one package can be uploaded at a time. The source package cannot exceed 1 GB, and the extracted files cannot take up more than half of the remaining drive space.
      • Only one folder can be uploaded at a time. The size of the folder must be less than or equal to half of the remaining drive space.
      • Before manually uploading a software package, check whether the target directory exists. If it does not exist, create such a directory and grant the read, write, and execute permissions to the devkit user.
  3. Click Check. After the check is complete, the check report page is displayed. See Figure 2.
    Figure 2 Cache line alignment check

    Click the View Suggested Source Code tab to switch to the alignment check result page. See Figure 3.

    Figure 3 Viewing the suggestion code
    • The tool supports concurrent running of multiple cache line alignment check tasks.
    • To cancel a task, click Close during the task running process.
    • If the source code does not need to be modified, a dialog box is displayed indicating that the operation is successful. The check report page is not displayed.
    • If you use shortcut keys to modify the source code, pay attention to shortcut key conflicts caused by the input method or IDE environment.