From: Marek Olšák <marek.ol...@amd.com> --- si-report.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/si-report.py b/si-report.py index ae63449..17b7c66 100755 --- a/si-report.py +++ b/si-report.py @@ -75,21 +75,21 @@ def cmp_max_per(current, comp): def cmp_min_per(current, comp): return calculate_percent_change(comp[1], comp[2]) < calculate_percent_change(current[1], current[2]) class si_stats: metrics = [ ('sgprs', 'SGPRS', ''), ('vgprs', 'VGPRS', ''), ('spilled_sgprs', 'Spilled SGPRs', ''), ('spilled_vgprs', 'Spilled VGPRs', ''), - ('scratch_vgprs', 'Scratch VGPRs', 'dwords per thread'), + ('scratch_size', 'Scratch size', 'dwords per thread'), ('code_size', 'Code Size', 'bytes'), ('lds', 'LDS', 'blocks'), ('maxwaves', 'Max Waves', ''), ('waitstates', 'Wait states', ''), ] def __init__(self): self.error = False for name in self.get_metrics(): @@ -212,21 +212,21 @@ class si_parser(object): match = si_parser.re_stats.match(msg) if match is not None: if self._stats == None: self._stats = si_stats() self._stats.sgprs = int(match.group(1)) self._stats.vgprs = int(match.group(2)) self._stats.spilled_sgprs = int(match.group(7)) self._stats.spilled_vgprs = int(match.group(8)) self._stats.code_size = int(match.group(3)) self._stats.lds = int(match.group(4)) - self._stats.scratch_vgprs = int(match.group(5)) / (64 * 4) + self._stats.scratch_size = int(match.group(5)) / (64 * 4) self._stats.maxwaves = int(match.group(6)) old_stats = self._stats self._stats = None return old_stats if msg == "LLVM compile failed": old_stats = self._stats self._stats = None if old_stats is None: @@ -470,35 +470,35 @@ class grouped_stats: self.before.add(before) self.after.add(after) def set_one_shader(self, before, after): self.before = before self.after = after self.diff = subtract_stats(after, before) def print_vgpr_spilling_app(self, name): if (self.after.spilled_vgprs > 0 or - self.after.scratch_vgprs > 0): + self.after.scratch_size > 0): print " {:22}{:6}{:10}{:10}".format( name, self.num_shaders, self.after.spilled_vgprs, - self.after.scratch_vgprs) + self.after.scratch_size) def print_one_shader_vgpr_spill(self, name): if (self.after.spilled_vgprs > 0 or - self.after.scratch_vgprs > 0): + self.after.scratch_size > 0): print " {:65}{:10}{:10}{:10}".format( name, self.after.vgprs, self.after.spilled_vgprs, - self.after.scratch_vgprs) + self.after.scratch_size) def print_sgpr_spilling_app(self, name): if self.after.spilled_sgprs > 0: print " {:22}{:6}{:10}{:>9.1f}".format( name, self.num_shaders, self.after.spilled_sgprs, float(self.after.spilled_sgprs) / float(self.num_shaders)) def print_one_shader_sgpr_spill(self, name): @@ -509,21 +509,21 @@ class grouped_stats: self.after.spilled_sgprs) def print_percentages(self, name): print " {:22}{:6}{}{}{}{}{}{}{}{}".format( name, self.num_shaders, format_percent_change(self.before.sgprs, self.after.sgprs), format_percent_change(self.before.vgprs, self.after.vgprs), format_percent_change(self.before.spilled_sgprs, self.after.spilled_sgprs), format_percent_change(self.before.spilled_vgprs, self.after.spilled_vgprs), - format_percent_change(self.before.scratch_vgprs, self.after.scratch_vgprs), + format_percent_change(self.before.scratch_size, self.after.scratch_size), format_percent_change(self.before.code_size, self.after.code_size), format_percent_change(self.before.maxwaves, self.after.maxwaves, more_is_better = True), format_percent_change(self.before.waitstates, self.after.waitstates)) def print_regression(self, name, field): more_is_better = field == "maxwaves" print " {:65}{:10}{:10}{}{}".format( name, self.before.__dict__[field], self.after.__dict__[field], @@ -582,42 +582,42 @@ def print_tables(before_all_results, after_all_results): apps[app].add(before, after) total.add(before, after) if not subtract_stats(before, after).is_empty(): total_affected.add(before, after) # we don't have to add all shaders, just those that we may need # to display if (is_regression(before, after) or - after.scratch_vgprs > 0 or + after.scratch_size > 0 or after.spilled_vgprs > 0 or after.spilled_sgprs > 0): name = get_shader_name(shaders, file) shaders[name].set_one_shader(before, after) # worst VGPR spills num = 0 - sort_key = lambda v: -v[1].after.scratch_vgprs + sort_key = lambda v: -v[1].after.scratch_size for name, stats in sorted(shaders.items(), key = sort_key): if num == 0: print_yellow(" WORST VGPR SPILLS (not deltas)" + (" " * 40) + - "VGPRs SpillVGPR ScratchVGPR") + "VGPRs SpillVGPR ScratchSize") stats.print_one_shader_vgpr_spill(name) num += 1 if num == num_listed: break if num > 0: print # VGPR spilling apps - print_yellow(" VGPR SPILLING APPS Shaders SpillVGPR ScratchVGPR") + print_yellow(" VGPR SPILLING APPS Shaders SpillVGPR ScratchSize") 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) + -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev