当前位置:网站首页>First encounter with Kunpeng code migration tool
First encounter with Kunpeng code migration tool
2022-06-09 21:48:00 【Hua Weiyun】
Antecedents feed
Come on , First go to the official video link :https://www.hikunpeng.com/zh/developer/live/detail/1533984621405396993
Collocation text , The effect is better !
Introduction to Kunpeng code migration tool

Kunpeng code migration tool supports IDE plug-in unit (VS Code、IntelliJ) and browser Two working modes . This tool is divided into client 、 Server side Two parts , Use after installation .
Kunpeng code migration tool is a tool that can simplify the migration of customer applications to Kun Peng 916/920 Server for Tools for the process . The code migration tool can automatically scan and analyze the software to be migrated , Provide mobility assessment report ; You can also analyze the source code of the software to be migrated , Pinpoint the code that needs to be migrated , And provide friendly migration guidance or one click code replacement ; At the same time, support will x86 The software package reconstructs the Kunpeng platform software package 、 Special software one click migration and other enhanced functions . Note that this only applies to Development and test environment , only Support x86 Linux The software is migrated to Kunpeng Linux Scan on 、 Analysis and migration . Click to see The latest development of Kunpeng code migration tool .
Operating system requirements openEuler 20.03 (LTS)、CentOS 7.6、Ubuntu18.04、 kirin V10、UOS 20 etc. , For detailed correspondence between the operating platform and the operating system, see Compatibility query tool .
We will apply for remote laboratory in this training camp , The official recommendation is that you apply for openEuler 20.03 (LTS).
Introduction to Kunpeng code migration tool
Software Migration assessment

Software Migration assessment helps users analyze users x86 In the package installation path on the environment SO The library files , And check the compatibility of these files with Kunpeng platform . Support Web Interface and CLI Command line operations , Of course , If you want to use VS Code or IntelliJ Also no problem , There are corresponding plug-ins available .
With Web Interface as an example , Generally, you have logged in to the Kunpeng code migration tool :
On the left side of the page , choice “ Software Migration assessment ”.
Check... In the create analysis task area “ Analysis package ” or “ Analyze installed software ”, And configure the following parameters .

Specific description of corresponding parameters , You can see Document introduction .
- single click “ To analyze ”, Generate analysis report .
The pop-up page displays the task analysis progress , After analysis , single click “ Check the report ” Get into “ Migration report ” Interface .
The user can click close while the task is in progress , Cancel the task .
Support multiple users to create analysis tasks at the same time .
After analysis , On the left side of the page , choice “ Software Migration assessment ”.
In the list of historical reports , Click to specify the report name for the analysis task , Get into “ Migration report ” Interface .

Source code migration
The source code migration function analyzes users C/C++/ASM/Fortran/Go/ The portability of interpretive language software , The Kunpeng code migration tool can perform automatic analysis , Generate analysis report , And guide users how to migrate the file .
Come on , Introduce the general steps :
Successfully log in to Kunpeng code migration tool .
Configure the following parameters in the create analysis task area .

Be careful , Application for remote laboratory use , Not the compiler shown above , Should be GCC 7.3, The specific correspondence is shown in the official documents , as follows :
openEuler 20.03 The default is BiSheng Compiler 2.1.0openEuler 20.03 SP1 The default is GCC 7.3openEuler 20.03 SP2 The default is GCC 7.3openEuler 20.03 SP3 The default is GCC 7.3- single click “ To analyze ”, Generate analysis report . The pop-up page displays the task analysis progress , After analysis , single click “ Check the report ” Get into “ Migration report ” Interface . Select the file here , Hover the mouse over the code of the red wavy line , You can view the source code migration suggestions .
If you need to modify the original code , Be sure to save the edited source code at any time , Otherwise, the modified code may be lost due to the session timeout .
Package refactoring

analysis x86 On the platform Linux Composition and dependency of software package , Replace the dependent files related to the platform with the version compatible with the Kunpeng platform , And reconstitute the software package applicable to Kunpeng platform .
Software package refactoring can analyze user provided x86 software package , And try to build Kunpeng platform software package according to the resource files provided by users . Software package reconfiguration requires users to use it on Kunpeng platform .
- On the premise that you have successfully logged in to the Kunpeng code migration tool . stay Web In the left title bar of the tool , choice “ Package refactoring ”.

