Working Principle
Porting Advisor and Affinity Analyzer
The Porting Advisor and Affinity Analyzer use the same architecture. See Figure 1.
|
Module |
Function |
|---|---|
|
Nginx |
An open-source third-party component, which needs to be installed for the tool in WebUI mode. Nginx processes HTTPS requests from the frontend, provides static pages for the frontend, or transfers user-input data to the backend, and returns the scan result to the user. |
|
Django |
An open-source third-party component, which needs to be installed for the tool in WebUI mode. Django is a RESTful framework that converts HTTP requests into RESTful APIs and drives backend functional modules. It also supports user authentication and management. |
|
Main entry |
An entry to the CLI. This module parses user-input parameters and drives functional modules to complete jobs specified by the user. |
|
Dependency dictionary check |
Compares the SO files in the software package scanned with the SO dependency dictionary to obtain the detailed information about all SO libraries. |
|
C/C++/ASM/Fortran/Go/Interpreted language source code check |
Scans and analyzes the source file set on which the target binary file of the user software depends. It checks the architecture-related compilation options and macros, built-in functions, attributes, and user-defined macros used in the source code based on the compiler version to identify the source code and source file to be ported. This module provides the following functions:
|
|
Compiler check |
Identifies the compilation macros and options, built-in functions, and attributes that are different between the x86 and Kunpeng platforms based on the compiler version. |
|
Software porting guide |
|
|
Software porting assessment |
Scans and analyzes software packages (non-source packages) and installed software, and provides porting assessment reports. |
|
Source code porting |
Automatically analyzes the source package and provides suggestions on porting to the Kunpeng 916 or Kunpeng 920 platform. |
|
Dedicated software porting |
Provides solution-specific software porting methods. |
|
Software package rebuild |
Analyzes and rebuilds an x86 software package to make it applicable to the Kunpeng platform. |
|
64-bit running mode check |
Identifies the 32-bit applications to be ported from the x86 platform to the 64-bit Kunpeng platform and provides modification suggestions. |
|
Structure byte alignment check |
Checks the memory allocation of the structure variables in the software. |
|
Cache line alignment check |
Checks the 128-byte alignment of structure variables in the C/C++ source code to improve memory access performance. |
|
Memory consistency check |
Checks for or rectifies any memory consistency problems based on user requirements:
NOTE:
BC is the format of bitcode files of the intermediate representation (IR) in a compiler. |
