[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221111221715.563020-5-jim.cromie@gmail.com>
Date: Fri, 11 Nov 2022 15:17:12 -0700
From: Jim Cromie <jim.cromie@...il.com>
To: 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-kernel@...r.kernel.org
Cc: daniel.vetter@...ll.ch, seanpaul@...omium.org, robdclark@...il.com,
linux@...musvillemoes.dk, joe@...ches.com,
Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH 4/7] test-dyndbg: show that DEBUG enables prdbgs at compiletime
Dyndbg is required to enable prdbgs at compile-time if DEBUG is
defined. Show this works; add the defn to test_dynamic_debug.c,
and manually inspect/verify its effect at module load:
[ 15.292810] dyndbg: module:test_dynamic_debug attached 4 classes
[ 15.293189] dyndbg: 32 debug prints in module test_dynamic_debug
[ 15.293715] test_dd: init start
[ 15.293716] test_dd: doing categories
[ 15.293716] test_dd: LOW msg
...
[ 15.293733] test_dd: L6 msg
[ 15.293733] test_dd: L7 msg
[ 15.293733] test_dd: init done
NOTES:
As is observable above, define DEBUG enables all prdbgs, including
those in mod_init-fn, and more notably, the "class"d ones (callsites
with non-default class_ids).
This differs from the >control interface, which in order to properly
protect a client's class'd prdbgs, requires a "class FOO" in queries
to change them. Note that the DEBUG is in the module source file.
This yields an occaisional surprise; the following disables all the
compile-time enabled plain prdbgs, but leaves the class'd ones
enabled.
:#> modprobe test_dynamic_debug dyndbg==_
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
lib/test_dynamic_debug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c
index a01f0193a419..9d48689dc0ab 100644
--- a/lib/test_dynamic_debug.c
+++ b/lib/test_dynamic_debug.c
@@ -8,6 +8,8 @@
#define pr_fmt(fmt) "test_dd: " fmt
+#define DEBUG
+
#include <linux/module.h>
/* run tests by reading or writing sysfs node: do_prints */
--
2.38.1
Powered by blists - more mailing lists