X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fintel%2Fperf%2Fgen_perf.h;h=790719ccbadad3960acea2d5f1d7e1af2d3f39ec;hp=c9c8a3042a8fdc1ac56db6d066c487e61907e555;hb=ec1fa1d51ff614c19d08c949482b40c060de48c9;hpb=93924ab0917b52be1a3001509b229c87b7ee6e54 diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h index c9c8a3042a8..790719ccbad 100644 --- a/src/intel/perf/gen_perf.h +++ b/src/intel/perf/gen_perf.h @@ -171,7 +171,6 @@ struct gen_perf_query_counter { enum gen_perf_counter_units units; uint64_t raw_max; size_t offset; - uint64_t query_mask; union { uint64_t (*oa_counter_read_uint64)(struct gen_perf_config *perf, @@ -191,13 +190,13 @@ struct gen_perf_query_register_prog { /* Register programming for a given query */ struct gen_perf_registers { - struct gen_perf_query_register_prog *flex_regs; + const struct gen_perf_query_register_prog *flex_regs; uint32_t n_flex_regs; - struct gen_perf_query_register_prog *mux_regs; + const struct gen_perf_query_register_prog *mux_regs; uint32_t n_mux_regs; - struct gen_perf_query_register_prog *b_counter_regs; + const struct gen_perf_query_register_prog *b_counter_regs; uint32_t n_b_counter_regs; }; @@ -208,6 +207,7 @@ struct gen_perf_query_info { GEN_PERF_QUERY_TYPE_PIPELINE, } kind; const char *name; + const char *symbol_name; const char *guid; struct gen_perf_query_counter *counters; int n_counters; @@ -228,6 +228,21 @@ struct gen_perf_query_info { struct gen_perf_registers config; }; +struct gen_perf_query_counter_info { + struct gen_perf_query_counter *counter; + + uint64_t query_mask; + + /** + * Each counter can be a part of many groups, each time at different index. + * This struct stores one of those locations. + */ + struct { + int group_idx; /* query/group number */ + int counter_idx; /* index inside of query/group */ + } location; +}; + struct gen_perf_config { /* Whether i915 has DRM_I915_QUERY_PERF_CONFIG support. */ bool i915_query_supported; @@ -241,7 +256,7 @@ struct gen_perf_config { struct gen_perf_query_info *queries; int n_queries; - struct gen_perf_query_counter **counters; + struct gen_perf_query_counter_info *counter_infos; int n_counters; /* Variables referenced in the XML meta data for OA performance @@ -268,6 +283,11 @@ struct gen_perf_config { */ struct hash_table *oa_metrics_table; + /* When MDAPI hasn't configured the metric we need to use by the time the + * query begins, this OA metric is used as a fallback. + */ + uint64_t fallback_raw_oa_metric; + /* Whether we have support for this platform. If true && n_queries == 0, * this means we will not be able to use i915-perf because of it is in * paranoid mode.