[libcamera-devel] [PATCH v3 3/6] tracepoints: Add pipeline tracepoints for tracing IPA calls

Paul Elder paul.elder at ideasonboard.com
Thu Oct 29 11:16:26 CET 2020


Add a pair of tracepoints to a general pipeline tracepoints file,
libcamera:ipa_call_start and libcamera:ipa_call_finish, to trace IPA
calls. This allows us to obtain the time taken for the IPA call.

Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

---
Changes in v3:
- rename the ipa tracepoints to ipa_call_begin and ipa_call_end
- make string args const, so that strings can be passed directly

New in v2
---
 .../internal/tracepoints/meson.build          |  1 +
 .../internal/tracepoints/pipeline.tp          | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 include/libcamera/internal/tracepoints/pipeline.tp

diff --git a/include/libcamera/internal/tracepoints/meson.build b/include/libcamera/internal/tracepoints/meson.build
index 8410c205..a34135ce 100644
--- a/include/libcamera/internal/tracepoints/meson.build
+++ b/include/libcamera/internal/tracepoints/meson.build
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: CC0-1.0
 
 tracepoint_files = files([
+    'pipeline.tp',
     'request.tp',
 ])
diff --git a/include/libcamera/internal/tracepoints/pipeline.tp b/include/libcamera/internal/tracepoints/pipeline.tp
new file mode 100644
index 00000000..c0a94635
--- /dev/null
+++ b/include/libcamera/internal/tracepoints/pipeline.tp
@@ -0,0 +1,25 @@
+TRACEPOINT_EVENT(
+	libcamera,
+	ipa_call_begin,
+	TP_ARGS(
+		const char *, pipe,
+		const char *, func
+	),
+	TP_FIELDS(
+		ctf_string(pipeline_name, pipe)
+		ctf_string(function_name, func)
+	)
+)
+
+TRACEPOINT_EVENT(
+	libcamera,
+	ipa_call_end,
+	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