Message ID | 20220516225640.3102269-14-jim.cromie@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5B379C433F5 for <linux-arm-kernel@archiver.kernel.org>; Mon, 16 May 2022 23:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dOwswmfaNWTGCBIYQvXWyjolJ1tTgMrGTBLm5q2hbVg=; b=AnMZuRMrLbz14+ /QIqEjTF9+nntrGFFxeLke+aQttXkT8I3/bR+QxrYnHKIY6PtUwqbP//Cr8CPK/UB4ofLv3E1l9wT VxgCo+xZUdO/nBXngD5LHpv/ReZutLZbJ6Ar5omx9C6jqXa7LGNSiE9QgKudDMok2FR5WCO/xfuHF CI1Dnp+QhEAPELFiqK44waagqGMdQ0kQtraXQGDGYIPnlrFZlz56TD5c395Mg19gr8Pfdbe0jaKeM DqF8cMfNTP83MsKBEYI1kwRMVCB7DDLXd1HluQvX58SinVyYV2i7t2GCw0X6wLJX4G2vmulqewMQB f/vPfPPQfy3TM5ywMOZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqjlI-00Ad5n-9W; Mon, 16 May 2022 23:04:25 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqjeP-00AZNW-51 for linux-arm-kernel@lists.infradead.org; Mon, 16 May 2022 22:57:19 +0000 Received: by mail-il1-x132.google.com with SMTP id s6so6758279ilp.9 for <linux-arm-kernel@lists.infradead.org>; Mon, 16 May 2022 15:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kFgHG2tewJsN9CYAlq+NJbyhVM4qxnXd9vUi/EQochg=; b=APwWUbR7WCm/vV2bYkZXreJGyjTXBdujWBM/SmErqdwxgUV0hDj0LLMU6s9poeH5iT FXKjac2KPaRmv5i79zC0mhsAUsVXiwZqRh6viD88comH/LsImmGjEPd5EKvJJjjGwetm dtdMPDlrGdED1Igfq+1ncnqB3mLuF8AnEA9mwLdvjf74BU6/WlsaIU1uqRVA/gkYJFFJ xzX5VE9gHbP7E5WIC99KeZ8T7SwN6qhNeEUFjOZvi3imC2ZnFxskOMGw/wC7PKgEVeW4 mB7B32fpSnKhf5ymmcNfiMKYx2Mfx1TPQo9gLZcNV3R/rJU9tIZ4TCYpnFCG1zTWOu3n UjMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kFgHG2tewJsN9CYAlq+NJbyhVM4qxnXd9vUi/EQochg=; b=ERt8rzKcy77Jq7BDZwjJg5ODloyOFsHUuPo95N38HkDnli+51rNykqxfO9AEcc5TtA L5zAVNbwGxEyH95amcSw5kck3ackhYlICJfivLGGbl6zX4u1A/8bYGwbz6uh9Yv54aGe c/4K2julrhMFtZ+CEnF7wIdXoj2SabxA3P7aY9bKbddSFmGa/cZ5CGFMqFSJST2WqC6n XOjp6Bq31YAxxiUFkn3QX4mb8k8BUQGH50OVjPETbH8i7zul0rXrUYDaYEmuHGy7avOp nGGiRRJAedHjehriB+ZaYUqMtyPfas9ByoBffI3ylQM90ffW4iEkO98RDADAQspjVn8Q 8r6Q== X-Gm-Message-State: AOAM531/+kEQN35ZeE8YoWCmArcL0J+RWEqI1wDuPUtpBHDEDedbT4Rr Wykis7PoLqe/okgtsa3fNQo= X-Google-Smtp-Source: ABdhPJwTljlWB+rSMPzyqgN07gjHdFBLaJfrHnMONzCrRckPACxxE9mLZ+oS1CTCjNd2OY7YFa1OSw== X-Received: by 2002:a05:6e02:1587:b0:2c2:5c48:a695 with SMTP id m7-20020a056e02158700b002c25c48a695mr10131603ilu.169.1652741836722; Mon, 16 May 2022 15:57:16 -0700 (PDT) Received: from frodo.hsd1.co.comcast.net ([2601:284:8204:2010::dd9f]) by smtp.googlemail.com with ESMTPSA id k26-20020a02661a000000b0032b74686763sm3133949jac.76.2022.05.16.15.57.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 15:57:16 -0700 (PDT) From: Jim Cromie <jim.cromie@gmail.com> To: jbaron@akamai.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: gregkh@linuxfoundation.org, daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, quic_saipraka@quicinc.com, will@kernel.org, catalin.marinas@arm.com, quic_psodagud@quicinc.com, maz@kernel.org, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, mingo@redhat.com, jim.cromie@gmail.com Subject: [PATCH v2 13/27] dyndbg: add __pr_debug_cls(class, fmt, ...) Date: Mon, 16 May 2022 16:56:26 -0600 Message-Id: <20220516225640.3102269-14-jim.cromie@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220516225640.3102269-1-jim.cromie@gmail.com> References: <20220516225640.3102269-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220516_155717_243223_DB526C02 X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
DRM.debug on DYNAMIC_DEBUG, add trace events
|
expand
|
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index e9e6d0f503f3..abf43e28d8d3 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -216,6 +216,10 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, _DPRINTK_CLASS_DFLT, \ fmt, func, ##__VA_ARGS__) +#define dynamic_pr_debug_cls(cls, fmt, ...) \ + _dynamic_func_call_cls(cls, fmt, __dynamic_pr_debug, \ + pr_fmt(fmt), ##__VA_ARGS__) + #define dynamic_pr_debug(fmt, ...) \ _dynamic_func_call(fmt, __dynamic_pr_debug, \ pr_fmt(fmt), ##__VA_ARGS__) @@ -246,6 +250,9 @@ struct kernel_param; int param_set_dyndbg_classes(const char *instr, const struct kernel_param *kp); int param_get_dyndbg_classes(char *buffer, const struct kernel_param *kp); +#define __pr_debug_cls(cls, fmt, ...) \ + dynamic_pr_debug_cls(cls, fmt, ##__VA_ARGS__) + #else /* !CONFIG_DYNAMIC_DEBUG_CORE */ #include <linux/string.h>
For selftest purposes, add __pr_debug_cls(class, fmt, ...) I didn't think we'd need to define this, since DRM effectively has it already. But test_dynamic_debug needs it in order to demonstrate all the moving parts. Note the __ prefix; its not intended for general use, and doesn't include any builtin-constant checks that could pertain. I'd prefer to see a use-case where copying the drm.debug model isn't better. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> --- include/linux/dynamic_debug.h | 7 +++++++ 1 file changed, 7 insertions(+)