Arm Mobile Studio (1) Streamline uses (with unity) to analyze mobile phone GPU and CPU performance

■ Preface: Why should I use Arm Mobile Studio:

1. I mainly use Unity for the front end of the game. However , Unity's profiler cannot obtain GPU data on the real machine, especially when Graphics APIs is set to Vulkan . (Actually, I tested it with OpenGL ES3 curiously, but it didn't work).

2. ARM's Mali series GPUs have some differences from Qualcomm GPUs and Apple GPUs, such as precision problems in shaders, etc. These bugs become black boxes. We really want to know what happens on the Mali GPU when the rendering is abnormal .

When testing on a real machine in unity, the profiler cannot display the GPU situation, especially under Vulkan

So, start digging into Arm Mobile Studio, ARM's official tool suite. As shown in the figure below, I value these functions:

● Use Streamline to capture performance profiles for in-depth analysis, using all performance data in the system. Measure performance peaks for CPU, GPU, and bandwidth, and see what code was executed during that time.

● Debug Open GL ES and Vulkan API calls in your application using Graphics Analyzer to identify rendering bugs and investigate problem scenarios to improve performance. Analyze overdraw, shader, texture and fragment counts, draw call by draw call.

● Use the Mali Offline Compiler to check the execution of shader programs on a range of Mali GPUs. Get an approximate cycle cost breakdown of the major functional units in your design.

■ Installation and use:

(1) Go to the official website of ARM to download. If it is Windows, the installation package will look like this:

(2) After installation, it looks like this:

(3) Start Streamline. The interface will likely look like this:

Note: At this point, unity has already launched the test package, and can use adb to connect normally. (Note that the test package should check these three items in the build settings), and the Run Device can be recognized, and adb is normal.

But Streamline didn't recognize it! Regarding the use of Unity to export Android and ADB, it does not belong to the content of this article, so skip it.

(4) Configure adb to connect to the phone. Window--Preferences, and then find the location of your adb file.

After adb is configured, the interface will automatically refresh, and you will find that your phone has been recognized and the game (application) you are currently running can be recognized!

(5) Configure applications and GPUs

If there are multiple debuggable applications, select the application you want to analyze, and then click [Configure counters]

After that, select the GPU model of your phone.

(6) Start capturing data. Click [Start Capture], select the location to save the data, and then confirm.

(7) After that, click [stop] to stop capturing

(8) Enter the data analysis stage:

As shown in the picture above, you can analyze the usage of each core of the mobile phone CPU (for example, 4 large cores, 4 small cores, the usage status of each core, similar to the Windows resource manager). The state and situation of the GPU can be analyzed.

For specific parameters, please refer to the ARM official documentation.

Guess you like

Origin blog.csdn.net/chenggong2dm/article/details/123872322