@@ -5,6 +5,9 @@
* pipeline.tp - Tracepoints for pipelines
*/
+#include <libcamera/framebuffer.h>
+#include <libcamera/request.h>
+
#include "libcamera/internal/pipeline_handler.h"
TRACEPOINT_EVENT(
@@ -43,3 +46,18 @@ TRACEPOINT_EVENT(
ctf_string(name, pipe->name())
)
)
+
+TRACEPOINT_EVENT(
+ libcamera,
+ pipe_buffer_ready,
+ TP_ARGS(
+ libcamera::PipelineHandler *, pipe,
+ libcamera::FrameBuffer *, buf,
+ libcamera::Request *, req
+ ),
+ TP_FIELDS(
+ ctf_integer_hex(uintptr_t, buffer, reinterpret_cast<uintptr_t>(buf))
+ ctf_enum(libcamera, buffer_status, uint32_t, buf_status, buf->metadata().status)
+ ctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))
+ )
+)
@@ -36,6 +36,7 @@
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
+#include "libcamera/internal/tracepoints.h"
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
@@ -577,6 +578,8 @@ int VimcCameraData::init()
void VimcCameraData::bufferReady(FrameBuffer *buffer)
{
+ LIBCAMERA_TRACEPOINT(pipe_buffer_ready, this->pipe(), buffer, buffer->request());
+
PipelineHandlerVimc *pipe =
static_cast<PipelineHandlerVimc *>(this->pipe());
Request *request = buffer->request();
Add a tracepoint to track bufferReady. Only the Request address is printed and not Request information, to prevent dereferencing a potentially nullptr request. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- New in v2 --- .../libcamera/internal/tracepoints/pipeline.tp | 18 ++++++++++++++++++ src/libcamera/pipeline/vimc/vimc.cpp | 3 +++ 2 files changed, 21 insertions(+)