From cc45a9a3dbbaa51a480c56bea53c1803dbd1859f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 17 Aug 2013 17:38:37 +0100 Subject: 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 --- overlay/gpu-perf.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 overlay/gpu-perf.h (limited to 'overlay/gpu-perf.h') 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 + +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); -- cgit v1.2.3