Skip to content
Snippets Groups Projects
Commit 39818465 authored by Matt Turner's avatar Matt Turner
Browse files

intel/perf: Use slimmer intel_perf_query_counter_data struct


intel_perf_query_counter contains fields for things we can't or don't
want to store in our static data (like runtime-determined max values) or
oa_read_counter function pointers which are dependent on the GPU gen and
would make deduplication very ineffective.

Cuts 16 KiB from iris_dri.so and libvulkan_intel.so.

   text    data     bss     dec     hex filename
 926811   43200       0  970011   ecd1b meson-generated_.._intel_perf_metrics.c.o (before)
 926811   25920       0  952731   e899b meson-generated_.._intel_perf_metrics.c.o (after)

   text    data     bss     dec     hex filename
14190852 408908  210004 14809764 e1faa4 iris_dri.so (before)
14190852 391628  210004 14792484 e1b724 iris_dri.so (after)

   text    data     bss     dec     hex filename
8184097  257464   22820 8464381  8127fd libvulkan_intel.so (before)
8184097  240184   22820 8447101  80e47d libvulkan_intel.so (after)

Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit df5e743c)

Part-of: <mesa/mesa!16405>
parent c0e75fa0
No related branches found
No related tags found
Loading
......@@ -736,7 +736,7 @@ def main():
output_counter_max(gen, set, counter)
c("\n")
c("static const struct intel_perf_query_counter counters[] = {\n")
c("static const struct intel_perf_query_counter_data counters[] = {\n")
c_indent(3)
counter_to_idx = collections.OrderedDict()
......@@ -762,7 +762,7 @@ def main():
int counter_idx, size_t offset,
uint64_t raw_max, oa_counter_read_func oa_counter_read_uint64)
{
const struct intel_perf_query_counter *counter = &counters[counter_idx];
const struct intel_perf_query_counter_data *counter = &counters[counter_idx];
dest->name = counter->name;
dest->desc = counter->desc;
......
......@@ -72,4 +72,14 @@ bdw_query_alloc(struct intel_perf_config *perf, int ncounters)
return query;
}
struct intel_perf_query_counter_data {
const char *name;
const char *desc;
const char *symbol_name;
const char *category;
enum intel_perf_counter_type type;
enum intel_perf_counter_data_type data_type;
enum intel_perf_counter_units units;
};
#endif /* INTEL_PERF_SETUP_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment