0

I am using the Android systrace to study the dynamic behavior of the ExoPlayer opensource app. I am writing up the study notes as a PPT here!

Anyway, I love to see a way to automatically add LogCat API's log msg as event to the systrace, that way, the logcat events can shows up correlate with events in the systrace output graph.

Is there a way to do this easily?

I can hack the ASOP code, but figure someone in Google probably done this already.

tony-p-lee
  • 797
  • 1
  • 7
  • 13

1 Answers1

0

You can't feed logcat messages into systrace, but you can add custom events with the android.os.Trace class (API 18+). You then run systrace with the --app <appname> flag to include those tags.

For example, Grafika's "scheduled swap" activity adds some tags which you can see with a command line like:

systrace sched gfx view --app=com.android.grafika

The app name must match what you see in ps output.

fadden
  • 51,356
  • 5
  • 116
  • 166