[MUSIC PLAYING]
JAY KONG: Hello, my name is Jay Kong,
and I'm a product manager at Google working
on Android gaming and graphics.
Today, I'd like to introduce the new Android GPU Inspector.
So we've talked with a bunch of game developers,
and we've heard you.
Graphic optimizations is very hard on Android.
The GPU on Android is like a black box.
To optimize a game, you often have
to rely on insights provided by other platforms.
Plus, different GPUs required different vendor tools,
which does not make for a very good developer experience.
The Android Graphics Team is putting in a lot of work
to address that.
So today, we're proud to announce the developer preview
of Android GPU Inspector.
Android GPU Inspector is an open source graphics profiling
tool that supports GPUs from different vendors.
Our vision is to help you profile and debug
graphics on Android regardless of device.
With this tool, you'll be able to look into your Android GPU
at a level of detail that was not achievable before.
We've worked very closely with Qualcomm, Arm, Imagination,
and Samsung Mobile to make this possible.
We'd like to thank them for their ongoing support
and collaboration on this project.
Next, let's dive quickly into the features of Android GPU
Inspector.
This tool can take a trace of events from your entire system.
That includes system activities and hardware counters.
Once you take them, it plots them
on a timeline similar to our Systrace tool.
However, the key difference from Systrace
is that Android GPU Inspector provides GPU hardware counters
and activity information.
I'll now show you a few real world examples
that we've encountered.
So this is an example of a real Android game out there.
I'm going to walk through it.
In the screenshot as part of this trace
we took, we see both clocks per second and GPU utilization.
Looking at these hardware counters more carefully,
we can see when the GPU is executing
and clearly identify GPU frame times.
Knowing the GPU frame time, we can quickly
tell if the GPU workflow needs to be optimized
to hit our desired frame rate.
Here, we can see that the frame time is about 22 milliseconds.
If we want to hit 60 frames per second,
we'll need to make some optimizations.
We can also dive deeper to look at more complex GPU hardware
counters to see where we can make those optimizations to hit
60 frames per second.
Here, we can look at information about texture cache misses.
The percentage of L1 texture cache
misses, peaks at about 71%.
This is extremely high and shows that the game is likely
misusing texture cache and is using more memory
bandwidth than necessary.
This means there is likely some huge optimizations
opportunities out there.
So we briefly touched upon a few hardware counters
in this example.
There are many more different types
of hardware counters that can help you with your performance
analysis through this tool.
Now, we have a different trace.
Besides hardware counters, we can also
see CPU thread activity as well as Vulcan GPU activity.
In the bottom set of GPU activity tracks,
we can see a vkQueueSubmit submit event in yellow and that
it points towards the associated GPU activity information
in blue and purple.
This information tells us how long
it takes between when the app submits the work
and when the GPU starts to process it.
Knowing this helps us identify bubbles in the pipeline.
I've talked about various individual features
of what we call the systems profiling mode.
Android GPU Inspector truly shines
when we put all of these various capabilities together.
Here's an example of a real-world Vulcan
game that doesn't handle player rotation correctly.
It's an issue we've seen in a lot of Vulcan titles out there.
But we were never able to quantify the impact
until we built this tool.
So with CPU activity in the bottom track,
we can see that the CPU is about spending roughly about
2.4 milliseconds doing this rotation work.
Then as we follow the timeline, we
can also see that GPU utilization increases
by about 40%.
This means there is an increase in power usage
and a decrease in battery life.
In parallel on the top track, we can
see that the GPU is spending about 3 milliseconds
doing this work.
Since this issue happens in every single frame, solving it
presents a huge optimization opportunity.
We've also worked on this tool with a few game partners,
like Jam City, Blizzard Entertainment, and Gameloft.
We also want to thank them for working with us
and providing feedback on the Android GPO Inspector.
We also partnered with Crytek using
the tools to help them optimize CryEngine for Android.
As you might have heard in the keynote, CryEngine for Android
will be available in the near future.
You can learn more about CryEngine
at the URL listed on the slide.
While it's super helpful to be able to see
how the overall system is performing as our game runs,
sometimes we want more information,
like being able to dive deeply into a single frame to profile
and debug it.
This is something that we're working on.
And GPU frame profiling mode is a top area
of focus for our team.
Also as hinted before, the tool is currently Vulcan first.
Improved OpenGLES support is also
something the team is very focused on.
The tool currently supports Pixel 4, Pixel 4 XL,
Samsung Galaxy Note 10, and Samsung Galaxy S10.
Both the XMLS and the Qualcomm versions of the Samsung devices
are supported.
While we're still working on the number of supported devices,
it's extremely important to remember
that the vast majority of optimizations
are device independent.
Being able to look into an Android GPU
unlocks a lot of low hanging fruit.
Both the Samsung and Pixel devices
are utilizing updatable graphics drivers to power the tool.
We've also heard from you that a key pain point on Android
is that graphics drivers are not very updatable.
This is something that we've placed a lot of focus
on as well.
The Android GPU Inspector would not
be possible without updatable graphic drivers.
This also means that as our hardware partners continue
to improve the quantity and the quality of information
they export through the driver, you'll
be able to reap those benefits on your existing devices.
Well, thank you very much for watching this video.
Please sign up for the Android GPO Inspector Developer Preview
at the following link on the slide.
We're very excited to hear your feedback on it.
Once again, thank you.
[MUSIC PLAYING]