简化代码迁移:适用于 x86 到 Arm64 的新安培移植顾问的优势

  • Demand for Software Porting Solutions: The demand for efficient software porting solutions is growing due to the transition from x86 to Arm64, especially Ampere processors.
  • Ampere Porting Advisor: Available on Github, it assists with codebase migration. It provides a streamlined process, automates manual steps, analyzes source code, and offers detailed insights and recommendations. It supports multiple languages and architectures and has various features like language support, architecture code detection, dependency checks, and multiple output formats.
  • Getting Started: It is a fork of the Porting Advisor for Graviton. It is a command-line tool that analyzes source code and generates reports. It can be run on non-Arm64 machines and does not modify code or send data back. It scans all files in the source tree and currently supports several languages and dependencies.
  • Running as a Container: It is the quickest way to start. Pre-requisites include Docker or containerd, nerdctl, and buildkit. The image can be built and run with volume mounts for different purposes.
  • Running as a Python Script: Pre-requisites include Python 3.10 or above, Open JDK 17 (or above) and Maven 3.5 (or above) for JAR scanning. It can be run directly to console or generate an HTML report.
  • Running as a Binary: Pre-requisites include Python 3.10 or above. The build.sh script generates a self-contained binary for Linux/MacOS, and the Build.ps1 script generates a folder with an EXE for Windows. It can be run with or without Java 11 Runtime depending on the output format.
  • Understanding Report: The report shows language runtimes and their versions, and information about dependencies. There are different types of messages like dependency requires more recent version, requires manual build, or is not available on the architecture.
  • C/C++ Transition Example: For MEGAHIT, an NGS assembler tool, the Ampere Porting Advisor identified issues like architecture-specific build options, instructions, inline assembly, SIMD intrinsics, and preprocessor errors. After making adjustments and rebuilding the project, it successfully compiled and passed the test suite.
  • Conclusion: The software porting advisor simplifies the migration process, reduces development costs, and reduces the risk of post-migration issues, enabling developers to embrace the AArch64 architecture more effectively.
阅读 151
0 条评论