From patchwork Tue Dec 13 09:15:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17984 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 4B9F6C328D for ; Tue, 13 Dec 2022 09:16:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E116663354; Tue, 13 Dec 2022 10:16:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1670922974; bh=AWwks3MUmdCPKcHt5f+555qCTZBdaS1XjdE7e3U70P4=; 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=oVAt1dLFQFfpym+RdGk5IZu6YgQB8oVwxN2vDW6t9zPxZ84nQqeI7NSg8Vw15UNJe nXl5F2aKEKDQKFgAzzEABs1lOWaLXjLWtnGItIgD5bNZUuPp9md2H4U6pIL/Y1Ahgt ZXt3nXGmAz2YFPIK5yJZw55J0KvJQJgSlN26743lOQ7S1q2CB1sIyTpbujsspK1N4n DqdebXMWwHvfw4KdjJHYUD/XYrDyu+4So0gSMMKOpSZ3UIt8gAc4XIvMjkr6wrVwwH tj50itN+PZeWsw+nMed7EKKZ45yXU7/8mXKDBJw/qJXRUqYWc2ZDAqtVhHtjGAlxGA 2HeOaHoH6dPng== 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 E14F563354 for ; Tue, 13 Dec 2022 10:16:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SZRVO9NZ"; 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 AABC87C5; Tue, 13 Dec 2022 10:16:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1670922972; bh=AWwks3MUmdCPKcHt5f+555qCTZBdaS1XjdE7e3U70P4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SZRVO9NZQ5WrxwymBcp2G2zYCoYtXYKnTgx/fh/gJtekx3XwK/+nKLv258WCOIG8Y 5f7+sMz9/vMcuydUkwUOV0hmXujReITBzQkfvBdBgjLvAxx4llaG7oZgQlGCtNGVpN AAHjsUBUaglBg4XGoQCXFirRpetMkINDs2k9MNn8= To: libcamera-devel@lists.libcamera.org Date: Tue, 13 Dec 2022 18:15:52 +0900 Message-Id: <20221213091558.621950-2-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 1/7] tracepoints: request: Use public Request pointer in all tracepoints 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" Make all tracepoints use the public Request pointer instead of some of them using the Private one. This makes it easier to track the Requests in a trace. Signed-off-by: Paul Elder --- New in v2 --- include/libcamera/internal/tracepoints/request.tp | 7 +++---- src/libcamera/request.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp index f1e54497..9d0bcbfa 100644 --- a/include/libcamera/internal/tracepoints/request.tp +++ b/include/libcamera/internal/tracepoints/request.tp @@ -5,9 +5,8 @@ * request.tp - Tracepoints for the request object */ -#include - #include +#include TRACEPOINT_EVENT_CLASS( libcamera, @@ -72,7 +71,7 @@ TRACEPOINT_EVENT_INSTANCE( request, request_complete, TP_ARGS( - libcamera::Request::Private *, req + libcamera::Request *, req ) ) @@ -81,7 +80,7 @@ TRACEPOINT_EVENT_INSTANCE( request, request_cancel, TP_ARGS( - libcamera::Request::Private *, req + libcamera::Request *, req ) ) diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 949c556f..1dedc26e 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -121,7 +121,7 @@ void Request::Private::complete() LOG(Request, Debug) << request->toString(); - LIBCAMERA_TRACEPOINT(request_complete, this); + LIBCAMERA_TRACEPOINT(request_complete, request); } void Request::Private::doCancelRequest() @@ -149,9 +149,10 @@ void Request::Private::doCancelRequest() */ void Request::Private::cancel() { - LIBCAMERA_TRACEPOINT(request_cancel, this); - Request *request = _o(); + + LIBCAMERA_TRACEPOINT(request_cancel, request); + ASSERT(request->status() == RequestPending); doCancelRequest();