mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15237>
This commit is contained in:
parent
bbbbb0325b
commit
df5e743c80
2 changed files with 12 additions and 2 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue