diff options
author | Lionel Landwerlin <[email protected]> | 2019-09-04 17:05:47 +0300 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2020-05-20 14:02:27 +0300 |
commit | 8b8eaa84a3e80d1df1c2467dc31432824cffd610 (patch) | |
tree | 7d2a328b8024b5399baabce8898ebebd52856217 /src/intel | |
parent | cc13bfbd05934f4053b633627f5bd2ef1108537b (diff) |
intel/perf: make pipeline statistic query loading optional
On Vulkan most of those are already covered by standard queries so
add the ability to skip them.
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2775>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/perf/gen_perf.c | 9 | ||||
-rw-r--r-- | src/intel/perf/gen_perf.h | 3 | ||||
-rw-r--r-- | src/intel/vulkan/anv_perf.c | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/intel/perf/gen_perf.c b/src/intel/perf/gen_perf.c index 189f71f6575..169bdd211e0 100644 --- a/src/intel/perf/gen_perf.c +++ b/src/intel/perf/gen_perf.c @@ -847,10 +847,13 @@ gen_perf_query_result_clear(struct gen_perf_query_result *result) void gen_perf_init_metrics(struct gen_perf_config *perf_cfg, const struct gen_device_info *devinfo, - int drm_fd) + int drm_fd, + bool include_pipeline_statistics) { - load_pipeline_statistic_metrics(perf_cfg, devinfo); - gen_perf_register_mdapi_statistic_query(perf_cfg, devinfo); + if (include_pipeline_statistics) { + load_pipeline_statistic_metrics(perf_cfg, devinfo); + gen_perf_register_mdapi_statistic_query(perf_cfg, devinfo); + } if (load_oa_metrics(perf_cfg, drm_fd, devinfo)) gen_perf_register_mdapi_oa_query(perf_cfg, devinfo); } diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h index a3909165838..3f933a664fa 100644 --- a/src/intel/perf/gen_perf.h +++ b/src/intel/perf/gen_perf.h @@ -252,7 +252,8 @@ struct gen_perf_config { void gen_perf_init_metrics(struct gen_perf_config *perf_cfg, const struct gen_device_info *devinfo, - int drm_fd); + int drm_fd, + bool include_pipeline_statistics); /** Query i915 for a metric id using guid. */ diff --git a/src/intel/vulkan/anv_perf.c b/src/intel/vulkan/anv_perf.c index 9ee54a8c2a4..133315b2c8d 100644 --- a/src/intel/vulkan/anv_perf.c +++ b/src/intel/vulkan/anv_perf.c @@ -35,7 +35,7 @@ anv_get_perf(const struct gen_device_info *devinfo, int fd) { struct gen_perf_config *perf = gen_perf_new(NULL); - gen_perf_init_metrics(perf, devinfo, fd); + gen_perf_init_metrics(perf, devinfo, fd, false /* pipeline statistics */); /* We need DRM_I915_PERF_PROP_HOLD_PREEMPTION support, only available in * perf revision 2. |