diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2020-03-10 18:18:24 +0200 |
---|---|---|
committer | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2020-04-02 10:56:14 +0300 |
commit | 8b9dd4d43015f4952217a690b51d63d9f66e98d0 (patch) | |
tree | 5500ea78f450de154c41190079836bba5e2753a0 /lib/meson.build | |
parent | 975e64aa98fc25f6d3944c639976497530d96415 (diff) |
lib/i915/perf: break generated code in separate files
Initially all the generated code was per generation. Eventually we
grouped it into a single file to reuse as much as possible equation
code (this reduce binary size by a factor). So many equations are just
the same from generation to generation.
But this generated file is 200k lines long...
This change puts all the equations into a single file, so that we
reuse as much code as possible, and then breaks down the metric sets &
register configurations into per generation files.
v2: Split registers away from the metric set descriptions
v3: Fix automake
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib/meson.build')
-rw-r--r-- | lib/meson.build | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/lib/meson.build b/lib/meson.build index 8112bec4..e2060430 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -195,16 +195,46 @@ foreach hw : i915_perf_hardware endforeach i915_perf_files += custom_target( - 'i915-perf-metrics', + 'i915-perf-equations', input : i915_xml_files, - output : [ 'i915_perf_metrics.c', 'i915_perf_metrics.h' ], + output : [ 'i915_perf_equations.c', 'i915_perf_equations.h' ], command : [ - find_program('i915/perf-configs/perf-codegen.py'), + find_program('i915/perf-configs/perf-equations-codegen.py'), '--code', '@OUTPUT0@', '--header', '@OUTPUT1@', '@INPUT@', ]) +i915_perf_register_codegen = find_program('i915/perf-configs/perf-registers-codegen.py') +i915_perf_metrics_codegen = find_program('i915/perf-configs/perf-metricset-codegen.py') + +foreach hw : i915_perf_hardware + i915_perf_files += custom_target( + 'i915-perf-registers-@0@'.format(hw), + input : 'i915/perf-configs/oa-@0@.xml'.format(hw), + output : [ 'i915_perf_registers_@0@.c'.format(hw), + 'i915_perf_registers_@0@.h'.format(hw), ], + command : [ + i915_perf_register_codegen, + '--code', '@OUTPUT0@', + '--header', '@OUTPUT1@', + '--xml-file', '@INPUT@' + ]) + i915_perf_files += custom_target( + 'i915-perf-metrics-@0@'.format(hw), + input : 'i915/perf-configs/oa-@0@.xml'.format(hw), + output : [ 'i915_perf_metrics_@0@.c'.format(hw), + 'i915_perf_metrics_@0@.h'.format(hw), ], + command : [ + i915_perf_metrics_codegen, + '--code', '@OUTPUT0@', + '--header', '@OUTPUT1@', + '--equations-include', 'i915_perf_equations.h', + '--registers-include', 'i915_perf_registers_@0@.h'.format(hw), + '--xml-file', '@INPUT@', + ]) +endforeach + lib_igt_i915_perf_build = shared_library( 'i915_perf', i915_perf_files, |