[Mesa-dev] [PATCH shader-db 2/2] si-report.py: print more regressed and bad shaders
Marek Olšák
maraeo at gmail.com
Mon Oct 17 20:03:43 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
---
si-report.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/si-report.py b/si-report.py
index 144a229..620b3bd 100755
--- a/si-report.py
+++ b/si-report.py
@@ -535,20 +535,21 @@ def get_shader_name(list, orig):
assert False
return "(error)"
def print_yellow(str):
print set_yellow + str + set_normal
def print_tables(before_all_results, after_all_results):
re_app = re.compile(r"^.*/([^/]+)/[^/]+$")
+ num_listed = 20
apps = defaultdict(grouped_stats)
shaders = defaultdict(grouped_stats)
total = grouped_stats()
total_affected = grouped_stats()
all_files = set(itertools.chain(before_all_results.keys(),
after_all_results.keys()))
for file in all_files:
# get the application name (inner-most directory)
@@ -587,41 +588,41 @@ def print_tables(before_all_results, after_all_results):
# worst VGPR spills
num = 0
sort_key = lambda v: -v[1].after.scratch_vgprs
for name, stats in sorted(shaders.items(), key = sort_key):
if num == 0:
print_yellow(" WORST VGPR SPILLS (not deltas)" + (" " * 40) +
"VGPRs SpillVGPR ScratchVGPR")
stats.print_one_shader_vgpr_spill(name)
num += 1
- if num == 10:
+ if num == num_listed:
break
if num > 0:
print
# VGPR spilling apps
print_yellow(" VGPR SPILLING APPS Shaders SpillVGPR ScratchVGPR")
for name, stats in sorted(apps.items()):
stats.print_vgpr_spilling_app(name)
print
# worst SGPR spills
num = 0
sort_key = lambda v: -v[1].after.spilled_sgprs
for name, stats in sorted(shaders.items(), key = sort_key):
if num == 0:
print_yellow(" WORST SGPR SPILLS (not deltas)" + (" " * 40) +
"SGPRs SpillSGPR")
stats.print_one_shader_sgpr_spill(name)
num += 1
- if num == 10:
+ if num == num_listed:
break
if num > 0:
print
# SGPR spilling apps
print_yellow(" SGPR SPILLING APPS Shaders SpillSGPR AvgPerSh")
for name, stats in sorted(apps.items()):
stats.print_sgpr_spilling_app(name)
print
@@ -643,21 +644,21 @@ def print_tables(before_all_results, after_all_results):
continue
else:
if stats.diff.__dict__[field] <= 0:
continue
if num == 0:
print_yellow(" WORST REGRESSIONS - {:49}".format(metrics[i][1]) +
"Before After Delta Percentage")
stats.print_regression(name, field)
num += 1
- if num == 10:
+ if num == num_listed:
break
if num > 0:
print
# percentages
legend = "Shaders SGPRs VGPRs SpillSGPR SpillVGPR Scratch CodeSize MaxWaves Waits"
print_yellow(" PERCENTAGE DELTAS " + legend)
for name, stats in sorted(apps.items()):
stats.print_percentages(name)
print " " + ("-" * (21 + len(legend)))
--
2.7.4
More information about the mesa-dev
mailing list