我要评分
获取效率
正确性
完整性
易理解

Introduction

The best practices described in this document demonstrate the functions of each tool of the Kunpeng DevKit. You can refer to these best practices when analyzing and optimizing your development projects in the Kunpeng DevKit. See Table 1.

Table 1 Best practices

Tool

Feature

Best Practice

Description

Porting Advisor

Source Code Porting

Practice 1: Porting Open Source Software smartdenovo-master

SMARTdenovo is a de novo sequence assembler for PacBio or Oxford Nanopore. It is open source software written in the C language.

Use the Kunpeng DevKit Porting Advisor to analyze the SmartDenovo source package, helping to port applications.

Practice 2: Porting Megahit Source Code

Megahit is an ultra-fast and memory-efficient NGS assembler optimized for metagenomes.

Use the Kunpeng DevKit Porting Advisor to analyze the Megahit source package, helping to port applications.

System Migration

Practice 1: Migrating the Open Source Java Project RuoYi

The System Migration feature enables wizard-driven, automatic migration across databases, middleware, and applications.

This practice illustrates how to migrate the open source Java project RuoYi. In this practice, you can experience automatic migration of MySQL, Nginx, and Tomcat, and manually perform data migration and SQL reconstruction.

Practice 2: Migrating the Nginx Middleware

The DevKit System Migration feature can package and upload source components and migrate the middleware. In this practice, the open source Nginx middleware is migrated. During the practice, the Nginx configuration on the source server is automatically applied to the Nginx configuration file on the target server.

Practice 3: Porting Decompiled Java Applications Without Source Code

The DevKit System Migration feature can decompile applications whose source code is not available, and provide compilation guidance and application deployment capabilities. This practice provides guidance for identifying configuration items that need to be modified, decompiling Java class files to generate readable Java code, and migrating SQL statements within the application.

Software Porting Assessment

Practice 1: Scanning and Analyzing netty-all-4.1.34.Final

Netty is an NIO-based client and server programming framework.

Use the Kunpeng DevKit Porting Advisor for assessment before porting the Netty software package.

Practice 2: Assessing CMake Software Porting - Analyzing Software Packages

CMake is an open source, cross-platform family of tools designed to build, test, and package software.

Use the Porting Advisor for assessment before porting the CMake source package.

Practice 3: Assessing Ragel Software Porting - Analyzing Installed Software

Ragel is a finite-state machine compiler. It compiles regular expression–based state machines into parsers of traditional programming languages such as C, C++, D, Java, and Ruby.

Use the Porting Advisor to assess installed Ragel software, helping to port installed applications.

System Profiler

Hotspot Function Analysis

Practice 1: Tuning Python String Concatenation

Use the System Profiler to perform hotspot function analysis on Python string concatenation APIs, locate performance bottlenecks, and tune the performance of Python string concatenation based on the analysis result.

Hotspot Function Analysis

Lock and Wait Analysis

Practice 2: Tuning Lock Performance

Use the hotspot function analysis and lock and wait analysis functions of the System Profiler to sample and analyze multi-thread applications in the target environment, locate performance bottlenecks, and tune the application performance based on the analysis result.

Java Profiler

Real-Time Profiling

Sampling Profiling

Practice 1: Tuning Memory Leaks

Use the Java Profiler to perform real-time profiling and sampling profiling on a running Java program, locate program problems, and tune the program based on the analysis results to achieve optimal running of the Java program.

Real-Time Profiling

Practice 2: Tuning GC Logs

Use the Java Profiler to perform garbage collection (GC) analysis on a running Java program, locate program GC problems, and tune the program based on the analysis results to achieve optimal running of the Java program.

Real-Time Profiling

Sampling Profiling

Practice 3: Locating and Tuning Hotspot Functions

Use the Java Profiler to perform hotspot function analysis on a running Java program, locate program hotspot problems, and tune the program based on the analysis results to achieve optimal running of the Java program.

Real-Time Profiling

Practice 4: Locating and Tuning Lock Contention

Use the Java Profiler to perform thread dump (with CPU analysis) on a running Java program, locate program lock problems, and tune the program based on the analysis results to achieve optimal running of the Java program.

Real-Time Profiling

Practice 5: Tuning GC Triggered by G1 Humongous Objects

Use the Java Profiler to perform GC analysis on a running Java program, locate program GC problems, and tune the program based on the analysis results to achieve optimal running of the Java program.

Real-Time Profiling

Practice 6: Tuning Abnormal GC

Use the Java Profiler to perform GC analysis on a running Java program, locate program GC problems, and tune the program based on the analysis results to achieve optimal running of the Java program.

Real-Time Profiling

Practice 7: Tuning Deadlocks

Use the Java Profiler to perform thread dump (with CPU analysis) on a running Java program, locate program lock problems, and tune the program based on the analysis results to achieve optimal running of the Java program.

System Diagnosis

Memory Usage

Practice 1: Tuning Memory Usage

Use the Kunpeng DevKit System Diagnosis tool to analyze the memory usage of executable programs, locate memory leaks based on the call stack information, and optimize memory usage accordingly.