Commit 355fa655 authored by hakzsam's avatar hakzsam Committed by nouveau
Browse files

add why/how use perf counters

parent 75261348
......@@ -2,10 +2,36 @@
<div id="google_translate_element"></div>
<script type="text/javascript" src="/wiki/translate.js"></script>
[[!toc startlevel=1 levels=2]]
# Why use performance counters?
Performance counters are really useful in order to find bottlenecks in real applications. They report very accurate metrics regarding how the GPU is idle/busy.
# How to use performance counters?
GALLIUM_HUD is an environment variable in mesa which can be used to monitor performance counters with a nice interface.
To get the list of available queries (which can be different regarding your chipset), run 'GALLIUM_HUD="help" glxgears'.
Once you have that list, select which queries you want to monitor, for example 'inst_executed' and start monitoring with 'GALLIUM_HUD="inst_executed" glxgears'.
## apitrace
apitrace is tool for tracing graphics APIs like OpenGL, but it can also be used to replay a trace and monitor perf counters per frames or per draw-calls.
To get the list of available queries, run 'glretrace --list-metrics <my.trace>'. You will see different backends like GL_AMD_performance_monitor and opengl. In each backends, you can have different groups of queries, like "MP counters" and "Performance metrics".
Once you have that list, select which queries you want to monitor before replaying the trace and run 'glretrace --pframes=GL_AMD_performance_monitor:inst_executed' for example.
# Global perf counters
These performance counters are global. They are configured through PCOUNTER by writing values directly to MMIO. The kernelspace interface is already merged but the userspace one is still WIP.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment