Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call trace in Android

Tags:

android

I want to know how to do method tracing for Android applications. I mean, a sequence of calls on each object, not a stack trace.

It's very similar to this question (Call trace in java), but on different platforms (jvm-PC vs dvm-Android). I have no control over the start arguments of dalvik, thus I cannot specify a java agent (or am I wrong here?). Is there another way to do method tracing?

Thanks!

like image 309
DenMark Avatar asked Oct 14 '22 06:10

DenMark


1 Answers

The Runtime.traceMethodCalls() method mentioned in the answers to the linked question is in fact wired up in Android. It just starts the method profiling feature with default arguments. For more details, read the article about method profiling and traceview in the Android documentation.

like image 179
fadden Avatar answered Nov 15 '22 08:11

fadden