了解Traceview [英] Understanding Traceview

查看:119
本文介绍了了解Traceview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解一个traceview工作。我试图分析使用traceview的方法,但有一个关于它的查询。

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

我附上了.trace的快照。这表明,采取的是(顶层)的大部分时间标为蓝色。然而,没有进一步的信息可在相同的。 (当执行此方法,或者它会执行什么样的功能。)

I have attached the snapshot of the .trace. It indicates that the majority time is taken by (toplevel) marked in blue. however no further info is available on the same. (when this method is executed or what function it performs.)

任何人能请向我解释为什么它耗费那么多时间?

Can anyone please explain to me why its consuming so much time?

在此先感谢!

推荐答案

今天我碰到了同样的问题,试图找出其中$ C $下顶层了。我不是一个专家在这里,但这里是我认为正在发生的事情:

I ran into the same question today trying to find out where the code for "toplevel" was. I'm not an expert here, but here's what I think is happening:

<一个href="http://www.android$c$csearch.com/acs/source/sdk/traceview/src/com/android/traceview/DmTraceReader.java" rel="nofollow">http://www.android$c$csearch.com/acs/source/sdk/traceview/src/com/android/traceview/DmTraceReader.java认为,顶层只是一个抓斗袋转储的活动,没有已知的父。

http://www.androidcodesearch.com/acs/source/sdk/traceview/src/com/android/traceview/DmTraceReader.java suggests that "toplevel" is just a grab-bag dump for activity that has no known parent.

这当然不是搞清楚你的​​问题非常有帮助,因为时间的相当一部分似乎是被消耗在自我。我会建议收购的任何Android平台(升级Froyo,ICS等),你的工作,并试图闲逛,看看有什么可能采取了这么多时间了An​​droid的源文件。

This is of course not very helpful for figuring out your problem, since a sizable portion of time seems to be being spent in "self." I would recommend acquiring the android source files for whichever android platform (froyo, ICS, etc.) you are working on and trying to poke around to see what might be taking so much time.

顺便说一句 - 只是为了确保你知道,你可以完全由该跟踪误导。你的轨迹是只为7毫秒,是依赖于一些花哨的类加载;我不相信一个traceview这样对这些问题在有限的时间跨度,即使准确的我不可能想象为什么你担心服用7米利斯下降到5。

BTW - just to make sure you know, you may be entirely misled by this trace. Your trace is only for 7 milliseconds and is tied to some fancy class loading; I would not trust a traceview for such a limited time span on such matters, and even if accurate I can't possibly imagine why you're worried about taking 7 millis down to 5.

这篇关于了解Traceview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