Questions tagged [android-traceview]

Traceview is a graphical viewer for execution logs saved by an Android app.

Traceview is a graphical viewer for execution logs saved by your application. Traceview can help you debug your application and profile its performance.

To start Traceview, enter the following command from the SDK tools/ directory:

traceview

For more information on how to use Traceview, see [Profiling with Traceview and dmtracedump].1

53 questions
31
votes
4 answers

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

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 methods as "parents" and called methods as "children." Reference Link : Click…
VISHAL VIRADIA
  • 1,388
  • 1
  • 15
  • 34
16
votes
1 answer

How can I zoom out the Timeline Panel in Eclipse SDK?

How can I zoom out the Timeline Panel when viewing a trace file in Eclipse SDK?
PhatHV
  • 8,010
  • 6
  • 31
  • 40
9
votes
1 answer

Is context switching using up significant time?

I have been having problem with an app (which uses both java and C++ and OpenCV) which appears to be very inconsistent in the amount of time it takes to perform various tasks. To help diagnose this, I made a function in java (called…
Mick
  • 8,284
  • 22
  • 81
  • 173
8
votes
1 answer

Android developer page: understanding traceview profiling example

I am looking at this page: Profiling with Traceview and dmtracedump Under "Profile Panel" it has the following text that refers to the sample profiling result below the text: The last column in the table shows the number of calls to this method…
I Z
  • 5,719
  • 19
  • 53
  • 100
7
votes
1 answer

Why is my Android app using CPU in the background?

I have been writing an Android app for several months now. It is not released yet, but it is installed in my device. Today I got a notification from the Battery Doctor app about my app consuming a lot of CPU, even though I hadn't used it since…
Jordi Chacón
  • 1,723
  • 1
  • 14
  • 20
7
votes
2 answers

How to start learning low level coding on Android

I have mostly worked on C, where I need to interact with the underlying hardware and O.S. Now I am shifting to Android applications. I will be writing applications that will be time critical and involve deep understanding of Android O.S and hardware…
gpuguy
  • 4,607
  • 17
  • 67
  • 125
6
votes
2 answers

Android: Where is the .trace file when Profiling with Traceview and Genymotion?

I'm reading this article here about running traceview on your android app: https://developer.android.com/studio/profile/traceview.html I assume the emulator they are talking about is the android emulator, not the Genymotion emulator which is the one…
Simon
  • 19,658
  • 27
  • 149
  • 217
6
votes
4 answers

Android, the standalone version of traceview is deprecated

I want to see my traces. 1- In code, I have added these lines of code: // Start trace recording android.os.Debug.startMethodTracing("hc_traceview"); and // Stop trace recording android.os.Debug.stopMethodTracing(); 2- I can see…
Hesam
  • 52,260
  • 74
  • 224
  • 365
6
votes
1 answer

Traceview cannot open from DDMS in eclipse

today I use DDMS as usual, but there is a error - it cannot show me the trace report, the trace view canot open, exception infos as follows, it's very strange, because it's OK some days ago. my android version is 4.0.3, eclipse 3.7, ADT 21, Mac OSX…
sam sha
  • 842
  • 9
  • 18
5
votes
1 answer

Difference between Android trace-based and sampling-based method profiling and its impact on reported cpu times

What is the difference between trace-based and sampling-based profiling methods in Android Traceview ? I thought trace-based is more accurate,however, It seems like it can distort the actual cpu times especially if there are other calls with a…
utengr
  • 3,225
  • 3
  • 29
  • 68
5
votes
0 answers

Difference between Android Monitor Method trace and Android Device Monitor

I profiled the same app for cpu time using both Android Device Monitor (method profiling) and Android Monitor (method profiling), however, I get different results. Any ideas on how they are different in their underlying working? 1) Android Device…
utengr
  • 3,225
  • 3
  • 29
  • 68
4
votes
1 answer

Android - Can't use traceview

I am trying to use traceview to run some profiling against an Android application. I have wrapped the code that I want to trace with the following lines: Debug.startMethodTracing("xxx"); // code Debug.stopMethodTracing(); It successfully generated…
Amokrane Chentir
  • 29,907
  • 37
  • 114
  • 158
4
votes
1 answer

Android: Difference between traceview and systrace tool

I''m learning to use those tools for performance profile. I have read Android document about both traceview and systrace but I don't see any main difference. They both have very same GUI: A timeline and all components on the left behave on this time…
Trần Kim Dự
  • 5,872
  • 12
  • 55
  • 107
4
votes
1 answer

Does startMethodTracing() return an error if the buffer fills?

Debug.startMethodTracing() by default uses an 8MB "buffer size". I have a number of questions about this buffer. Is an error thrown if the buffer fills to capacity, or does it just stop logging? Does the buffer remain a fixed 8MB regardless of how…
Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246
3
votes
0 answers

Which one is more accurate in traceview for relative comparison (Sampling-based or Trace-based method)?

I'm curious about which way is more accurate in the way traceview provides profiling such as sampling-based or trace-based. The documentation only talks about the overhead caused due to the two and in that context sampling-based is a better choice…
utengr
  • 3,225
  • 3
  • 29
  • 68
1
2 3 4