mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
pan/perf: Fix pan_gen_perf.py format
This commit is contained in:
parent
5edbcca82b
commit
54d1a512a8
1 changed files with 10 additions and 8 deletions
|
|
@ -15,7 +15,7 @@ class SourceFile:
|
|||
self._indent = 0
|
||||
|
||||
def write(self, *args):
|
||||
code = ' '.join(map(str,args))
|
||||
code = ' '.join(map(str, args))
|
||||
for line in code.splitlines():
|
||||
text = ''.rjust(self._indent) + line
|
||||
self.file.write(text.rstrip() + "\n")
|
||||
|
|
@ -26,15 +26,17 @@ class SourceFile:
|
|||
def outdent(self, n):
|
||||
self._indent -= n
|
||||
|
||||
|
||||
CATEGORY_IDX_REMAP = {
|
||||
"Job Manager": "PAN_PERF_COUNTER_CAT_FRONTEND",
|
||||
"CSF": "PAN_PERF_COUNTER_CAT_FRONTEND",
|
||||
"Tiler": "PAN_PERF_COUNTER_CAT_TILER",
|
||||
"Memory System" : "PAN_PERF_COUNTER_CAT_MEMSYS",
|
||||
"L2 Cache": "PAN_PERF_COUNTER_CAT_MEMSYS",
|
||||
"Shader Core": "PAN_PERF_COUNTER_CAT_SHADER",
|
||||
"Job Manager": "PAN_PERF_COUNTER_CAT_FRONTEND",
|
||||
"CSF": "PAN_PERF_COUNTER_CAT_FRONTEND",
|
||||
"Tiler": "PAN_PERF_COUNTER_CAT_TILER",
|
||||
"Memory System" : "PAN_PERF_COUNTER_CAT_MEMSYS",
|
||||
"L2 Cache": "PAN_PERF_COUNTER_CAT_MEMSYS",
|
||||
"Shader Core": "PAN_PERF_COUNTER_CAT_SHADER",
|
||||
}
|
||||
|
||||
|
||||
class Counter:
|
||||
# category Category owning the counter
|
||||
# xml XML representation of itself
|
||||
|
|
@ -197,7 +199,7 @@ def main():
|
|||
c.write("\nconst struct pan_perf_config * pan_perf_configs[] = {")
|
||||
c.indent(tab_size)
|
||||
for prod in prods:
|
||||
c.write("&pan_perf_config_%s," % prod.id)
|
||||
c.write("&pan_perf_config_%s," % prod.id)
|
||||
c.outdent(tab_size)
|
||||
c.write("};")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue