[libcamera-devel] [PATCH 1/2] utils: ipc: Generate tracepoints for IPA calls

Paul Elder paul.elder at ideasonboard.com
Wed Feb 17 10:29:36 CET 2021


To ease benchmarking IPA calls, automatically generate tracepoints for
IPA calls in the IPAProxy.

Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
 .../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")}}
-- 
2.27.0



More information about the libcamera-devel mailing list