intel/perf: add counter category to generated code

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2775>
This commit is contained in:
Lionel Landwerlin
2018-11-14 13:26:37 +00:00
parent c36933e081
commit fe8e8e5099
2 changed files with 2 additions and 0 deletions

View File

@@ -164,6 +164,7 @@ struct gen_perf_query_counter {
const char *name;
const char *desc;
const char *symbol_name;
const char *category;
enum gen_perf_counter_type type;
enum gen_perf_counter_data_type data_type;
enum gen_perf_counter_units units;

View File

@@ -383,6 +383,7 @@ def output_counter_report(set, counter, current_offset):
c("counter->name = \"" + counter.get('name') + "\";\n")
c("counter->desc = \"" + counter.get('description') + "\";\n")
c("counter->symbol_name = \"" + counter.get('symbol_name') + "\";\n")
c("counter->category = \"" + counter.get('mdapi_group') + "\";\n")
c("counter->type = GEN_PERF_COUNTER_TYPE_" + semantic_type_uc + ";\n")
c("counter->data_type = GEN_PERF_COUNTER_DATA_TYPE_" + data_type_uc + ";\n")
c("counter->units = GEN_PERF_COUNTER_UNITS_" + output_units(counter.get('units')) + ";\n")