- Fill in “ Package storage path ”. It can be done in two ways :
single click “ Upload ” Button to upload the package .
First, manually upload the software package to the specified path of the tool on the server ( for example :/opt/portadv/portadmin/packagerebuild/), to porting The user has read / write and execute permissions , Then click the filling box to select the software package in the drop-down box , You can also manually fill in the package name .
Click next , Configuration dependency file .
And then click “ Confirm refactoring ”.


- After successful refactoring , single click “ Download the refactoring package ” You can view the execution results , As shown in the figure .

Special software migration

Special software migration provides open source software migration 、 Tuned instrumented solutions . Users can select the corresponding software according to the granularity of the solution , Implement instrumented rapid migration software . Special software migration includes software downloading 、 modify 、 Compilation and package building functions , Users are required to use in the server environment based on Kunpeng .
Special software migration is for big data 、 database 、 High performance computing and Web Some of the common software source codes in such scenarios are migrated automatically 、 Compile and build the software package compatible with Kunpeng platform , This function only supports running on Kunpeng platform .
Enhancements

The Kunpeng code migration tool provides the following four enhancements :
64 Bit operation mode check
For users C/C++ Software from 32 Bit patterns migrate to 64 Bit mode is checked . The tool is forced to 64 Bit mode compiles user software , And through the compilation option, it is found that from 32 Bit patterns migrate to 64 Necessary modification of bit pattern , And prompt the user for further inspection .
Structure byte alignment check
Check the structural variables in the user software , Analyze its memory allocation , And give feedback to users .
Cache line alignment check
Yes C/C++ Structure variables in the source code 128 Byte alignment check , Improve memory access performance .
Memory consistency check
Check the memory consistency problems that may exist when the user software is migrated to the Kunpeng platform 、 Repair . The auto repair tool needs to update the GCC compiler , Then, the memory consistency problem is automatically repaired during the compilation of the user software .
summary
Kunpeng code migration tool is still very strong , It's very systematic , Relatively complete function , Very good , Greatly reduce the burden of migration .
边栏推荐
- Comprendre le go des modules go. MOD et go. SUM
- [time series] TFT: multi-step direct prediction of interpretable time series transformers
- How to locate the cause of high CPU on the server
- 队列在线程池中的应用
- What is wave field TRX wallet development
- Pycharm进入debug模式后一直显示collecting data解决方法
- Logistic regression summary
- Fastjon2 here he is, the performance is significantly improved, and he can fight for another ten years
- Modbus协议与SerialPort端口读写
- Thinking of finding the k-th largest element in O (n) by fast sorting
猜你喜欢

10 common high-frequency business scenarios that trigger IO bottlenecks

spider pi 智能視覺六足機器人 vnc連接機器人 0603

YOLO系列目标检测后处理-非极大值抑制

spider pi 智能视觉六足机器人 巡路功能 0603

深入理解 Go Modules 的 go.mod 与 go.sum

JS cast and implicit type conversion and Unicode encoding

QT database application 21 data grouping export

能源设备智能化系统平台建设 红外抄表项目案例

List of database import and database structure for the development of yimai.com 0605

Thoughts on "sword finger offer1-32"
随机推荐
MediaTek: the market demand will not disappear, and the compound annual growth rate of revenue in the next three years will exceed 14%
每日技术分享之EIGRP的负载均衡配置
spider pi 智能视觉六足机器人 巡路功能 0603
Laravel8 use when search
Perfect number (arithmetic borrow problem)
MFC connection database shows no data source name found and no default driver specified
spider pi 智能视觉六足机器人 颜色识别功能 0603
Mmdetection train your own coco data set and common problems
mmdetection训练自己的COCO数据集及常见问题
Spider PI intelligent vision hexapod robot tag recognition apirltag tag 0604
logrotate
[flow analysis] Buu_ [an Xun cup 2019]attack
实例:用C#.NET手把手教你做微信公众号开发(19)--使用微信支付转账到微信粉丝零钱账户
MySQL exception: the server time zone value 'xxx' solution
Add the "back" function button to the toolbar of the idea navigation bar of the "stepping pit record"
Pycharm进入debug模式后一直显示collecting data解决方法
leetcode:547、朋友圈
How to locate the cause of high CPU on the server
Scratch Programming flying birds Development Notes 0604
Spider PI intelligent vision hexapod robot automatic obstacle avoidance 0604