diff mbox series

[7/8] v4l2-tracer: stop retracing failed ioctls

Message ID 5213ebe1728427f892690ed644f6a8d1a42a96b0.1699904350.git.deborah.brouwer@collabora.com
State New
Headers show
Series v4l2-tracer: expand to stateful decoding | expand

Commit Message

Deborah Brouwer Nov. 13, 2023, 8:06 p.m. UTC
Stop retracing ioctls that failed during the original trace. These ioctls
won’t affect the retrace and reporting their (expected) failure adds
noise to the retracer’s debug information.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
---
 utils/v4l2-tracer/retrace.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/utils/v4l2-tracer/retrace.cpp b/utils/v4l2-tracer/retrace.cpp
index d2f6a6e7..d251180e 100644
--- a/utils/v4l2-tracer/retrace.cpp
+++ b/utils/v4l2-tracer/retrace.cpp
@@ -1246,7 +1246,6 @@  void retrace_ioctl(json_object *syscall_obj)
 {
 	__s64 cmd = 0;
 	int fd_retrace = 0;
-	bool ioctl_error = false;
 
 	json_object *fd_trace_obj;
 	json_object_object_get_ex(syscall_obj, "fd", &fd_trace_obj);
@@ -1258,7 +1257,7 @@  void retrace_ioctl(json_object *syscall_obj)
 
 	json_object *errno_obj;
 	if (json_object_object_get_ex(syscall_obj, "errno", &errno_obj))
-		ioctl_error = true;
+		return;
 
 	if (fd_retrace < 0) {
 		line_info("\n\tBad file descriptor on %s\n", json_object_get_string(cmd_obj));
@@ -1389,9 +1388,6 @@  void retrace_ioctl(json_object *syscall_obj)
 		retrace_vidioc_try_decoder_cmd(fd_retrace, ioctl_args);
 		break;
 	case VIDIOC_DQEVENT:
-		/* Don't retrace a timed-out DQEVENT */
-		if (ioctl_error)
-			break;
 		retrace_vidioc_dqevent(fd_retrace);
 		break;
 	case VIDIOC_SUBSCRIBE_EVENT: