[{"id":26040,"web_url":"https://patchwork.libcamera.org/comment/26040/","msgid":"<Y5Y7dyqC7l+oS5LV@pendragon.ideasonboard.com>","date":"2022-12-11T20:20:07","subject":"Re: [libcamera-devel] [PATCH 1/4] tracepoints: request: Add private\n\tpointer to request_construct","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Fri, Dec 09, 2022 at 05:19:34PM +0900, Paul Elder via libcamera-devel wrote:\n> Since some Request tracepoints print the public pointer and some print\n> the private pointer, print both pointers in the constructor tracepoint\n> so that they can be used to associate with the other request\n> tracepoints.\n\nWouldn't it be easier to standardize on printing the same pointer in all\nrequest trace points ?\n\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  include/libcamera/internal/tracepoints/request.tp | 13 ++++++++++---\n>  src/libcamera/request.cpp                         |  2 +-\n>  2 files changed, 11 insertions(+), 4 deletions(-)\n> \n> diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp\n> index f1e54497..491c7705 100644\n> --- a/include/libcamera/internal/tracepoints/request.tp\n> +++ b/include/libcamera/internal/tracepoints/request.tp\n> @@ -8,6 +8,7 @@\n>  #include <libcamera/internal/request.h>\n>  \n>  #include <libcamera/framebuffer.h>\n> +#include <libcamera/request.h>\n>  \n>  TRACEPOINT_EVENT_CLASS(\n>  \tlibcamera,\n> @@ -22,12 +23,18 @@ TRACEPOINT_EVENT_CLASS(\n>  \t)\n>  )\n>  \n> -TRACEPOINT_EVENT_INSTANCE(\n> +TRACEPOINT_EVENT(\n>  \tlibcamera,\n> -\trequest,\n>  \trequest_construct,\n>  \tTP_ARGS(\n> -\t\tlibcamera::Request *, req\n> +\t\tlibcamera::Request *, req,\n> +\t\tlibcamera::Request::Private *, priv\n> +\t),\n> +\tTP_FIELDS(\n> +\t\tctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))\n> +\t\tctf_integer_hex(uintptr_t, priv, reinterpret_cast<uintptr_t>(priv))\n> +\t\tctf_integer(uint64_t, cookie, req->cookie())\n> +\t\tctf_enum(libcamera, request_status, uint32_t, status, req->status())\n>  \t)\n>  )\n>  \n> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> index 949c556f..b9fb17d6 100644\n> --- a/src/libcamera/request.cpp\n> +++ b/src/libcamera/request.cpp\n> @@ -356,7 +356,7 @@ Request::Request(Camera *camera, uint64_t cookie)\n>  \t */\n>  \tmetadata_ = new ControlList(controls::controls);\n>  \n> -\tLIBCAMERA_TRACEPOINT(request_construct, this);\n> +\tLIBCAMERA_TRACEPOINT(request_construct, this, _d());\n>  \n>  \tLOG(Request, Debug) << \"Created request - cookie: \" << cookie_;\n>  }","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 CDAE8C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 11 Dec 2022 20:20:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1AF5663362;\n\tSun, 11 Dec 2022 21:20:13 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A30C63352\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 11 Dec 2022 21:20:11 +0100 (CET)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 895556CF;\n\tSun, 11 Dec 2022 21:20:10 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670790013;\n\tbh=tlkf4O+8DkzRncehB4IHTNsNZiUi5lVBLJVz+NOiWXE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=nTTBLPZdZR1jWMIhHDF7Ij7L3xAuBya2UHpyHOe4mc7lb0+fjdc70Jm9Rz/tYzf2c\n\tLAW3Fey5w9BqWCLCGAReabxT7Zgy/gHmhVwklXs2G0KJ/LiBbkP7UG1B1Uj5MmkWNp\n\tDKR8lxGLb9Brt7EtY6DoRQ+G4XazuZJHxJUP1lhjd1oBgSR8ast3NVB9WtNh5XOs1V\n\twCvSxnZsZTq2mqwZ0E+xT+A1uA6zUIKHLBCkJN5q5KbN9CY2p3mFN8sSyc1VyRV4QW\n\twQhsNFh7mwwB+3ckrAt9QIw51W/SchpAdZSRyzHlrxrEwlGKJCY5/izqRlZODtt/qA\n\tWvOZGHDcPHUhQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1670790011;\n\tbh=tlkf4O+8DkzRncehB4IHTNsNZiUi5lVBLJVz+NOiWXE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CSf8V6crsxEhpL58OrnxxYRdQtNZ1TBIjY0YUExGggPC0q9pMF2c96oGlJaR7P05d\n\tbkpgXahd2yS9dpBkJ+9tnyywAhMrmK2nzNNORvqmHWkOBwHUzDuxHeDxe7cHgKAWFQ\n\tvaAySLfsUsE/tq5adDFU1ARxtsh5ctxgwsoVQuPM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"CSf8V6cr\"; dkim-atps=neutral","Date":"Sun, 11 Dec 2022 22:20:07 +0200","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<Y5Y7dyqC7l+oS5LV@pendragon.ideasonboard.com>","References":"<20221209081937.598303-1-paul.elder@ideasonboard.com>\n\t<20221209081937.598303-2-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221209081937.598303-2-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/4] tracepoints: request: Add private\n\tpointer to request_construct","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]