[libcamera-devel,4/4] tracepoints: request: Add flags to request_reuse tracepoint
diff mbox series

Message ID 20221209081937.598303-5-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
Add flags to the fields of the tracepoint event request_reuse. This
causes it to be no longer able to use the event class, which is why it
has to list the fields again.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 .../libcamera/internal/tracepoints/request.tp | 24 ++++++++++++-------
 src/libcamera/request.cpp                     |  2 +-
 2 files changed, 16 insertions(+), 10 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp
index 29aa3745..e173929f 100644
--- a/include/libcamera/internal/tracepoints/request.tp
+++ b/include/libcamera/internal/tracepoints/request.tp
@@ -63,15 +63,6 @@  TRACEPOINT_EVENT_INSTANCE(
 	)
 )
 
-TRACEPOINT_EVENT_INSTANCE(
-	libcamera,
-	request,
-	request_reuse,
-	TP_ARGS(
-		libcamera::Request *, req
-	)
-)
-
 TRACEPOINT_EVENT_INSTANCE(
 	libcamera,
 	request,
@@ -127,3 +118,18 @@  TRACEPOINT_EVENT_INSTANCE(
 		libcamera::FrameBuffer *, buf
 	)
 )
+
+TRACEPOINT_EVENT(
+	libcamera,
+	request_reuse,
+	TP_ARGS(
+		libcamera::Request *, req,
+		enum libcamera::Request::ReuseFlag, flags
+	),
+	TP_FIELDS(
+		ctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))
+		ctf_integer(uint64_t, cookie, req->cookie())
+		ctf_enum(libcamera, request_status, uint32_t, status, req->status())
+		ctf_integer_hex(uint32_t, flags, static_cast<uint32_t>(flags))
+	)
+)
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index ecefba0b..04c0c45c 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -381,7 +381,7 @@  Request::~Request()
  */
 void Request::reuse(ReuseFlag flags)
 {
-	LIBCAMERA_TRACEPOINT(request_reuse, this);
+	LIBCAMERA_TRACEPOINT(request_reuse, this, flags);
 
 	_d()->reset();