From patchwork Tue Dec 13 09:15:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17985 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 B8BC3BDE6B for ; Tue, 13 Dec 2022 09:16:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7F5E563365; Tue, 13 Dec 2022 10:16:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1670922977; bh=LdQhdsnyjvNC3yubUJqkWKOK9I0vrWbE5UsIW42V+g0=; 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=hthZk1xa5Ubrcb5V/Y/cwqtYK4n21X2onYraiAk5qUCUWFTDKlnlDiHpKXnVmqE8F Xw1/k3Ekr+gzNRWGB6UCksY9dBFOZvEGMRy9cWs4/N8V3xphIDMxhaHzDbmPlTi2gv 3kUtRUMc/9ckJfY/zwWcOSuqkGw91wlxANsvLxxiht3hyNtyHoUWEMatGcdrqYEtZb y4KV0v9GrwLyEj804ggPODQnzHRC+2G9T2bbYK1OrTIXNJ8pq9SgatzQEalZaFHcx+ VmJfK1o/Yrhr6HNGc+Z1iQuPzDyE0OJD2HCHBUG3xNptPMAr3GJMEeIgw8nWU3eRXt k76HIz2sj1h2w== 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 78FAC63362 for ; Tue, 13 Dec 2022 10:16:14 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PA2iXPHv"; 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 406904A7; Tue, 13 Dec 2022 10:16:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1670922974; bh=LdQhdsnyjvNC3yubUJqkWKOK9I0vrWbE5UsIW42V+g0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PA2iXPHvQS/un3N5ty3cRK9C3uvpYRaDalQJdLeqyrz0tHVUXJEhff6cuIH+9Dk2B mhNX6dAeq3t7avp+Dp6aO7MfI9byBS9n5Cf/pYTOnRQ0exuPXrVBUETZ7X8coD/7xK EsHIw1oLk1cIuZ6Ika4P6/RPWHDCnoiZO0VFSPN4= To: libcamera-devel@lists.libcamera.org Date: Tue, 13 Dec 2022 18:15:53 +0900 Message-Id: <20221213091558.621950-3-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 2/7] tracepoints: request: Add event class for request and buffer 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" Currently there is one tracepoint event request_complete_buffer that outputs information on both the request and its buffer. We want to add another event for add_buffer. Add an event class to cover this. Signed-off-by: Paul Elder --- Changes in v2: - Change arg from private to public Request pointer --- .../libcamera/internal/tracepoints/request.tp | 28 +++++++++++++------ src/libcamera/request.cpp | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp index 9d0bcbfa..b295b44f 100644 --- a/include/libcamera/internal/tracepoints/request.tp +++ b/include/libcamera/internal/tracepoints/request.tp @@ -21,6 +21,22 @@ TRACEPOINT_EVENT_CLASS( ) ) +TRACEPOINT_EVENT_CLASS( + libcamera, + request_with_buffer, + TP_ARGS( + libcamera::Request*, req, + libcamera::FrameBuffer *, buf + ), + TP_FIELDS( + ctf_integer_hex(uintptr_t, request, reinterpret_cast(req)) + ctf_integer(uint64_t, cookie, req->cookie()) + ctf_integer(int, status, req->status()) + ctf_integer_hex(uintptr_t, buffer, reinterpret_cast(buf)) + ctf_enum(libcamera, buffer_status, uint32_t, buf_status, buf->metadata().status) + ) +) + TRACEPOINT_EVENT_INSTANCE( libcamera, request, @@ -84,18 +100,12 @@ TRACEPOINT_EVENT_INSTANCE( ) ) -TRACEPOINT_EVENT( +TRACEPOINT_EVENT_INSTANCE( libcamera, + request_with_buffer, request_complete_buffer, TP_ARGS( - libcamera::Request::Private *, req, + libcamera::Request *, req, libcamera::FrameBuffer *, buf - ), - TP_FIELDS( - ctf_integer_hex(uintptr_t, request, reinterpret_cast(req)) - ctf_integer(uint64_t, cookie, req->_o()->cookie()) - ctf_integer(int, status, req->_o()->status()) - ctf_integer_hex(uintptr_t, buffer, reinterpret_cast(buf)) - ctf_enum(libcamera, buffer_status, uint32_t, buf_status, buf->metadata().status) ) ) diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 1dedc26e..652b7b70 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -90,7 +90,7 @@ bool Request::Private::hasPendingBuffers() const */ bool Request::Private::completeBuffer(FrameBuffer *buffer) { - LIBCAMERA_TRACEPOINT(request_complete_buffer, this, buffer); + LIBCAMERA_TRACEPOINT(request_complete_buffer, _o(), buffer); int ret = pending_.erase(buffer); ASSERT(ret == 1);