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

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

Commit Message

Paul Elder Dec. 13, 2022, 9:15 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>

---
New in v2
---
 .../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 e0ac45ac..c1623586 100644
--- a/include/libcamera/internal/tracepoints/request.tp
+++ b/include/libcamera/internal/tracepoints/request.tp
@@ -55,15 +55,6 @@  TRACEPOINT_EVENT_INSTANCE(
 	)
 )
 
-TRACEPOINT_EVENT_INSTANCE(
-	libcamera,
-	request,
-	request_reuse,
-	TP_ARGS(
-		libcamera::Request *, req
-	)
-)
-
 TRACEPOINT_EVENT_INSTANCE(
 	libcamera,
 	request,
@@ -119,3 +110,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 226c26b7..5a127f06 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -382,7 +382,7 @@  Request::~Request()
  */
 void Request::reuse(ReuseFlag flags)
 {
-	LIBCAMERA_TRACEPOINT(request_reuse, this);
+	LIBCAMERA_TRACEPOINT(request_reuse, this, flags);
 
 	_d()->reset();