aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/perf
diff options
context:
space:
mode:
authorMark Janes <[email protected]>2019-07-02 14:21:57 -0700
committerMark Janes <[email protected]>2019-08-07 21:33:55 -0700
commit439d5a3eff188b4e0be42fd6da3a4d233fffcbf3 (patch)
treece7860263b99a1e80828c6a47c001dadec48aafd /src/intel/perf
parentea66484e8604edf75df9f95c9e94b73f1e80639d (diff)
intel/perf: create a vtable for low-level driver functions
Performance metrics collections requires several actions (eg bo_map()) that have different implementations for Iris and i965. The perf subsystem needs a vtable for each of these actions, so it can invoke the corresponding implementation for each driver. The first call to be added to the table is bo_alloc. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/perf')
-rw-r--r--src/intel/perf/gen_perf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h
index f6de5caf8c9..fa7d7f87c57 100644
--- a/src/intel/perf/gen_perf.h
+++ b/src/intel/perf/gen_perf.h
@@ -188,6 +188,10 @@ struct gen_perf_config {
/* Location of the device's sysfs entry. */
char sysfs_dev_dir[256];
+
+ struct {
+ void *(*bo_alloc)(void *bufmgr, const char *name, uint64_t size);
+ } vtbl;
};
static inline size_t