From patchwork Fri Dec 9 08:19:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17962 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 AF21FBDE6B for ; Fri, 9 Dec 2022 08:20:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 649676335B; Fri, 9 Dec 2022 09:20:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1670574003; bh=oe20rhZFpl3g9AudSQQO5z2bf+MKxwrdmpj0h+WVhLI=; 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=OMPStD3LyqsXIu8yKc0I+FupMoQtraaqVX7OozGfrQB7aLFa/8dKIIXfhGESNhkZL MkaFn1ECGUYCvhpdUQNIjT84nUTTlPew5yhSyHVbRX/EzDiK8GbZEQPww19PZfLVQ8 r/qtSjbwl67SsUuioPmt2DZO2km9Ka3oE/uYByB5RHEHuaJITWkQd8Y7waknl6wKcK eRAVaoquG6wAe0WQasVlmIyukSLRDi6Wn3W+Xqh7pLZMyTtZKAHelYmuEhoHsjLX+Z cTEgVFtFGTKLo0gw83VaXFPmbN2j9sYZC0QhYZsjHzUIqQ74XcydzVREnC0uF/exHn dtf0edH3X42hg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1DF946334A for ; Fri, 9 Dec 2022 09:20:01 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ulVNaE1W"; 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 D31BC480; Fri, 9 Dec 2022 09:19:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1670574000; bh=oe20rhZFpl3g9AudSQQO5z2bf+MKxwrdmpj0h+WVhLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ulVNaE1WfWIz1xpCB4d/IeEzPgcMzOMILZIWamZ+kGrLPQYUaoLkAjtDE674aC4x5 EteTPLNse6TSanixzE2f5OQuMdo0mx+R3yjt4xVURDlfGuLEPRFzRASJ5goqozLgeR 5ovx8yJo8FOYWwA71zzOjcuO1bxZXP7n6hD4Kkbs= To: libcamera-devel@lists.libcamera.org Date: Fri, 9 Dec 2022 17:19:36 +0900 Message-Id: <20221209081937.598303-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221209081937.598303-1-paul.elder@ideasonboard.com> References: <20221209081937.598303-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] 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 --- 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 8e7cab5e..29aa3745 100644 --- a/include/libcamera/internal/tracepoints/request.tp +++ b/include/libcamera/internal/tracepoints/request.tp @@ -108,6 +108,16 @@ TRACEPOINT_EVENT_INSTANCE( ) ) +TRACEPOINT_EVENT_INSTANCE( + libcamera, + request_with_buffer, + request_add_buffer, + TP_ARGS( + libcamera::Request::Private *, req, + libcamera::FrameBuffer *, buf + ) +) + TRACEPOINT_EVENT_INSTANCE( libcamera, request_with_buffer, diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index b9fb17d6..ecefba0b 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -462,6 +462,8 @@ void Request::reuse(ReuseFlag flags) int Request::addBuffer(const Stream *stream, FrameBuffer *buffer, std::unique_ptr fence) { + LIBCAMERA_TRACEPOINT(request_add_buffer, _d(), buffer); + if (!stream) { LOG(Request, Error) << "Invalid stream reference"; return -EINVAL;