[{"id":15194,"web_url":"https://patchwork.libcamera.org/comment/15194/","msgid":"<20210217094730.GA17707@pyrite.rasen.tech>","date":"2021-02-17T09:47:30","subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: Generate tracepoints\n\tfor IPA calls","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Wed, Feb 17, 2021 at 06:29:36PM +0900, Paul Elder wrote:\n> To ease benchmarking IPA calls, automatically generate tracepoints for\n> IPA calls in the IPAProxy.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl   | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> index ba34a361..5e0d3976 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> @@ -33,6 +33,7 @@\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/tracepoints.h\"\n>  \n>  namespace libcamera {\n>  \n> @@ -125,6 +126,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n>  {% for method in interface_main.methods %}\n>  {{proxy_funcs.func_sig(proxy_name, method)}}\n>  {\n> +\tLIBCAMERA_TRACEPOINT_IPA_BEGIN({{module_name}}, {{method.mojom_name}});\n>  \tif (isolate_)\n>  \t\t{{\"return \" if method|method_return_value != \"void\"}}{{method.mojom_name}}IPC(\n>  {%- for param in method|method_param_names -%}\n> @@ -137,6 +139,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n>  \t\t{{param}}{{- \", \" if not loop.last}}\n>  {%- endfor -%}\n>  );\n> +\tLIBCAMERA_TRACEPOINT_IPA_END({{module_name}}, {{method.mojom_name}});\n>  }\n\nWhile cleaining up patchwork, I came across this [1], and I wonder if\nthis patch would clutter traces if pipelines add custom IPA call\ntracepoints for the \"proper\" response to an async call.\n\nWould we be better off without auto IPA call tracepoints?\n\n\nPaul\n\n[1] https://patchwork.libcamera.org/patch/10311/\n>  \n>  {{proxy_funcs.func_sig(proxy_name, method, \"Thread\")}}\n> -- \n> 2.27.0\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 E4660BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Feb 2021 09:47:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73CB763802;\n\tWed, 17 Feb 2021 10:47:39 +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 61BB4602FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 10:47:38 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DF6118C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 10:47:36 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cxUL/pqu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613555257;\n\tbh=qUBLEXnoqZmE9n68QEg30j02oMp/A4zUK75sKUn7ffQ=;\n\th=Date:From:To:Subject:References:In-Reply-To:From;\n\tb=cxUL/pquJuwFqf+n3y1OkuvdyNRWc3Wq4t9B6NP45b/og4cocvZhMA1nH2AmYBgmH\n\tcig6CIvYvV9PO9K5nXD0+Iw5PKVQdJCFCp1UiopOS6AAfAGpH+SXNEoZMwrvEMo9Nn\n\tWRviiFEm0+QYFG5wYKZH0oei0h9AdfH3eR9ayUTU=","Date":"Wed, 17 Feb 2021 18:47:30 +0900","From":"paul.elder@ideasonboard.com","To":"libcamera-devel@lists.libcamera.org","Message-ID":"<20210217094730.GA17707@pyrite.rasen.tech>","References":"<20210217092937.17167-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210217092937.17167-1-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: Generate tracepoints\n\tfor IPA calls","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]