From: Ben Widawsky Date: Fri, 31 Jan 2014 04:46:06 +0000 (+0000) Subject: quick_dump: Add a file argument X-Git-Tag: intel-gpu-tools-1.6~142 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5a1ab3d6e2002607f6c6387b0bf8a79cffc8224;p=platform%2Fupstream%2Fintel-gpu-tools.git quick_dump: Add a file argument -f, or --file will simply dump the file in the specified format. All other options will be skipped. This is helpful when one wants to create their own list for temporary debug, or if one requires a subset of registers to work around things like fused off PCH. Signed-off-by: Ben Widawsky --- diff --git a/tools/quick_dump/quick_dump.py b/tools/quick_dump/quick_dump.py index 9af4345..bace8c7 100755 --- a/tools/quick_dump/quick_dump.py +++ b/tools/quick_dump/quick_dump.py @@ -76,6 +76,8 @@ if __name__ == "__main__": parser.add_argument('-a', '--autodetect', action='store_true', default=False, help='autodetect chipset') + parser.add_argument('-f', '--file', + type=argparse.FileType('r'), default=None) parser.add_argument('profile', nargs='?', type=argparse.FileType('r'), default=None) @@ -88,6 +90,11 @@ if __name__ == "__main__": # Put us where the script is os.chdir(os.path.dirname(sys.argv[0])) + # specifying a file trumps all other things + if args.file != None: + parse_file(args.file) + sys.exit() + #parse anything named base_ these are assumed to apply for all gens. if args.baseless == False: walk_base_files()