From patchwork Tue Dec 13 09:15:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17986 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 A3FF1C328D for ; Tue, 13 Dec 2022 09:16:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1BE3163368; Tue, 13 Dec 2022 10:16:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1670922978; bh=lfft24zg/Os7CpJbn9HlIhwaI0PWX2xuE9iJsGAKZHw=; 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=ITn5ula7ELXJpukO+wbI1gS1q22jR+ChtJQeolrOBwfirLfkJ7mxsyqilFN8DDdrF bfI0ECX4G8PqsqkcgGAjGdIPBipbIJfWuMJkd7j8Szz8E9TzAV+34J+QHYjphlJ3Bh CqmjCWZ0GWyxOv3oOsQgsXY/GW0dAWiQn3o3Xyravi+tespHWrsQvgp9oWcXldkD09 3WdabWB4sX9CS/Pidp4LACx8KHBPdKFwZghmP00SFuWRQGm0mFPTphrrFpyDgIQK41 Fzp5ulCxoDTApA5x9UQga88fNcZAhAslbNOh5BZElaImnoZ+VoAVCxJsTAuFONj4DH UKEbzNu/RrFOQ== 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 0F0FE63361 for ; Tue, 13 Dec 2022 10:16:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qXB9jcxg"; 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 CA1E3AFC; Tue, 13 Dec 2022 10:16:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1670922975; bh=lfft24zg/Os7CpJbn9HlIhwaI0PWX2xuE9iJsGAKZHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qXB9jcxgZrTsdrxRAIZVIcN/jJ23GWWdytZAVEbpTHjTvTWdL2c+mWVBlarrZ5jrb CrJP0bfUZov9jDvTZuNFI034aSWooYOlfjjA1hnhykmHucQtZ17pEwS0F4lp3NLQ0a 1LAR2zFKPPD6x+IFEoe72xcOA64Jd1cf4vThH2+4= To: libcamera-devel@lists.libcamera.org Date: Tue, 13 Dec 2022 18:15:54 +0900 Message-Id: <20221213091558.621950-4-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 3/7] tracepoints: request: Add tracepoint for addBuffer 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 event request_add_buffer for tracing Request::addBuffer(). Signed-off-by: Paul Elder --- Changes in v2: - Change arg from private to public Request pointer --- include/libcamera/internal/tracepoints/request.tp | 10 ++++++++++ src/libcamera/request.cpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp index b295b44f..e0ac45ac 100644 --- a/include/libcamera/internal/tracepoints/request.tp +++ b/include/libcamera/internal/tracepoints/request.tp @@ -100,6 +100,16 @@ TRACEPOINT_EVENT_INSTANCE( ) ) +TRACEPOINT_EVENT_INSTANCE( + libcamera, + request_with_buffer, + request_add_buffer, + TP_ARGS( + libcamera::Request *, req, + libcamera::FrameBuffer *, buf + ) +) + TRACEPOINT_EVENT_INSTANCE( libcamera, request_with_buffer, diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 652b7b70..226c26b7 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -463,6 +463,8 @@ void Request::reuse(ReuseFlag flags) int Request::addBuffer(const Stream *stream, FrameBuffer *buffer, std::unique_ptr fence) { + LIBCAMERA_TRACEPOINT(request_add_buffer, this, buffer); + if (!stream) { LOG(Request, Error) << "Invalid stream reference"; return -EINVAL;