@@ -21,6 +21,22 @@ TRACEPOINT_EVENT_CLASS(
)
)
+TRACEPOINT_EVENT_CLASS(
+ libcamera,
+ request_with_buffer,
+ TP_ARGS(
+ libcamera::Request*, req,
+ libcamera::FrameBuffer *, buf
+ ),
+ TP_FIELDS(
+ ctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))
+ ctf_integer(uint64_t, cookie, req->cookie())
+ ctf_integer(int, status, req->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_INSTANCE(
libcamera,
request,
@@ -84,18 +100,12 @@ TRACEPOINT_EVENT_INSTANCE(
)
)
-TRACEPOINT_EVENT(
+TRACEPOINT_EVENT_INSTANCE(
libcamera,
+ request_with_buffer,
request_complete_buffer,
TP_ARGS(
- libcamera::Request::Private *, req,
+ libcamera::Request *, 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)
)
)
@@ -90,7 +90,7 @@ bool Request::Private::hasPendingBuffers() const
*/
bool Request::Private::completeBuffer(FrameBuffer *buffer)
{
- LIBCAMERA_TRACEPOINT(request_complete_buffer, this, buffer);
+ LIBCAMERA_TRACEPOINT(request_complete_buffer, _o<Request>(), buffer);
int ret = pending_.erase(buffer);
ASSERT(ret == 1);
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> --- Changes in v2: - Change arg from private to public Request pointer --- .../libcamera/internal/tracepoints/request.tp | 28 +++++++++++++------ src/libcamera/request.cpp | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-)