Understanding Traceview

I am trying to understand how tracking works. I tried to parse the method using traceview, but have a query about it.

I attached a .trace snapshot. This indicates that most of the time is accepted (toplevel), marked in blue. however, there is no additional information on it. (when this method executes or what function it performs.)

traceViewSnapshot

Can someone explain to me why he spends so much time?

Thanks in advance!

+7
source share
2 answers

Today I came across the same question, trying to figure out where the code for the "top level" was. I am not an expert here, but here I think this is happening:

http://www.androidcodesearch.com/acs/source/sdk/traceview/src/com/android/traceview/DmTraceReader.java assumes that "toplevel" is just a capture dump for an activity that does not have a known parent.

This, of course, is not very useful for clarifying your problem, since most of the time, apparently, is spent on the "I". I would recommend purchasing the Android source files for any Android platform (froyo, ICS, etc.) that you are working on, and trying to orient yourself to see what can take so long.

BTW - just to make sure that you know, you can be completely misled on this track. Tracing takes only 7 milliseconds and is tied to some fancy class loading; I would not trust following such a limited period of time on such issues, and even if I were right, I can’t imagine why you are worried about taking 7 to 5 milliseconds.

+1
source

Please read this URL carefully to help resolve most doubts about the Traceview tool.

0
source

All Articles