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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 utils/v4l2-tracer/retrace.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

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:
-- 
2.41.0





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux