From patchwork Wed Feb 17 09:29:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 11316 X-Patchwork-Delegate: paul.elder@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E42EBBD1F1 for ; Wed, 17 Feb 2021 09:29:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 69CD4637FD; Wed, 17 Feb 2021 10:29:52 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GfgUs3M0"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A6966602F9 for ; Wed, 17 Feb 2021 10:29:51 +0100 (CET) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1D9D48C4; Wed, 17 Feb 2021 10:29:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613554191; bh=EIqhrsi5Z/y8QQh/z2INovpIWM4lGK1q7IF6HUhy5z0=; h=From:To:Cc:Subject:Date:From; b=GfgUs3M0WVGGMmqpcMEwg78f7SsYjgnvoK7x6jQQaYFeqk5Y7LmaWaH6WkAHhtGHn +9EWsRoEQ2IeZmAgBiP2nMYzoIGzRm5iIRwz1/ju2jKVAKO5liNzVhvdbPx9BBuZPa jcy0bEoIRnWgNV4HGFMjYV6ctWQo5kRgAhNvmwI8= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Wed, 17 Feb 2021 18:29:36 +0900 Message-Id: <20210217092937.17167-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] utils: ipc: Generate tracepoints for IPA calls X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" To ease benchmarking IPA calls, automatically generate tracepoints for IPA calls in the IPAProxy. Signed-off-by: Paul Elder --- .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl index ba34a361..5e0d3976 100644 --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl @@ -33,6 +33,7 @@ #include "libcamera/internal/log.h" #include "libcamera/internal/process.h" #include "libcamera/internal/thread.h" +#include "libcamera/internal/tracepoints.h" namespace libcamera { @@ -125,6 +126,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data) {% for method in interface_main.methods %} {{proxy_funcs.func_sig(proxy_name, method)}} { + LIBCAMERA_TRACEPOINT_IPA_BEGIN({{module_name}}, {{method.mojom_name}}); if (isolate_) {{"return " if method|method_return_value != "void"}}{{method.mojom_name}}IPC( {%- for param in method|method_param_names -%} @@ -137,6 +139,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data) {{param}}{{- ", " if not loop.last}} {%- endfor -%} ); + LIBCAMERA_TRACEPOINT_IPA_END({{module_name}}, {{method.mojom_name}}); } {{proxy_funcs.func_sig(proxy_name, method, "Thread")}}