summaryrefslogtreecommitdiff
path: root/overlay/gpu-perf.h
diff options
context:
space:
mode:
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);