diff options
author | Erico Nunes <nunes.erico@gmail.com> | 2020-05-09 19:51:13 +0200 |
---|---|---|
committer | Erico Nunes <nunes.erico@gmail.com> | 2020-12-02 16:21:09 +0100 |
commit | d0167a28faddfceeed7daa1176eb0295bfdff733 (patch) | |
tree | dbf29a91a112700915897021ab93213f8eb19324 | |
parent | 9d05675cccf39c8e5c5fe3d6daec08eea4e63908 (diff) |
report.py: fix crash on get_sched_mode
Current shader-db master report.py reports this for non-intel drivers:
Traceback (most recent call last):
File "./report.py", line 384, in <module>
main()
File "./report.py", line 243, in main
get_sched_mode(before[p], after[p]))
File "./report.py", line 114, in get_sched_mode
p = " (scheduled: " + b["scheduled"]
KeyError: 'scheduled'
Add a check so it avoids accessing the 'scheduled' key when it isn't
valid.
Fixes: 95e35b3 report.py: Handle scheduler mode changes
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
-rwxr-xr-x | report.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -113,6 +113,9 @@ def get_spill_fill_if_change(m, b, a): return " (spills: " + change(b["spills"], a["spills"]) + "; fills: " + change(b["fills"], a["fills"]) + ")" def get_sched_mode(b, a): + if not b.get("scheduled"): + return '' + p = " (scheduled: " + b["scheduled"] if b["scheduled"] == a["scheduled"]: |