[libcamera-devel] [PATCH v2 6/7] tracepoints: pipeline: Add tracepoint for pipe stop
Paul Elder
paul.elder at ideasonboard.com
Tue Dec 13 10:15:57 CET 2022
Add a tracepoint for stopping the pipeline. This was used for debugging
the segfault caused at camera stop time, where buffers were turning into
nullptrs.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
New in v2
---
include/libcamera/internal/tracepoints/pipeline.tp | 13 +++++++++++++
src/libcamera/pipeline_handler.cpp | 2 ++
2 files changed, 15 insertions(+)
diff --git a/include/libcamera/internal/tracepoints/pipeline.tp b/include/libcamera/internal/tracepoints/pipeline.tp
index 950aa918..71694dd4 100644
--- a/include/libcamera/internal/tracepoints/pipeline.tp
+++ b/include/libcamera/internal/tracepoints/pipeline.tp
@@ -5,6 +5,8 @@
* pipeline.tp - Tracepoints for pipelines
*/
+#include "libcamera/internal/pipeline_handler.h"
+
TRACEPOINT_EVENT(
libcamera,
ipa_call_begin,
@@ -30,3 +32,14 @@ TRACEPOINT_EVENT(
ctf_string(function_name, func)
)
)
+
+TRACEPOINT_EVENT(
+ libcamera,
+ pipe_stop,
+ TP_ARGS(
+ libcamera::PipelineHandler *, pipe
+ ),
+ TP_FIELDS(
+ ctf_string(name, pipe->name())
+ )
+)
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index cfade490..7adb7628 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -326,6 +326,8 @@ void PipelineHandler::unlockMediaDevices()
*/
void PipelineHandler::stop(Camera *camera)
{
+ LIBCAMERA_TRACEPOINT(pipe_stop, this);
+
/* Stop the pipeline handler and let the queued requests complete. */
stopDevice(camera);
--
2.35.1
More information about the libcamera-devel
mailing list