[libcamera-devel,2/4] tracepoints: request: Add event class for request and buffer
diff mbox series

Message ID 20221209081937.598303-3-paul.elder@ideasonboard.com
State New
Headers show
Series
  • tracepoints: request: Improve request tracepoints
Related show

Commit Message

Paul Elder Dec. 9, 2022, 8:19 a.m. UTC
Currently there is one tracepoint event request_complete_buffer that
outputs information on both the request and its buffer. We want to add
another event for add_buffer. Add an event class to cover this.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 .../libcamera/internal/tracepoints/request.tp | 26 +++++++++++++------
 1 file changed, 18 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp
index 491c7705..8e7cab5e 100644
--- a/include/libcamera/internal/tracepoints/request.tp
+++ b/include/libcamera/internal/tracepoints/request.tp
@@ -23,6 +23,22 @@  TRACEPOINT_EVENT_CLASS(
 	)
 )
 
+TRACEPOINT_EVENT_CLASS(
+	libcamera,
+	request_with_buffer,
+	TP_ARGS(
+		libcamera::Request::Private *, req,
+		libcamera::FrameBuffer *, buf
+	),
+	TP_FIELDS(
+		ctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))
+		ctf_integer(uint64_t, cookie, req->_o<libcamera::Request>()->cookie())
+		ctf_integer(int, status, req->_o<libcamera::Request>()->status())
+		ctf_integer_hex(uintptr_t, buffer, reinterpret_cast<uintptr_t>(buf))
+		ctf_enum(libcamera, buffer_status, uint32_t, buf_status, buf->metadata().status)
+	)
+)
+
 TRACEPOINT_EVENT(
 	libcamera,
 	request_construct,
@@ -92,18 +108,12 @@  TRACEPOINT_EVENT_INSTANCE(
 	)
 )
 
-TRACEPOINT_EVENT(
+TRACEPOINT_EVENT_INSTANCE(
 	libcamera,
+	request_with_buffer,
 	request_complete_buffer,
 	TP_ARGS(
 		libcamera::Request::Private *, req,
 		libcamera::FrameBuffer *, buf
-	),
-	TP_FIELDS(
-		ctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))
-		ctf_integer(uint64_t, cookie, req->_o<libcamera::Request>()->cookie())
-		ctf_integer(int, status, req->_o<libcamera::Request>()->status())
-		ctf_integer_hex(uintptr_t, buffer, reinterpret_cast<uintptr_t>(buf))
-		ctf_enum(libcamera, buffer_status, uint32_t, buf_status, buf->metadata().status)
 	)
 )