当前位置:网站首页>[play with Huawei cloud] functions and features of Kunpeng code migration tool
[play with Huawei cloud] functions and features of Kunpeng code migration tool
2022-06-09 03:17:00 【Hua Weiyun】
The second is : Basic knowledge of Kunpeng code migration tool
Links to this course :https://www.hikunpeng.com/zh/developer/live/detail/1533984621405396993
This article mainly introduces the functions and features of Kunpeng code migration tool . Through this paper , You can see that :
① Understand what a code migration tool is
② Understand the functions of the code migration tool
③ Learn how to use the code migration tool in actual cases
1. What is a code migration tool
The instruction set supported by the processor is different , This means that developers may need to migrate their code across platforms . Usually , Code migration is a complex and tedious task , It takes a lot of effort on the software package 、 Source code 、 Rely on library files for manual analysis 、 Inspection and identification , Manually correct related differences between different instruction sets , These differences mainly relate to grammar 、 Instructions 、 Function and library file support . To solve the problem of manual troubleshooting of user code portability 、 Lack of transplant experience 、 Repeatedly rely on compilation to debug and locate errors , Heavy workload , The problem of low overall efficiency , We launched Kunpeng Porting Advisor Kunpeng code migration tool .

2. Code migration tool features
Kunpeng code migration tool is a tool that can simplify the process of application migration to Kunpeng architecture server . Mainly for developers of Kunpeng platform 、 User and third-party software provider development engineer to be migrated , Quickly and automatically scan and analyze massive amounts of code , Provide professional migration guidance reports . At the same time, it can automatically analyze the code content to be modified , And guide how to modify , Help developers achieve efficient code migration . At the same time, it supports the affinity check of native development code .

3. features
The code migration tool can be provided to Kunpeng ecological users as an independent software for installation
The features supported are as follows ∶
The current tool supports five groups of functions , The features supported are as follows :
Software Migration assessment
Check the software installation package provided by the user , Identify dependencies , And provide Kunpeng compatible version of so Dependent libraries correspond to rpm My bag OS The official download link of the distribution .· Check that the user is x86 Software installed on the server , Identify dependencies , And provide Kunpeng compatible version of so Dependent libraries correspond to rpm My bag OS The official download link of the distribution .
Source code migration
· Check users C/C++/ assembly /Fortran Code software build project file ,
And guide users how to migrate the file .
Check users C/C++/ assembly /Fortran/python/Java/ScalalGo The link library used by the software to build engineering files , And provide portability information .· Check users C/C++/ assembly /Fortran Software source code , And guide users how to migrate source files .
· Package refactoring , Analyze users x86 Package composition , Refactored to a software package suitable for Kunpeng platform .
· Special software migration , Based on our rich experience in software migration , Help users migrate quickly Web、 database 、 big data 、 Four solution software for high performance computing . Kun Peng affinity analysis , Currently including 64 Bit operation mode check 、 Structure byte alignment check 、 Cache line byte alignment check 、 Memory consistency check 、 Build affinity checks .
The user uploads the software source code through the secure transmission protocol 、 software package 、 Binary files and other resources to the workspace , You can also get it from Web Directly delete or clean up the files under the working directory on the page
Overwrite rename .
· Support command line mode 、Web、IDE The plug-in has three working modes , The latter two methods support multi-user concurrent scanning .
In particular : The tool does not support migration windows Software in the environment or IOSMacOS The platform is applied to Kunpeng platform Linux In the environment .
4. Application scenarios

For the most commonly used x86 Assembly instructions to identify and convert
- Most commonly used 100O+ Automatic translation of assembly instructions .
For supported embedded assembly instructions , Provide revision guidance ; For files that consist entirely of supported complete assembly instructions , Support automatic conversion to result assembly file ; - Support the identification of assembly instructions that cannot guide modification and conversion 、 remind .

The Kunpeng migration affinity check can tell the user what needs to be modified , You don't have to find it yourself , Saving time , Improve development efficiency .

5. Deployment way
The code migration tool is deployed in a stand-alone mode , The deployment environment requirements are shown in the following table .

- How to access and use
The code migration tool provides two user access modes , It is selected by the user during installation , Only one type of... Can be installed in the same set of environment :
CLI The way :
Use the functions of the code migration tool from the command line , The final migration analysis results are output to .csv and .json file , Users can handle it according to the migration suggestions ..Web/IDE plug-in :
Through the browser IDE Use the functions of the code migration tool remotely , The final migration analysis results are output to .csv and .html file ( Downloadable ) in , Users can handle it according to the migration suggestions . If the current user is already logged in , Repeated logins will crowd out the previous logins . Users' various analysis and migration tasks are completed in their own workspace . visit Web Interface time , The requirements for local browsers are shown in the following table .

