CPU analysis of performance analysis tools

        Continuing from the previous article  http://t.csdn.cn/ssVgz  , after understanding the basic operations, you can conduct in-depth research and analysis on performance-related parts. This article analyzes the CPU usage under a certain thread.

        You can also pay attention to the "Moyu IT" public account, which will also publish relevant technical documents and technical information-- how to analyze the status of the CPU in the mobile phone        

 1. View CPU scheduling

        Based on basic operations, you can view various conditions of the CPU under a certain thread. Take the still capture thread as an example:

        By marking the CPU status under the still capture thread, the CPU usage can be calculated:

Wall duration / Selected range = CPU usage

         For example, the camera provider process accounts for the main CPU consumption during this period, because the camera is taking pictures during the still capture period, so the camera-related processes take up a lot of CPU, using 1294.4ms/377.5ms = 3.4 cores, and the four cores are basically completely concentrated in the event of taking pictures.

2. View CPU frequency

        Take still capture as an example, you can view the CPU frequency during the period by hovering the mouse, as shown in the figure

        During the deliverInputEvent period, the CPU frequency is relatively low, because the load is low, and the highest frequency scheduling is not required. However, during still capture during the photography period, CPU 0-3 large cores are fully loaded, running to 2Ghz, 4-7 small cores are also fully loaded to 1.5Ghz, which proves that the CPU is fully scheduling the camera to take pictures at this time.

Guess you like

Origin blog.csdn.net/qrx941017/article/details/128986388