Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp740922pxb; Wed, 25 Aug 2021 13:59:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIiFSVHHWsv/HXevZS7sqEPXshVZoqTDmFBIdMZuNECxddVIxmjCJboG8h2UaC1fB64Hy0 X-Received: by 2002:a05:6e02:e42:: with SMTP id l2mr176136ilk.285.1629925184495; Wed, 25 Aug 2021 13:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629925184; cv=none; d=google.com; s=arc-20160816; b=MM2OK4tr6lV8NEt5X437kbWscCyZgl8kd5HUb0lxznWoavwA+0LX6E1zV+hOgQWp9n C/7XI5KFLfIdSY+Jr5/SIdbnuRi8UHsd5FqNSsiOOn3mbTCIv6ksNwcXzAkn3SNI/F9N 0+807nNyJqPVEwDoiEFg5CJqg9oc86DwCqNYJ4zLsDX+qzSQOb7O+IxsSzFoXx+3mX1X DDPO/FSp+Xio6fysq+WH08VtZSntkHHE9PyT5mbQMoSOYM6qgGcIVREDoAtKysHQmrTc uHStwAjecWj9SWXIIXqqCn/uDcqmCAVNRtwqpzIS/p+/+u0Ps+ZAY5BC+PVSoVdWusM/ AlVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=4yn0oy8JsEetkmJH1qt8+NeoPl5RpCvCkxTeymmkeu8=; b=bGUIWb1wje4QwExudIulu1o9goDDrFMKo+TyfQvAHjoJkgwjZwEMPYmg/Qih6sA1X1 OG2lhbxJGqmeyHGcgp5CVgiHMkVLGCt1Vp256ZB9h6rNZ4P9ydQx4NSAO4K3Y478Gcye sPqoZlhQ1JWn+vNKi6x4wmOj3yfgiqEV4A+Oci2q8yjSQyBIxwVVC3ntKmRaW6nhoVZK gavyuLjz+Yfk4MPtFkfJwFZxzDotRqxAqeWex/5fIILVSDcjhUUO64slryPUK1mlxhkv nkr8NPUfKdfvoxcM/R1COAc70+3Jzd1DOdx1LR6k5XalfUwaV5+GtAgaPJsu+spTl0qE TlJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@akamai.com header.s=jan2016.eng header.b=VlSK6+1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q14si689963ilv.151.2021.08.25.13.59.33; Wed, 25 Aug 2021 13:59:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@akamai.com header.s=jan2016.eng header.b=VlSK6+1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242235AbhHYRTl (ORCPT + 99 others); Wed, 25 Aug 2021 13:19:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233720AbhHYRTj (ORCPT ); Wed, 25 Aug 2021 13:19:39 -0400 Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [IPv6:2620:100:9005:57f::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A80BAC061757 for ; Wed, 25 Aug 2021 10:18:52 -0700 (PDT) Received: from pps.filterd (m0122331.ppops.net [127.0.0.1]) by mx0b-00190b01.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 17PG73hK003607; Wed, 25 Aug 2021 18:18:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=subject : to : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=jan2016.eng; bh=4yn0oy8JsEetkmJH1qt8+NeoPl5RpCvCkxTeymmkeu8=; b=VlSK6+1hH5l2Yb77fXnQ6g4ksZO1d0TBYf1qvwgSU6kOcYivw5WUQpb1N4/JRm2EUt9G e3bJGL8LjDRfjN+sc1kVN7e+SJ9gnGiCCjByBjf0O61aMIJPcXtckb22/h0ysDYPbROW PrifL86bLPPSwczHgflnC5RQoElyVJFQHwbXP0qA7p8n6WyLapMMGk844M55b3tkq1KL 9CGSpZvt0ClRxJQRGgz6xLTVcuwuL51DPkTee47Ox3zyiSICIIyEY+z61FsdaDQfgTfE vjB29jUgnqHXmZzDPcLKTSGf+Ihs3KmVDRkzb0tJPT6NwnukpDy1Upoju77GiS2lK2mZ yg== Received: from prod-mail-ppoint7 (a72-247-45-33.deploy.static.akamaitechnologies.com [72.247.45.33] (may be forged)) by mx0b-00190b01.pphosted.com with ESMTP id 3anhh8mpsu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Aug 2021 18:18:48 +0100 Received: from pps.filterd (prod-mail-ppoint7.akamai.com [127.0.0.1]) by prod-mail-ppoint7.akamai.com (8.16.1.2/8.16.1.2) with SMTP id 17PHCpZk029748; Wed, 25 Aug 2021 13:18:48 -0400 Received: from prod-mail-relay19.dfw02.corp.akamai.com ([172.27.165.173]) by prod-mail-ppoint7.akamai.com with ESMTP id 3an3v2fbq9-1; Wed, 25 Aug 2021 13:18:48 -0400 Received: from [0.0.0.0] (prod-ssh-gw01.bos01.corp.akamai.com [172.27.119.138]) by prod-mail-relay19.dfw02.corp.akamai.com (Postfix) with ESMTP id C8B9A6007A; Wed, 25 Aug 2021 17:18:44 +0000 (GMT) Subject: Re: [PATCH v6 00/11] use DYNAMIC_DEBUG to implement DRM.debug To: Jim Cromie , gregkh@linuxfoundation.org, seanpaul@chromium.org, jeyu@kernel.org, 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 References: <20210822222009.2035788-1-jim.cromie@gmail.com> From: Jason Baron Message-ID: <7017599d-8e11-7bda-90df-3cbf39ef8f3b@akamai.com> Date: Wed, 25 Aug 2021 13:18:44 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210822222009.2035788-1-jim.cromie@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-08-25_06:2021-08-25,2021-08-25 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108250101 X-Proofpoint-GUID: UoSSdnztWs5A6UFnB2lJ-dGQhhers6zK X-Proofpoint-ORIG-GUID: UoSSdnztWs5A6UFnB2lJ-dGQhhers6zK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-08-25_07,2021-08-25_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 impostorscore=0 clxscore=1015 bulkscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108250102 X-Agari-Authentication-Results: mx.akamai.com; spf=${SPFResult} (sender IP is 72.247.45.33) smtp.mailfrom=jbaron@akamai.com smtp.helo=prod-mail-ppoint7 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/22/21 6:19 PM, Jim Cromie wrote: > This patchset does 3 main things. > > Adds DEFINE_DYNAMIC_DEBUG_CATEGORIES to define bitmap => category > control of pr_debugs, and to create their sysfs entries. > > Uses it in amdgpu, i915 to control existing pr_debugs according to > their ad-hoc categorizations. > > Plugs dyndbg into drm-debug framework, in a configurable manner. > > v6: cleans up per v5 feedback, and adds RFC stuff: > > - test_dynamic_debug.ko: uses tracer facility added in v5:8/9 > - prototype print-once & rate-limiting > > Hopefully adding RFC stuff doesnt distract too much. Hi Jim, Yeah, I feel like the RFC patches should be in a separate series unless there is a drm dependency for them? Thanks, -Jason > > Jim Cromie (11): > moduleparam: add data member to struct kernel_param > dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks > i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes > i915/gvt: use DEFINE_DYNAMIC_DEBUG_CATEGORIES to create "gvt:core:" > etc categories > amdgpu: use DEFINE_DYNAMIC_DEBUG_CATEGORIES to control categorized > pr_debugs > drm_print: add choice to use dynamic debug in drm-debug > drm_print: instrument drm_debug_enabled > amdgpu_ucode: reduce number of pr_debug calls > nouveau: fold multiple DRM_DEBUG_DRIVERs together > dyndbg: RFC add debug-trace callback, selftest with it. RFC > dyndbg: RFC add print-once and print-ratelimited features. RFC. > > drivers/gpu/drm/Kconfig | 13 + > drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 293 ++++++++------- > .../gpu/drm/amd/display/dc/core/dc_debug.c | 44 ++- > drivers/gpu/drm/drm_print.c | 49 ++- > drivers/gpu/drm/i915/gvt/Makefile | 4 + > drivers/gpu/drm/i915/gvt/debug.h | 18 +- > drivers/gpu/drm/i915/i915_params.c | 35 ++ > drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +- > include/drm/drm_print.h | 148 ++++++-- > include/linux/dynamic_debug.h | 81 ++++- > include/linux/moduleparam.h | 11 +- > lib/Kconfig.debug | 11 + > lib/Makefile | 1 + > lib/dynamic_debug.c | 336 ++++++++++++++++-- > lib/test_dynamic_debug.c | 279 +++++++++++++++ > 15 files changed, 1117 insertions(+), 242 deletions(-) > create mode 100644 lib/test_dynamic_debug.c >