MTMD
MTMD

Reputation: 1232

How to determine Android GPU Clock?

It is possible to dynamically query an Android device for the current CPU clock similar to what is mentioned in what follows.

adb shell "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq"

However, it seems like there is not a similar option for GPU. I was wondering if there is a way, anything, to do the same for GPUs. Any help is greatly appreciated.

(CPU/GPU frequencies are not good indicators of speed. I mainly need them for some study on DVFS)

Upvotes: 3

Views: 7247

Answers (2)

Josh Graham
Josh Graham

Reputation: 153

How I found the GPU freq and % for Android Galaxy S5 on OSX/Linux

  1. Attach your phone for debugging.
  2. In terminal: ./adb -s shell dumpsys SurfaceFlinger
  3. Find the line with "GLES:"
  4. The GPU name is there. For the galaxy s5 it is "Mali-T628"
  5. ./adb shell find "/sys/" -type f
  6. Search through and find the "mali" folder
  7. use adb shell cat to investigate what the files contain
  8. Used ./adb shell cat /sys/devices/11800000.mali/utilization, which lists the gpu used % as an integer
  9. Used ./adb shell cat /sys/devices/11800000.mali/clock, which lists the gpu freq as an integer
  10. Use those integers in your perf reporting

Upvotes: 3

MTMD
MTMD

Reputation: 1232

As Amin mentioned, the best solution is using the profiler. I used Android profiler (like) to measure the performance.

Upvotes: 0

Related Questions