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
3
votes
1 answer

Where is Traceview in Android Studio 1.2 Beta 3?

Android Studio was nicely integrated with Traceview (http://tools.android.com/tips/traceview). But I've recently updated to 1.2 Beta 3 and can't find this button. Can you help?
darja
  • 4,985
  • 9
  • 33
  • 47
3
votes
0 answers

Traceview profile: Handler.dispatchMessage using significant CPU time

I've just started to profile my app at its prototype stage using Traceview. I've found that the main user of cpu time (90%) is Handler.dispatchMessage. The main user of real time resource (50% combined) is MessageQueue.next and…
2
votes
1 answer

How to understand Android SDK profile traceview...?

I have some code that uses Jsoup to get and parse some html pages, and then I manipulate the html tree, before passing it to a WebView that draws it. If I bypass my manipulations, the code runs in acceptable times (2-3 seconds) on the Android SDK…
OppfinnarJocke
  • 1,038
  • 2
  • 9
  • 21
2
votes
1 answer

CPU utilisation curve from perfetto trace

I wanted to trace the CPU and memory utilization of one of my algorithm on a mobile device. So far I have implemented it in Android as an app and collected the resource utilization trace using Android profiler as a trace file (filename.trace). I…
2
votes
1 answer

Android Traceview (Sampling based trace) doesn't reflect the actual number of function calls

I'm profiling a function within an app which is executed every 5 seconds. However, I only see half of the calls in the "Calls + Rec/Total" option in the trace view. I am using samplebased profiling with 1 microsecond as a sampling interval. I tried…
utengr
  • 3,225
  • 3
  • 29
  • 68
2
votes
0 answers

Android app startup delay even when multiDex is disabled, TraceView shows Dalvic.system.DexFile runs on Startup

I have been on this for a few days and haven't found any solution anywhere. Initially startup time was quite long due to multidexing process. I managed to get rid of extra google service libraries which I am not using and get the code small enough…
2
votes
0 answers

Does Traceview Android 5 supports "Method/ trace based profiling" or is it just sampling-based profiler now?

In Android version <= 4.4, Traceview show all the functions executed by the app in it's execution order. It is implemented using the APIs provided by Profile.cc. Basic idea is that whenever dvm enters/exits a function profiler logs the function.…
aMa
  • 629
  • 3
  • 10
  • 19
2
votes
4 answers

Directory of Debug.startMethodTracing() trace file

I'm trying to execute an app and calculate the startup time using the Debug.startMethodTracing() but I can't find the trace file. I've already added the . The problem is that…
Equinox
  • 71
  • 8
2
votes
1 answer

Why is joda time get difference between hours taking so much of memory

I have the following function: public static int getDiffHour(Date first) { int hoursBetween = Hours.hoursBetween(new LocalDate(first), new LocalDate()).getHours(); return hoursBetween; } I am trying to get difference in hours…
Skynet
  • 7,820
  • 5
  • 44
  • 80
2
votes
0 answers

Nexus 5 + Android L: Executing am profile start from app produces app_process error

I try to execute "am profile start " within my Android app to profile another PID. From ADB everything works fine, for example: adb shell am profile 5397 start /sdcard/my.app.trace works. But trying to execute "am" or "pm", or anything that…
2
votes
1 answer

About (context switch) on Android Traceview

I'm starting to learn Android Traceview to improve Android apps performance, There is a concept that makes me confused! After tracing a method until the deepest level, in list of children methods, I see a (context switch) taking most of CPU time. My…
Toan Tran Van
  • 695
  • 1
  • 7
  • 25
2
votes
1 answer

TraceView Eclipse not working

I have ADT, Build: v22.0.0-675183. When I try to use TraceView I'm getting error after I stop tracing: Failed to create the part's controls java.lang.RuntimeException: Method exit (android/os/Debug.isMethodTracingActive ()Z) does not match current…
Krivers
  • 1,986
  • 2
  • 22
  • 45
2
votes
1 answer

Error while opening trace file in Traceview in Android

I am using ADT 20.0.3. I am opening my trace file using following command: C:>traceview "C:/Users/androdev/mytracefile.trace" But I am getting following error: Failed to read the trace filejava.io.IOException: Key section does not have an *end…
AndroDev
  • 3,236
  • 8
  • 35
  • 49
1
vote
3 answers

How to use the Traceview tool in Android?

I want the test performance of my application. I know have to use Traceview tool, but I don't know how to use it. Can anybody demonstrate how to use the Traceview tool?
user386430
  • 4,837
  • 13
  • 41
  • 45
1
vote
3 answers

Traceview doesn't work

My Android SDK is installed here D:\android-sdk-windows\tools I set all environment variables to tools and platform-tools. When I type traceview to cmd, it reports. C:\Users\HIEUGIOI>D:\android-sdk-windows\tools\traceview.bat Usage: java…
emeraldhieu
  • 9,380
  • 19
  • 81
  • 139