Mesa (master): gitlab-ci: get the last frame from a gfxr trace using gfxrecon-info

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 21 17:08:52 UTC 2020


Module: Mesa
Branch: master
Commit: f1e67aa08a14de9a417df7a9e0769352a08780b9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f1e67aa08a14de9a417df7a9e0769352a08780b9

Author: Andres Gomez <agomez at igalia.com>
Date:   Tue Jul 14 01:11:26 2020 +0300

gitlab-ci: get the last frame from a gfxr trace using gfxrecon-info

Signed-off-by: Andres Gomez <agomez at igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5890>

---

 .gitlab-ci/tracie/dump_trace_images.py | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci/tracie/dump_trace_images.py b/.gitlab-ci/tracie/dump_trace_images.py
index 74efb1f32c7..e5cf6489a5c 100644
--- a/.gitlab-ci/tracie/dump_trace_images.py
+++ b/.gitlab-ci/tracie/dump_trace_images.py
@@ -58,17 +58,13 @@ def get_last_apitrace_frame_call(cmd_wrapper, trace_path):
     return -1
 
 def get_last_gfxreconstruct_frame_call(trace_path):
-    # FIXME: It would be great to have another way to get the amount of
-    # traces which wouldn't imply replaying the whole trace:
-    # https://github.com/LunarG/gfxreconstruct/issues/329
-    cmd = ["gfxrecon-replay", str(trace_path)]
+    cmd = ["gfxrecon-info", str(trace_path)]
     ret = subprocess.run(cmd, stdout=subprocess.PIPE)
-    for l in reversed(ret.stdout.decode(errors='replace').splitlines()):
-        s = l.split(", ", 2)
-        if len(s) >= 3:
-            c = s[2].split(None, 1)
-            if len(c) >= 1 and c[0].isnumeric():
-                return int(c[0])
+    lines = ret.stdout.decode(errors='replace').splitlines()
+    if len(lines) >= 1:
+        c = lines[0].split(": ", 1)
+        if len(c) >= 2 and c[1].isnumeric():
+            return int(c[1])
     return -1
 
 def dump_with_apitrace(retrace_cmd, trace_path, calls, device_name):



More information about the mesa-commit mailing list