[libcamera-devel,1/2] tracepoints: Add ipa_recv tracepoint
diff mbox series

Message ID 20210305063742.15166-2-paul.elder@ideasonboard.com
State New
Delegated to: Paul Elder
Headers show
Series
  • Generate IPA tracepoints
Related show

Commit Message

Paul Elder March 5, 2021, 6:37 a.m. UTC
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@ideasonboard.com>
---
 include/libcamera/internal/tracepoints.h.in        |  4 ++++
 include/libcamera/internal/tracepoints/pipeline.tp | 13 +++++++++++++
 2 files changed, 17 insertions(+)

Patch
diff mbox series

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)
+	)
+)