[libcamera-devel,v4,3/5] tracepoints: Add pipeline tracepoints for tracing IPA calls
diff mbox series

Message ID 20201030085756.79329-4-paul.elder@ideasonboard.com
State Superseded
Delegated to: Paul Elder
Headers show
Series
  • Tracing
Related show

Commit Message

Paul Elder Oct. 30, 2020, 8:57 a.m. UTC
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@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

---
No change in v4

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

Patch
diff mbox series

diff --git a/include/libcamera/internal/tracepoints/meson.build b/include/libcamera/internal/tracepoints/meson.build
index fee0758f..e2a5470a 100644
--- a/include/libcamera/internal/tracepoints/meson.build
+++ b/include/libcamera/internal/tracepoints/meson.build
@@ -5,5 +5,6 @@  tracepoint_files = files([
     'buffer_enums.tp',
     'request_enums.tp',
 
+    '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)
+	)
+)