summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2019-08-13 09:22:57 -0700
committerRob Clark <robdclark@gmail.com>2019-10-24 23:21:49 +0000
commita5dcca5104fcf5521bd42ad4de5169e6623a524a (patch)
tree6a4968ee61855acf1a503bf97d115fe46de0ae8e
parentfeca90cd56d096321ce33bbba514652b05d81d09 (diff)
report: add argument to ignore loops
For "blobber-db" traces extracted from blob, I can't reasonably deduce the # of loops. So add an argument to ignore the fact that # of loops changes.
-rwxr-xr-xreport.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/report.py b/report.py
index 208711e..eedd886 100755
--- a/report.py
+++ b/report.py
@@ -134,6 +134,7 @@ def main():
parser.add_argument("--changes-only", "-c", action="store_true", default=False,
help="only show measurements that have changes")
parser.add_argument("--stage", "-S", help="limit results to specified shader stage")
+ parser.add_argument("--ignore-loops", action="store_true", help="ignore loops", default=False)
parser.add_argument("before", help="the output of the original code")
parser.add_argument("after", help="the output of the new code")
args = parser.parse_args()
@@ -186,7 +187,7 @@ def main():
# If the number of loops changed, then we may have unrolled some
# loops, in which case other measurements will be misleading.
- if m != "loops" and before[p]["loops"] != after[p]["loops"]:
+ if m != "loops" and before[p]["loops"] != after[p]["loops"] and not args.ignore_loops:
continue
after_count = after[p][m]