Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make xperf output decoding more robust
When running IdentifyChromeProcesses.py on a customer trace I hit decode exceptions due to non-ASCII characters. Setting the encoding to utf-8 did not resolve them so I also added errors='ignore' because I want this script to always run to completion and give best-effort results. The error messages seen in UIforETW looked like this: Traceback (most recent call last): File "C:\Users\brucedawson\Desktop\etwpackage\bin\IdentifyChromeProcesses.py", line 353, in <module> main() File "C:\Users\brucedawson\Desktop\etwpackage\bin\IdentifyChromeProcesses.py", line 350, in main _IdentifyChromeProcesses(args.trace[0], args.cpuusage, args.tabbed, False) File "C:\Users\brucedawson\Desktop\etwpackage\bin\IdentifyChromeProcesses.py", line 130, in _IdentifyChromeProcesses line = line.decode() UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 261: ordinal not in range(128)
- Loading branch information