The premise condition

  1. Android studio 4.0
  2. The root phone has been installed

methods

  1. Open the profiler

  1. Select the process you want to analyze

  1. After clicking CPU, select C++ and click start.

  1. After a period of time (15~30s is ok, otherwise the analysis results will be relatively stuck, even stuck AS), click stop

  1. The analysis results are shown in the figure.

In the figure, self represents the CPU and time consumed by executing the current function, and children represents the CPU and time consumed by calling other functions.

reference

The official introduction