What is the meaning of Incl CPU Time, Excl CPU Time, Incl Real CPU Time, Excl Real CPU Time in traceview?

前端 未结 3 1459
挽巷
挽巷 2020-12-29 20:06

1) Exclusive time is the time spent in the method 2) Inclusive time is the time spent in the method plus the time spent in any called functions 3) We refer to calling method

相关标签:
3条回答
  • 2020-12-29 20:40

    from the source code of .trace, you can see the cpu time detail different from the real cpu time, it's the same with the description of the android doc: CPU time considers only the time that the thread is actively using CPU time, and real time provides absolute timing information from the moment your app enters a method to when it exits that method—regardless of whether the thread is active or sleeping.

    0 讨论(0)
  • 2020-12-29 20:50

    cpu time is the time for which the process uses the cpu and cpu real time is the total time from the starting of process to end of process it includes waiting time of process to execute.

    0 讨论(0)
  • 2020-12-29 20:55

    Here's the DDMS documentation

    Incl CPU time is the inclusive cpu time. It is the sum of the time spent in the function itself, as well as the sum of the times of all functions that it calls.

    Excl CPU time is the exclusive cpu time. It is only the time spent in the function itself. You'll notice that it is always the same as the "incl time" of the "self" child.

    The documentation doesn't clarify the difference between CPU time and real time, but I agree with Neetesh that CPU time is the time that the function is actually running (this would not include waiting on IO) and the real time is the wall clock time (which would include time spent doing IO).

    0 讨论(0)
提交回复
热议问题