intel/perf: add counter category to generated code
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 14 Nov 2018 13:26:37 +0000 (13:26 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 20 May 2020 11:02:27 +0000 (14:02 +0300)
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>

src/intel/perf/gen_perf.h
src/intel/perf/gen_perf.py

index 6e02702ea00812167300c4e7cce9c99dcfabf20c..3c6b9010bd7d256fb9b7b8fa187fa80317494137 100644 (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;
index a64d6ac3d5fd300aa4b5f5b7d48e4bc5dabce4a9..dfe8e4dd25f7ab8c779f8ac5914b555a2e67c039 100644 (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")