[libcamera-devel,v2,1/7] tracepoints: request: Use public Request pointer in all tracepoints
diff mbox series

Message ID 20221213091558.621950-2-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
Make all tracepoints use the public Request pointer instead of some of
them using the Private one. This makes it easier to track the Requests
in a trace.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

---
New in v2
---
 include/libcamera/internal/tracepoints/request.tp | 7 +++----
 src/libcamera/request.cpp                         | 7 ++++---
 2 files changed, 7 insertions(+), 7 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp
index f1e54497..9d0bcbfa 100644
--- a/include/libcamera/internal/tracepoints/request.tp
+++ b/include/libcamera/internal/tracepoints/request.tp
@@ -5,9 +5,8 @@ 
  * request.tp - Tracepoints for the request object
  */
 
-#include <libcamera/internal/request.h>
-
 #include <libcamera/framebuffer.h>
+#include <libcamera/request.h>
 
 TRACEPOINT_EVENT_CLASS(
 	libcamera,
@@ -72,7 +71,7 @@  TRACEPOINT_EVENT_INSTANCE(
 	request,
 	request_complete,
 	TP_ARGS(
-		libcamera::Request::Private *, req
+		libcamera::Request *, req
 	)
 )
 
@@ -81,7 +80,7 @@  TRACEPOINT_EVENT_INSTANCE(
 	request,
 	request_cancel,
 	TP_ARGS(
-		libcamera::Request::Private *, req
+		libcamera::Request *, req
 	)
 )
 
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 949c556f..1dedc26e 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -121,7 +121,7 @@  void Request::Private::complete()
 
 	LOG(Request, Debug) << request->toString();
 
-	LIBCAMERA_TRACEPOINT(request_complete, this);
+	LIBCAMERA_TRACEPOINT(request_complete, request);
 }
 
 void Request::Private::doCancelRequest()
@@ -149,9 +149,10 @@  void Request::Private::doCancelRequest()
  */
 void Request::Private::cancel()
 {
-	LIBCAMERA_TRACEPOINT(request_cancel, this);
-
 	Request *request = _o<Request>();
+
+	LIBCAMERA_TRACEPOINT(request_cancel, request);
+
 	ASSERT(request->status() == RequestPending);
 
 	doCancelRequest();