2. The functions of the code migration tool
2.1 Source code migration
- distinguish C/C++/Fortran( Assemble source code , Suggest changes ;Make、CMake、Automake Compilation options 、 Compile macro parsing and migration suggestions
- Support 100%Intrinsic Function conversion (6000+ individual ), Include MMX、SSE And AVX Intrinsic etc.
- Support Fortran Identification of inline functions and syntax features as well as compilation options
- Support Go Language transfer , Yes go Program usage cgo Compilation options in the compilation section 、 Macro definitions provide compatibility checks , Give modification suggestions
- Support python、Java、Scala Language , Provide compatibility check for dynamic link libraries in programs , Give modification suggestions

2.2 Source migration business process

2.3 Source code migration
In source code migration, if there are different source code mixed programming, you need to fill in all source code types

2.4 Migration report

2.5 Compilation translation
Kun Peng DevKit Support full assembly translation and embedded assembly translation
- Support automatic assembly code recognition , One click replacement migration , Complete the migration of assembly code in one minute .
- x86 Assemble common instructions 100% distinguish ,1000+ Automatic translation of instructions , Cover 80% Common application scenarios of .

2.6 Software Migration assessment
- Identification check x86 Dynamic link library used in platform software installation package or installed software 、 Static link libraries and executables , And compare and match the checked files with the list of dependent files built in the tool , So as to provide users with migration suggestions
- Jar,war Packet scan enhancement , Identify the dependencies supported by the Kunpeng platform , Provide more accurate recommendations for dependency compatible replacement

2.7 Software Migration assessment process

2.8 Package refactoring
Identify analysis users x86 Package composition , Refactoring for Kunpeng platform software package , And output the refactoring report
The software package refactoring function is mainly used for the .so file ,.a Document and .jarl.war Document analysis , It will replace the dependent files that need to be adapted to the Kunpeng platform , Then perform the refactoring of the software package , Finally, the software installation package of Kunpeng compatible version will be output . If the dependencies required in the package are not sure whether the Kunpeng platform is compatible , It can be verified on Kunpeng platform , Manually upload the dependency configuration file , Perform refactoring operations .

2.9 Special software migration
- — Key to download open source code , And compile 、 Build as Kunpeng software package
- Support big data 、 database 、Web、 One click compilation and migration of mainstream software in scenarios such as high-performance computing

2.10 Memory consistency
- Static check , Check the weak memory order problem that may exist when the user software is migrated to the Kunpeng platform and repair it
- Support to download the data generated by the static inspection tool BC file , It can be carried out according to actual needs BC
- Auto repair function , Update the... Used by the user GCC compiler , In the compilation process of user software, automatic file scanning analysis completes the repair of weak memory order problem
- Static inspection tool 、 The compiler auto repair tool is used in combination with , One click repair
- Support automatic generation of intermediate files for the target project , There is no need for users to modify the compilation script

3. Case presentation
3.1 Source code migration 1
Case download link :
https://github.com/kunpengcompute/devkitdemo/tree/main/Porting_advisor/testdemo/code_migrationlcode
Operation steps upload source code , choice CIC++、make The parameter scans out the source code, which needs to be modified one by one and then saved .

3.2 Source code migration 2
Python Language scanning , Identify the dependent libraries used in the project , Judge its compatibility , In the sample report, you can directly download and use the dependent Library .

3.3 Software migration and software package reconfiguration
Software Migration assessment : find so Dependency libraries and executables , And evaluate so Depending on the portability of libraries and executables .

Package refactoring : Users upload software packages and dependent configuration files that need to be reconstructed , When the refactoring is complete , Users can directly download the reconstructed rpm software package , And then use it directly on the Kunpeng platform .

3.4 Memory consistency cases
Operation steps
Upload source code , Fill in the compile command , The example uses “make NO_LAPACKE=1”, Click next , Start BC File parsing , Choose the generated BC file , Check for weak memory problems .

边栏推荐
- Greedy method / non 01 knapsack problem
- 關於JS console.log() 是同步 or 异步引發的問題
- Ccf-csp 201909-4 recommended system 100 points
- 神经网络学习(五)----常见的网络结构对比
- ERP从内部集成起步开篇
- Ccp-csp 201912-5 magic number violence 25
- What is the network transformer for? (Ethernet network LAN LAN communication isolation filter) production plant / product schematic diagram / common products / price influencing factors
- Boringssl compilation and testing
- Ccf-csp 202104-1 gray histogram 100 points
- Ccf-csp 201803-3 URL mapping 100 points
猜你喜欢

The difference between single chip and chip

No cached version available for offline mode

现在VB6.0已经和SQL连接了,但是使用查询功能时无法做到任意条件查询,网上的情况和我的也不太相符,请问该如何实现呢?

Redis data storage

What taxes do Tami dogs need to pay for equity transfer? What are the possible tax risks?
![[detailed explanation of kubernetes 11] - detailed explanation of storage](/img/2c/7e47242f2cb9e9d70a19e2d685b31f.png)
[detailed explanation of kubernetes 11] - detailed explanation of storage

Ccf-csp 202112-3 boarding pass bar code 100 points

RTSP/Onvif协议视频平台EasyNVR对静态文件大小的优化

Comprehensive description of network transformer (function, factory, type, model, principle, etc.)

C # Fundamentals
随机推荐
Do you know websocket?
gradle 查看某个包的依赖树
Oracle connecting to PLSQL
qt重载的信号槽函数绑定方式
What's the matter with online stock account opening? Is it safe to open an account online?
Optimization of static file size by rtsp/onvif protocol video platform easynvr
神经网络学习(四)----神经网络各层知识的简单总结
el-cascader 代码取消选择,手动删除某项
Do you know the specifications of e-commerce background permission settings!
Sorting out the soft and hard decoding methods of ffmpeg
关于我的那些事【我的2022】
Ccf-csp 201803-3 URL mapping 100 points
Ccf-csp 201403-3 command line options
FPGA初次尝试
Generation of random numbers in C language [detailed explanation]
À propos de JS console. Log () est un problème de synchronisation ou asynchrone
Boringssl compilation and testing
关于JS console.log() 是同步 or 异步引发的问题
Leetcode 871. Minimum refuelling times priority queue
Typescript base type - type assertion