PowerVR Graphics SDK tools explained: Getting started with PVRScopeStats

Share on linkedin
Share on twitter
Share on facebook
Share on reddit
Share on digg
Share on email

For this blog post I will assume that you are somewhat familiar with the PowerVR architecture and even played a bit with PVRTune, our GPU profiler.

PVRScopeDeveloper is included in our public PowerVR Graphics SDK. It is distributed as a set of headers (.h) and a static library (.a) for every major architecture.

PVRScope overview

PVRScope: HWperfPVRScopeDeveloper is a utility library which has twofold functionality, illustrated below:

  1. PVRScopeStats – Access the hardware performance counters in PowerVR hardware via a driver library called PVRScopeServices.
  2. PVRScopeComms – Send user defined information to PVRTune via PVRPerfServer as counters, timing data, and marks, or editable data that can be passed back to the application.

In this blog post I will focus only on PVRScopeStats, while I’ll tackle PVRScopeComms in an upcoming article.

PVRScopeServices, the man behind the curtain

PVRScopeServices is part of our user-space driver. We actively encourage all our Android and Linux customers to include PVRScopeServices in their release devices as it enables PVRTune graphics performance analysis. This means that we can assume pretty safely that any Android/Linux PowerVR device will also have PVRScopeServices built-in.

It lives along with the rest of our user space driver (i.e. /system/vendor/lib/libPVRScopeServices.so).

A closer look to the data:

PVRScopeDeveloper exposes the PowerVR hardware performance data (“HWPerf data” from now on) to any user-space application. Let’s look at the data closely:


Where does the HWPerf data come from?

PowerVR, due to its unique TBDR architecture featuring a MicroKernel, dumps all the performance counter values into a circular buffer in the kernel memory space (we call it the HWPerf CB).

That data is read by the kernel driver and pushed to the user-space when requested by PVRScopeServices.

Note: Once that data is read, it gets “consumed” so is no longer available in the kernel. This prevents more than one “PVRScope enabled” applications (including PVRPerfServer) to run at the same time.

What stats are we exposing in PVRScopeDeveloper?

The full counter list depends on the device but most counters are common to all devices. An exhaustive list can be found in the PVRTune user manual.

For example, the counters on the Active Group 0 (for SGX540 running the 1.8 DDK) are:

  • Frame time
  • Frames per second (FPS)
  • GPU task load: 2D core
  • GPU task load: 3D core
  • GPU task load: CDM core
  • GPU task load: TA core
  • TA load
  • Texture unit(s) load
  • USSE clock cycles per pixel
  • USSE clock cycles per vertex
  • USSE load: Pixel
  • USSE load: Vertex
  • Vertices per frame
  • Vertices per second

What can you do with this data?

There are many reasons to include PVRScopeDeveloper on any application you are profiling. For example you could graph the data to find any performance spikes, generate reports to plot them afterwards or simply feed that data to any other custom tool.

PVRScope: example

The PowerVR SDK includes two PVRScopeDeveloper examples:

  • PVRScopeExample (uses PVRScopeStats) – Demonstrates the use of pvrscope and the example graphing code that allows an application to return performance statistics from the GPU in real time.
  • PVRScopeRemote (uses PVRScopeComms) – Demonstrates the use of PVRScope’s remote communication features, this example shows how to use the editable data and custom mark functionality. PVRTune must be running and connected to an instance of PVRPerfServer running on the target device for this demo to function.

Don’t forget to check our PVRScopeDeveloper examples included in the PowerVR SDK and follow us on Twitter (@ImaginationTech and @PowerVRInsider) for the latest news and announcements for PowerVR developers!

Guillem Vinals Gangolells

Guillem Vinals Gangolells

I'm a Developer Technologies Engineer for the PowerVR division in Imagination Technologies, company in which I've been working since early 2011. My main task consists in the design of developer tools as well as in the integration of the PowerVR graphics in the Android ecosystem. Leaving the technical part aside, I also travel to some international events in order to collect feedback, give technical talks and meet with other companies

2 thoughts on “PowerVR Graphics SDK tools explained: Getting started with PVRScopeStats”

  1. Hi,
    Thanks for such nice article. I have some queries and would really appreciate if you could help me with answering them:
    1. What is active group? In PVRScopeSetGroup() api also we need to pass some group number, what is this group number?
    2. If I have 2 different OS running on 2 different CPU cores using hypervisor, then how can I get the GPU performance counters for them separately?
    3. Does PVRScopeStats also give me CPU load and System memory load information?
    Thanks in advance!!

    • Hi Vinay
      Sorry for the delay replying. some answers and follow up questions below:
      1. When you query the counters (PVRScopeGetCounters) they each state exactly which group they are in.
      2. Which platform are using?
      3. No, it does not.


Please leave a comment below

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted. We respect your privacy and will not publish your personal details.

Blog Contact

If you have any enquiries regarding any of our blog posts, please contact:

United Kingdom

Tel: +44 (0)1923 260 511

Search by Tag

Search by Author

Related blog articles

bseries imgic technology

Back in the high-performance game

My first encounter with the PowerVR GPU was helping the then VideoLogic launch boards for Matrox in Europe. Not long after I joined the company, working on the rebrand to Imagination Technologies and promoting both our own VideoLogic-branded boards and those of our partners using ST’s Kyro processors. There were tens of board partners but only for one brief moment did we have two partners in the desktop space: NEC and ST.

Read More »
pvrtune complete

What is PVRTune Complete?

PVR Tune Complete highlights exactly what the application is doing at the GPU level, helping to identify any bottlenecks in the compute stage, the renderer, and the tiler.

Read More »


Sign up to receive the latest news and product updates from Imagination straight to your inbox.