Rate This Document
Findability
Accuracy
Completeness
Readability

Affinity Analyzer Functions

The tool checks software code to improve code quality and memory access performance.

  • When multiple modules are running concurrently, only one log level can be set at the same time.
  • If you move the tool to another location after you have already used the tool, a log configuration file read error occurs. You need to reinstall the tool or move the tool to its original installation location.

Prerequisites

  • You have installed the Affinity Analyzer tool. For details, see Installing the Tool.
  • If you have installed the tool using a compressed package, decompress the package and switch to the tool directory. Then run the command in ./ mode, for example, ./devkit advisor -v. If you have installed the tool using an RPM package, run devkit advisor -v. This section uses an RPM package as an example.

Command Function

Displays the help information about affinity analysis tasks.

Syntax

1
devkit advisor [-h|--help] TASK [ARGS]

Example

Run the following command to query all the parameter descriptions:

1
devkit advisor -h

Command output:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  Usage: devkit advisor [-h|--help] TASK [ARGS]

  The most commonly used devkit advisor sub tasks are:
    run-mode                Run the 64-bit running mode check task.
    addr-align              Run the address alignment of the structure task.
    cacheline               Run the cache line alignment check task.
    bc-gen                  Run the bc file generation task.
    mm-check                Run the memory mode check task.
    vec-check               Run the vectorization check task.
    affi-check              Run the affinity check task.
    matrix-check            Run the matricization check task.
    dr-check                Run the data race check task.
    precision               Run the precision analysis task.
    knet                    Run the K-NET analysis tools task.

  See 'devkit advisor TASK -h/--help' for more information on a specific task.
Table 1 Function description

Subcommand

Function

Description

Supported Platform

run-mode

64-bit running mode check

Identifies the 32-bit applications to be ported to the 64-bit platform and provides modification suggestions. It supports GCC 4.8.5 to GCC 10.3.0.

Kunpeng

addr-align

Byte alignment check

Checks the byte alignment of structure variables in the source code.

bc-gen

BC file generation

Used for memory consistency check and vectorization check.

mm-check

Static memory consistency check

Checks for any memory inconsistency problems in static mode when C/C++ source code is running on the Kunpeng platform, and also provides check reports and memory barrier insertion suggestions.

vec-check

Vectorization check

Checks vectorizable code snippets and provides modification suggestions.

matrix-check

Matricization check

Checks matricizable code fragments and provides modification suggestions.

affi-check

Build affinity

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.

cacheline

Cache line alignment check

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

dr-check

Dynamic memory consistency check

Checks for any memory inconsistency problems in dynamic mode when C/C++ source code is running on the Kunpeng platform, and also provides check reports and memory barrier insertion suggestions.

precision

Calculation precision analysis

Locates the precision differences of the Fortran, C, and C++ languages caused by x86 and Kunpeng instructions.

Kunpeng, x86

knet

Link latency detection

Provides the Kunpeng network detection and analysis functions, collects latency data of network protocol stacks, and analyzes network performance bottlenecks.