mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 08:50:09 +01:00
freedreno/log-parser: support to read gzip'd logs
~50MB gzip'd log files are nicer than ~300MB uncompressed Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4750>
This commit is contained in:
parent
f561e516c8
commit
de0d3d1726
1 changed files with 8 additions and 1 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
import re
|
||||
import sys
|
||||
import gzip
|
||||
import io
|
||||
|
||||
|
||||
class GMEMPass:
|
||||
|
|
@ -59,7 +61,12 @@ def dump_gmem_passes(gmem_passes, blit_time, sysmem_time, total_time):
|
|||
))
|
||||
|
||||
def main():
|
||||
file = open(sys.argv[1], "r")
|
||||
filename = sys.argv[1]
|
||||
if filename.endswith(".gz"):
|
||||
file = gzip.open(filename, "r")
|
||||
file = io.TextIOWrapper(file)
|
||||
else:
|
||||
file = open(filename, "r")
|
||||
lines = file.read().split('\n')
|
||||
|
||||
compute_match = re.compile(r"COMPUTE: START")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue