[{"id":21984,"web_url":"https://patchwork.libcamera.org/comment/21984/","msgid":"<YdoaPhyeLOoQA4vX@pendragon.ideasonboard.com>","date":"2022-01-08T23:11:58","subject":"Re: [libcamera-devel] [PATCH v1 0/6] libcamera: Improve debug\n\tmessages in V4L2 compat layer","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Dec 28, 2021 at 11:59:46PM +0200, Laurent Pinchart wrote:\n> Hello,\n> \n> This patch series improves the debug messages printed by the file\n> operation handlers in the V4L2 compat layer.\n> \n> Before the series, the log messages printed the file descriptor of the\n> V4L2 file as an integer:\n> \n> [207:37:26.959469077] [32330] DEBUG V4L2Compat v4l2_camera_proxy.cpp:531 Servicing vidioc_querybuf fd = 3\n> [207:37:26.959608478] [32330] DEBUG V4L2Compat v4l2_camera_proxy.cpp:549 Servicing vidioc_qbuf, index = 0 fd = 3\n> \n> Now, the file path is printed as well, and the message is formated as a\n> function call for better readability:\n> \n> [207:32:30.769491737] [32181] DEBUG V4L2Compat v4l2_camera_proxy.cpp:544 [/dev/video2 (fd:3)] vidioc_querybuf()\n> [207:32:30.769565454] [32181] DEBUG V4L2Compat v4l2_camera_proxy.cpp:563 [/dev/video2 (fd:3)] vidioc_qbuf(index=0)\n\nPing ?\n\nTo answer a question I've heard in an separate discussion, we can't use\nLoggable here, as the information that needs to be logged is not part of\nthe V4L2CameraProxy class. It comes from the V4L2CameraFile class,\npassed as an argument to the different ioctl handlers.\n\n> Laurent Pinchart (5):\n>   v4l2: v4l2_compat_manager: Print path and fd in openat()\n>   v4l2: v4l2_camera_file: Store file description\n>   v4l2: v4l2_camera_proxy: Drop trace message from freeBuffers()\n>   v4l2: v4l2_compat_manager: Store V4L2CameraFile in mmaps_\n>   v4l2: v4l2_camera_proxy: Use file description in debug messages\n> \n>  src/v4l2/v4l2_camera_file.cpp    | 28 +++++++++++-\n>  src/v4l2/v4l2_camera_file.h      |  8 +++-\n>  src/v4l2/v4l2_camera_proxy.cpp   | 76 ++++++++++++++++++++------------\n>  src/v4l2/v4l2_camera_proxy.h     |  7 +--\n>  src/v4l2/v4l2_compat_manager.cpp | 18 ++++----\n>  src/v4l2/v4l2_compat_manager.h   |  2 +-\n>  6 files changed, 95 insertions(+), 44 deletions(-)\n> \n> \n> base-commit: 94a1afd0fc27216d6eca9506d8794c7a907f8121","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 22F29BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  8 Jan 2022 23:12:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5B4B560935;\n\tSun,  9 Jan 2022 00:12:09 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E516604F5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  9 Jan 2022 00:12:07 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E9B1BA1B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  9 Jan 2022 00:12:06 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"P6bNrOBt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1641683527;\n\tbh=kMYdxB76EAh6gyl45NG7otlWISzJi+hlQn8kgrV30t0=;\n\th=Date:From:To:Subject:References:In-Reply-To:From;\n\tb=P6bNrOBtFXa4Br8iteqdciBrCbUKy1b8xNrWoE3r48BjzGygk0JCs/ayZScr7V3I+\n\tf4gKgTfDh2ze7a/16p584zGTSDYxgeoU49dN+ddMpTlQBFRJK/0HKNOJ1vuOFLbFbr\n\ttB52K4e5N9Y2InvKNMiICjYXReBpVSQbLlPjrqwE=","Date":"Sun, 9 Jan 2022 01:11:58 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Message-ID":"<YdoaPhyeLOoQA4vX@pendragon.ideasonboard.com>","References":"<20211228215951.32396-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211228215951.32396-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v1 0/6] libcamera: Improve debug\n\tmessages in V4L2 compat layer","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]