[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220805215355.3509287-32-jim.cromie@gmail.com>
Date: Fri, 5 Aug 2022 15:53:53 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: linux-kernel@...r.kernel.org, jbaron@...mai.com,
gregkh@...uxfoundation.org, dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org, intel-gvt-dev@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org
Cc: daniel.vetter@...ll.ch, seanpaul@...omium.org, robdclark@...il.com,
Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH v5 31/33] nouveau: change nvkm_debug/trace to use dev_dbg POC
These 2 macros formerly used dev_info, and they still check
subdev->debug to gate the printing. So dyndbg control is redundant
ATM (and possibly confusing, since its off by default).
prdbg count is up from 3, or from 65 (with VMM_DEBUG here)
[ 7.765379] dyndbg: 516 debug prints in module nouveau
Its possible to control error, warn, info callsites too, but they're
usually on, and the .data overheads on ~450 more callsites (56 bytes
each) would just be wasted.
$ for l in fatal error warn info debug trace spam; do
echo $l; ack nvkm_$l drivers/gpu |wc; done
fatal
3 19 335
error
289 1956 30651
warn
84 513 8860
info
14 88 1502
debug
387 2339 40844
trace
31 219 3368
spam
1 7 123
bash-5.1# echo $(( 516-65-387-31-1 ))
32
Thats approximate; not accounting #defines and doc/comment mentions.
NOTE: this patch changes the log-level of the macro-issued messages
from KERN_INFO to KERN_DEBUG. Adding a .kern_lvl field to struct
_ddebug could fix that.
RFC: dyndbg & subdev->debug
Separate class-maps for each subdev are possible; except for the
coordinated use of _base, each is independent, including choice of
DISJOINT or LEVELS, as long as class-names don't conflict.
So theres some flexibility.
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
index 96113c8bee8c..065d07ccea87 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
@@ -59,8 +59,8 @@ void nvkm_subdev_intr(struct nvkm_subdev *);
#define nvkm_error(s,f,a...) nvkm_printk((s), ERROR, err, f, ##a)
#define nvkm_warn(s,f,a...) nvkm_printk((s), WARN, notice, f, ##a)
#define nvkm_info(s,f,a...) nvkm_printk((s), INFO, info, f, ##a)
-#define nvkm_debug(s,f,a...) nvkm_printk((s), DEBUG, info, f, ##a)
-#define nvkm_trace(s,f,a...) nvkm_printk((s), TRACE, info, f, ##a)
+#define nvkm_debug(s,f,a...) nvkm_printk((s), DEBUG, dbg, f, ##a)
+#define nvkm_trace(s,f,a...) nvkm_printk((s), TRACE, dbg, f, ##a)
#define nvkm_spam(s,f,a...) nvkm_printk((s), SPAM, dbg, f, ##a)
#define nvkm_error_ratelimited(s,f,a...) nvkm_printk((s), ERROR, err_ratelimited, f, ##a)
--
2.37.1
Powered by blists - more mailing lists