summaryrefslogtreecommitdiff
path: root/overlay/gpu-perf.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-17 17:38:37 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-17 17:42:14 +0100
commitcc45a9a3dbbaa51a480c56bea53c1803dbd1859f (patch)
treed93cadddf82a17709d06103b019c4bdbf9641033 /overlay/gpu-perf.h
parent06c0cc0bb42d0a3f1c72e0c0d85d15107a392069 (diff)
overlay: Primitive integration with perf
We can now record when a pageflip occurs by listening for the flip tracepoint. Merely proof of principle at this point. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/gpu-perf.h')
-rw-r--r--overlay/gpu-perf.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/overlay/gpu-perf.h b/overlay/gpu-perf.h
new file mode 100644
index 00000000..58bf3062
--- /dev/null
+++ b/overlay/gpu-perf.h
@@ -0,0 +1,18 @@
+#include <stdint.h>
+
+struct gpu_perf {
+ int page_size;
+ int nr_cpus;
+ int nr_events;
+ int *fd;
+ void **map;
+ struct gpu_perf_sample {
+ uint64_t id;
+ int (*func)(struct gpu_perf *, void *);
+ } *sample;
+
+ int flip_complete;
+};
+
+void gpu_perf_init(struct gpu_perf *gp, unsigned flags);
+int gpu_perf_update(struct gpu_perf *gp);