From patchwork Tue Dec 13 09:15:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17989 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F1E6CBDE6B for ; Tue, 13 Dec 2022 09:16:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 78A6A63375; Tue, 13 Dec 2022 10:16:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1670922982; bh=+ug6ktsSlZJThflSAuxfjlHlVZCshb4h7SeJHlbDvXg=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tPYfMCd80SIsZs8URC+Kh5xwKi7cnJ2ynGHRAlYzjf+P/r0XyWKagJZZKGs27De3U tobq+wZzT4zo69sfpzba43L4POyTVsfhVrnRYQ17Szp1w73ky+ntc1ruXB0g+9a/Dn evRALDG0lYLU0V0/xJF8EeBv6JLoQftKxXoWjA4wiMY8Uc8OmqMTZTUg4ogD6Z37nq WF5CpFGmnPPr6MgyyO5rHdhuslJ0GiUPGX+mwJ/nKruTpSE8cET8D+dQqpUAFPp1u6 VBP5DsDoetr7Bd5CNHh2PDoqspwEAQ3HA3jOX+2uLiZREwk6H0Oa9wqfIDfoyUvVAn prSE1mU8mbcRg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C38F06336B for ; Tue, 13 Dec 2022 10:16:20 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ek29poWu"; dkim-atps=neutral Received: from pyrite.tail37cf.ts.net (h175-177-042-159.catv02.itscom.jp [175.177.42.159]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 83CA0AFC; Tue, 13 Dec 2022 10:16:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1670922980; bh=+ug6ktsSlZJThflSAuxfjlHlVZCshb4h7SeJHlbDvXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ek29poWuFpi01wruJJhC+d3Y5nYhdIIGPUGA93ZWVh61MqWNXpMHuQq6gUdfriWj+ ucrsQNRUytl7jFzDw56cP7xtQ5CSwrJ4QlS+X0C/1q02a+VkigRIok0xpy1I6VSt/o RGNlp8pR4hcGjvUaa1enTRKnNmG5SZVrxfiXs9O8= To: libcamera-devel@lists.libcamera.org Date: Tue, 13 Dec 2022 18:15:57 +0900 Message-Id: <20221213091558.621950-7-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221213091558.621950-1-paul.elder@ideasonboard.com> References: <20221213091558.621950-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 6/7] tracepoints: pipeline: Add tracepoint for pipe stop X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Paul Elder via libcamera-devel From: Paul Elder Reply-To: Paul Elder Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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);