0

So android studio has this really nice tool that can help you monitor and track GPU work, the problem is i cant get it to work on my live wallpaper app. I would like to see the stats when i debug my live wallpaper(All other debugging options work just fine, including memory, CPU and network monitoring). Is there a way to make it work? if not is there an android API that will let me access this data so that i can log it by myself? Thanks

Edit: To clarify: I am not using an activity, i am in a context base app no activity is present while i draw. I have used > adb shell dumpsys gfxinfo and it only updates the data if an activity is running. What i need is gfxinfo for non activity drawings.

Eliahu Horwitz
  • 499
  • 3
  • 17
  • You might want to give some more detail as to which GPU monitoring you are using: https://developer.android.com/studio/profile/gpu.html If you are doing the first one, have you tried the dumpsys gfxinfo https://developer.android.com/training/testing/performance.html – Morrison Chang May 23 '16 at 22:14
  • I was referring to the profile gpu rendering and the gpu debug, these tools have much stronger capabilities now with android M. The second link seems helpful, I'll test. The only problem is even I try to dump gfx trace trough android studio rather then trough adb shell I get a socket connection reset exception. – Eliahu Horwitz May 24 '16 at 04:07
  • I have tried your solution but as i explain in my edit it only works if i am in an activity. any idea? – Eliahu Horwitz May 24 '16 at 14:57
  • Can you elaborate on why you need that data which couldn't be extracted from when you are running it as an activity? And/or use a plain/empty/simple home activity and see if the performance issues you are looking for show up there when your wallpaper is running. – Morrison Chang May 24 '16 at 15:47
  • As a result of using wallpaper service I am forced to draw to a canvas which I get from a surface holder, the only time I can actually simulate the real behavior of the live wallpaper is when it is actually running. Thus I need to use a real wallpaper. I have tried to use all different GPU test like over draw, flash on update etc. Non work when I am on the home screen without an activity. – Eliahu Horwitz May 24 '16 at 15:59
  • Ah okay. If you are drawing sprite type objects I would have thought you would be using OpenGL ES - http://stackoverflow.com/questions/6485667/android-live-wallpapers-opengl-vs-canvas and http://stackoverflow.com/questions/8043519/open-gles-or-canvas-android – Morrison Chang May 24 '16 at 16:18

0 Answers0