Module: Mesa Branch: master Commit: d90a102a015dd27f089fcd10b86cf70e931d84db URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d90a102a015dd27f089fcd10b86cf70e931d84db
Author: Samuel Pitoiset <[email protected]> Date: Fri Dec 11 15:44:29 2020 +0100 radv: add a Python script to check if a VA was ever valid Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7891> --- src/amd/vulkan/radv_check_va.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/amd/vulkan/radv_check_va.py b/src/amd/vulkan/radv_check_va.py new file mode 100644 index 00000000000..d341691a0db --- /dev/null +++ b/src/amd/vulkan/radv_check_va.py @@ -0,0 +1,33 @@ +#!/usr/bin/python3 + +import re +import sys + +def main(): + if len(sys.argv) != 3: + print("Missing arguments: ./radv_check_va.py <bo_history> <64-bit VA>") + sys.exit(1) + + bo_history = str(sys.argv[1]) + va = int(sys.argv[2], 16) + + va_found = False + with open(bo_history) as f: + for line in f: + p = re.compile('timestamp=(.*), VA=(.*)-(.*), destroyed=(.*), is_virtual=(.*)') + m = p.match(line) + if m == None: + continue + + va_start = int(m.group(2), 16) + va_end = int(m.group(3), 16) + + # Check if the given VA was ever valid and print info. + if va >= va_start and va < va_end: + print("VA found: %s" % line, end='') + va_found = True + if not va_found: + print("VA not found!") + +if __name__ == '__main__': + main() _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
