summaryrefslogtreecommitdiff
path: root/PerformanceCounters.mdwn
diff options
context:
space:
mode:
authorhakzsam <hakzsam@web>2016-11-08 17:49:38 +0000
committernouveau <iki-nouveau@freedesktop.org>2016-11-08 17:49:38 +0000
commit355fa655122fcce597edb4fbf85a8e8fa5645da2 (patch)
tree51cdcf88f8ef8810349a9291c3686e1aac3e4500 /PerformanceCounters.mdwn
parent752613489b8764d7b56e2fb6e1280e2a6b716bf8 (diff)
add why/how use perf counters
Diffstat (limited to 'PerformanceCounters.mdwn')
-rw-r--r--PerformanceCounters.mdwn30
1 files changed, 28 insertions, 2 deletions
diff --git a/PerformanceCounters.mdwn b/PerformanceCounters.mdwn
index 7ff6090..7a4ad9f 100644
--- a/PerformanceCounters.mdwn
+++ b/PerformanceCounters.mdwn
@@ -2,10 +2,36 @@
<div id="google_translate_element"></div>
<script type="text/javascript" src="/wiki/translate.js"></script>
-** PAGE UNDER CONSTRUCTION **
-
[[!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
+
+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.