Robust
Robust

Reputation: 259

How do I check GPU usage of Android device?

I wanted to calculate the GPU usage. Is there any file for GPU similar the way cpu stats are saved at /proc/stat ?

What could be the approach to get the GPU details like frequency etc

Thanks

Upvotes: 14

Views: 32328

Answers (6)

RuThaN
RuThaN

Reputation: 1

In this video you can see some nice PC like performance overlay: https://www.youtube.com/watch?v=ViCA--Wi26s&t=892s

But im failing to find any details, maybe its device specific.

Update: App is named CPU float and could be donwloaded from Google Play store: https://play.google.com/store/apps/details?id=com.waterdaaan.cpufloat&hl=en&gl=US

Here is video how to make it run: https://www.youtube.com/watch?v=dAH9ywQQKD8 Download, start app, start game or app and look at stats.

Set of stats depends on your device and how is supported by app and app future updates. So far there is GPU stats only for some GPUs and there is not % CPU but only CPU cores frequency in MHz, but its still best Android OSD, which i found.

Show case

Upvotes: 0

user1300214
user1300214

Reputation:

If you want to optimise your GL pipeline code you may find Fencing a simple alternative or complementary tool. Here's an example in Kotlin:

    override fun onDrawFrame(unused: GL10) {

        if(glPipelineFence != null) { // if it's the first pass then ignore
            // block until the GPU has reached the pipeline fence
            val result = glClientWaitSync(glPipelineFence!!, 0, 1000000000)
            if (result == GL_TIMEOUT_EXPIRED) Log.v("myinfo", "gl fence error: expired")
            if (result == GL_WAIT_FAILED) Log.v("myinfo", "gl fence error: failed")
            glDeleteSync(glPipelineFence!!)
        }

        // YOUR OPEN GL ES STUFF GOES HERE

        glPipelineFence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0)
    }

You can then use a delta on e.g. System.currentTimeMillis() either side of glClientWaitSync or for the whole function scope to see how long your pipeline is taking. The glClientWaitSync will block until the OpenGL ES pipeline executes the fence command right at the end.

Upvotes: 0

Ben Clark
Ben Clark

Reputation: 487

For Arm Mali GPUs, you can use Streamline, a performance profiler that is part of Arm Mobile Studio: https://developer.arm.com/tools-and-software/graphics-and-gaming/arm-mobile-studio/components/streamline-performance-analyzer

Mobile Studio is free, and there are some good video tutorials for it.

Upvotes: 2

Ben Butterworth
Ben Butterworth

Reputation: 29008

AGI (Android GPU Inspector) by Google, is currently in Open Beta, and only supports the following devices:

DEVICE NAME GPU NAME
Google Pixel 4 (standard and XL)    Qualcomm® Adreno™ 640
Google Pixel 5  Qualcomm® Adreno™ 620
Google Pixel 4a 5G  Qualcomm® Adreno™ 620

These devices do not support AGI yet but will offer support in the future:
DEVICE NAME GPU NAME
Google Pixel 4a Qualcomm® Adreno™ 618
Samsung Galaxy S10 series   Qualcomm® Adreno™ 640 and Arm® Mali™ G76
Samsung Galaxy S20 series   Qualcomm® Adreno™ 650 and Arm® Mali™ G77
Samsung Galaxy Note 10 series   Qualcomm® Adreno™ 640 and Arm® Mali™ G76
Samsung Galaxy Note 20 series   Qualcomm® Adreno™ 650 and Arm® Mali™ G77

This will allow you to profile your app's GPU usage.

Upvotes: 1

GnomeDePlume
GnomeDePlume

Reputation: 1662

Since Android 4.3 (Jelly Bean) you can monitor this from a tool in Dev Options.

Seetings > More > Developer Options > Profile GPU Rendering.

You may need to enable Developer Options on Android 4.2 as it is hidden by default. Enable this by tapping 7 times on Settings > About phone > Build number.

Profile GPU Rendering has a few options, 'show on screen as bars' is quite a good way to get a fast visual look at what's going on.

enter image description here

Upvotes: 5

Pramod J George
Pramod J George

Reputation: 1723

GPUz will help you track GPU usage of any graphics application. It can display memory usage and GPU load briefly, and probably works with most hardwares.

Upvotes: -2

Related Questions