[libcamera-devel] [PATCH 1/2] tracepoints: Add ipa_recv tracepoint
Paul Elder
paul.elder at ideasonboard.com
Fri Mar 5 07:37:41 CET 2021
Since it's difficult to programatically tell the IPA code generator
where the corresponding IPA response is for a given IPA call, instead
add a tracepoint to designate that a message (function call) has been
received.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
include/libcamera/internal/tracepoints.h.in | 4 ++++
include/libcamera/internal/tracepoints/pipeline.tp | 13 +++++++++++++
2 files changed, 17 insertions(+)
diff --git a/include/libcamera/internal/tracepoints.h.in b/include/libcamera/internal/tracepoints.h.in
index d0fc1365..414cdd4a 100644
--- a/include/libcamera/internal/tracepoints.h.in
+++ b/include/libcamera/internal/tracepoints.h.in
@@ -18,6 +18,9 @@ tracepoint(libcamera, ipa_call_begin, #pipe, #func)
#define LIBCAMERA_TRACEPOINT_IPA_END(pipe, func) \
tracepoint(libcamera, ipa_call_end, #pipe, #func)
+#define LIBCAMERA_TRACEPOINT_IPA_RECV(pipe, func) \
+tracepoint(libcamera, ipa_recv, #pipe, #func)
+
#else
namespace {
@@ -33,6 +36,7 @@ inline void unused([[maybe_unused]] Args&& ...args)
#define LIBCAMERA_TRACEPOINT_IPA_BEGIN(pipe, func)
#define LIBCAMERA_TRACEPOINT_IPA_END(pipe, func)
+#define LIBCAMERA_TRACEPOINT_IPA_RECV(pipe, func)
#endif /* HAVE_TRACING */
diff --git a/include/libcamera/internal/tracepoints/pipeline.tp b/include/libcamera/internal/tracepoints/pipeline.tp
index 950aa918..422c887f 100644
--- a/include/libcamera/internal/tracepoints/pipeline.tp
+++ b/include/libcamera/internal/tracepoints/pipeline.tp
@@ -30,3 +30,16 @@ TRACEPOINT_EVENT(
ctf_string(function_name, func)
)
)
+
+TRACEPOINT_EVENT(
+ libcamera,
+ ipa_recv,
+ TP_ARGS(
+ const char *, pipe,
+ const char *, func
+ ),
+ TP_FIELDS(
+ ctf_string(pipeline_name, pipe)
+ ctf_string(function_name, func)
+ )
+)
--
2.27.0
More information about the libcamera-devel
mailing list