On Tue, Apr 15, 2025 at 4:06 AM Louis Chauvet wrote:
>
>
>
> Le 02/04/2025 à 19:41, Jim Cromie a écrit :
> > The Xe driver's XE_IOCTL_DBG macro calls drm_dbg() from inside an if
> > (expression). This breaks when CONFIG_DRM_USE_DYNAMIC_DEBUG=y because
> >
On Tue, Apr 15, 2025 at 4:05 AM Louis Chauvet wrote:
>
>
>
> Le 02/04/2025 à 19:41, Jim Cromie a écrit :
> > Treat comma as a token terminator, just like a space. This allows a
> > user to avoid quoting hassles when spaces are otherwise needed:
> >
> > :#>
On Tue, Apr 15, 2025 at 4:04 AM Louis Chauvet wrote:
>
>
>
> Le 02/04/2025 à 19:41, Jim Cromie a écrit :
> > echo 1000 > /sys/module/test_dynamic_debug/parameters/do_prints
> >
> > This allows its use as a scriptable load generator, to generate
> > dynami
On Tue, Apr 15, 2025 at 4:04 AM Louis Chauvet wrote:
>
>
>
> Le 02/04/2025 à 19:41, Jim Cromie a écrit :
> > Add __DYNAMIC_DEBUG_CLASSMAP_CHECK to implement the following
> > arg-checks at compile-time:
> >
> > 0 <= _base < 63
> > class_
On Tue, Apr 15, 2025 at 4:02 AM Louis Chauvet wrote:
>
>
>
> Le 02/04/2025 à 19:41, Jim Cromie a écrit :
> > Add a selftest script for dynamic-debug. The config requires
> > CONFIG_TEST_DYNAMIC_DEBUG=m and CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD=m,
> > which tacitly requir
On Tue, Apr 15, 2025 at 4:01 AM Louis Chauvet wrote:
>
>
>
> Le 02/04/2025 à 19:41, Jim Cromie a écrit :
> > DECLARE_DYNDBG_CLASSMAP() has a design error; its usage fails a basic
> > K&R rule: "define once, refer many times".
> >
> > When D
etnaviv has 5 DRM_UT_CORE debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs as well as plain-old pr_debug()s
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 ++
1 file changed, 2 insertions(+)
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu
virtio_gpu has 10 DRM_UT_CORE debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/virtio/virtgpu_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/v
On Mon, Mar 24, 2025 at 9:20 AM Louis Chauvet wrote:
>
>
>
> Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> > Current classmap code protects class'd pr_debugs from unintended
> > changes by "legacy" unclassed queries:
> >
> ># this doesn
new _DPRINTK flags for LOOKUP, CACHED_PREFIX
use LOOKUP to refine dynamic_emit_prefix()
= cleanup most spurious name variances:
s/\bdd_|\bddebug_/_ddebug_/g
most of s/DYNDBG/DYNAMIC_DEBUG/.
= moved doc patches to back of dydnbg-core part.
more wordsmithing / bikeshedding chan
The qxl driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/qxl/qxl_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c
TBD: some of this might be over-specification, or just over-talked.
NB: The _DEFINE & _USE model makes the user dependent on the definer,
just like EXPORT_SYMBOL(__drm_debug) already does.
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
---
v3- rework protection around PARAM
v0
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm
Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with
CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe has
drm.debug callsites.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/xe/xe_drm_client.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/xe
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/i915/i915_params.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_params.c
b/drive
r now, so they still
redundantly re-declare the classmap, but we can convert the drivers
later to DYNDBG_CLASSMAP_USE
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
this ignores a checkpatch
WARNING: Argument 'name' is not used in function-like macro
#70: FILE: include/
The gud driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/gud/gud_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/gud/gud_drv.c
examples are added to test_dynamic_debug_submod.ko, and will fail
compilation if -DDD_MACRO_ARGCHECK is added to cflags. This wouldn't
be a useful CONFIG_ item, since it breaks the build.
Signed-off-by: Jim Cromie
---
v3- $macro_name =~ s/DYNDBG/DYNAMIC_DEBUG/
prev-
- split sta
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/display/drm_dp_helper.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_dp_helper
Invoke DYNAMIC_DEBUG_CLASSMAP_PARAM to hook drm.debug (__drm_debug) to the
DRM_UT_* classmap, replacing the ad-hoc wiring previously doing it.
Add DRM_CLASSMAP_* adapter macros to selectively use
DYNAMIC_DEBUG_CLASSMAP_* when DRM_USE_DYNAMIC_DEBUG=y is configured.
Signed-off-by: Jim Cromie
g: query 0: "=_" mod:*
[ 35.553544] dyndbg: processed 1 queries, with 1778 matches, 0 errs
Signed-off-by: Jim Cromie
Co-developed-by: Łukasz Bartosik
Signed-off-by: Łukasz Bartosik
---
-r3 turn off green at end
drop config dep on TEST_DYNAMIC_DEBUG,
since basic-test uses builtin params
-
On Mon, Mar 24, 2025 at 9:24 AM Louis Chauvet wrote:
>
>
>
> Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> > Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with
> > CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe uses
> > has drm.debug calls.
>
old_bits arg is currently a pointer to the input bits, but this could
allow inadvertent changes to the input by the fn. Disallow this.
And constify new_bits while here.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
lib/dynamic_debug.c | 21 +++--
1 file changed, 11
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 56 ++---
1 file changed, 32 insertions(+), 24 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 104cf8abdf33..046c4ffb38f8 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_de
tiny/bochs has 5 DRM_UT_* debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/tiny/bochs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/tiny/boch
t value,
in this case it was _base + 1. This leaves HI class un-selectable.
NB: the macro could better validate its arguments.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
Tested-by: Louis Chauvet
---
lib/test_dynamic_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 1d926e259d8f ("vmlinux.lds.h: add HEADERED_SECTION_* macros")
I flubbed the defn of the outer 2 macros; they missed the extra arg
needed: _front/_hdr. Fix it now, before anyone notices.
Signed-off-by: Jim Cromie
---
include/asm-generic/vmlinux.lds.h | 7 ---
1 file
h
M/M didn't see because the module-loader memory placement constrains
it instead.
Fixes: aad0214f3026 ("dyndbg: add DECLARE_DYNDBG_CLASSMAP macro")
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
---
v2 a. building 2 .ko's from 1 source file is weird; add a clear
commit 47ea6f99d06e ("dyndbg: use ESCAPE_SPACE for cat control")
changed the control-file to display format strings with "\n" rather
than "\012". Update the docs to match the new reality.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
Tested-by: Louis Cha
tiny/bochs has 5 DRM_UT_* debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/tiny/bochs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/tiny/boch
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
drivers/gpu/drm/i915/i915_params.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/
The udl driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/udl/udl_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/udl
Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with
CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe uses
has drm.debug calls.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/xe/xe_drm_client.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/xe
;
modules built with CONFIG_DYNAMIC_DEBUG=y (!1) don't need the flag.
Fixes: 84ec67288c10 ("drm_print: wrap drm_*_dbg in dyndbg descriptor factory
macro")
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/
they will both see the same value.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
include/linux/dynamic_debug.h | 2 +-
lib/dynamic_debug.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
d for by anyone else, so reduce LOC & test-surface; simplify things.
Also rename enum class_map_type to enum ddebug_class_map_type.
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 23 ++--
lib/dynamic_debug.c | 102 +++---
lib/test_dyn
NKNOWN_" to loudly announce the erroneous situation, and to
make it uniquely greppable.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
lib/dynamic_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 5a007952f7
tection macro'd to false
-v2.with-this-patch - sysfs knob decides
-v2.speculative - module decides wrt classmap protection
seems unneeded now, TBD
NOTE: protection is only against class-less queries, explicit "class
FOO" adjustments are allowed (that is the mechanism
tiny/simpledrm has 3 DRM_UT_DRIVER debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/tiny/simpledrm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm
contained structs
closes the holes otherwise created by the structification (which was
my excuse for not doing it originally).
Signed-off-by: Jim Cromie
---
-v2 rework towards front of series
---
include/asm-generic/vmlinux.lds.h | 4 +-
include/linux/dynamic_debug.h | 42 +++-
ke
forward.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
lib/dynamic_debug.c | 20 +---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 85b8d32742ec..253eaf0a9bd6 100644
--- a/lib/dynamic_debug.c
+++ b/lib
chset, closer to the classmap patches its validating.
With some tedium, the tests could be refactored to split out early
tests which avoid multi-cmds, and test only the class-params.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
r3 - skip test if LACK_TMOD
older
drop -v used in test_
Time for some thorough CI.
Also, the previous 18 patches could perhaps be replaced by a single
invocation of DYNDBG_CLASSMAP_USE, from a C-file linked into all drm
drivers & helpers. I didn't find such a file, nor a drm-client
linkage item in the Makefile.
Signed-off-by: J
h
M/M didn't see because the module-loader memory placement constrains
it instead.
Fixes: aad0214f3026 ("dyndbg: add DECLARE_DYNDBG_CLASSMAP macro")
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
---
v3-
undo 1.9 simplification of ddebug_find_valid_class()
ddebug_c
f up.
ddebug_table contains a _ddebug_info member, so its users keep access
to mod_name, just now with "->info." added in.
In static ddebug_add_module(&di), reinforce the cursor-model by
dropping the modname arg, and setting di->mod_name at each caller.
Signed-off-by: Jim Cromie
The qxl driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/qxl/qxl_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c
radeon has some DRM_UT_* debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg about its use of
the class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/radeon/radeon_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/r
RM has 10.
we have 63.
This allows ...
= multiple classmaps are supported
as long as the mapped class_ids dont conflict.
a fair requirement for a narrow, future use-case.
this is now verified in this patchset.
7x 8-bit classes is workable (if you'd like)
= "legacy" clas
The gma500 has 126 DRM_UT_* debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/gma500/psb_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/g
The vkms driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/vkms/vkms_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/vkms
The mgag200 driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm
The vmwgfx driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm
The drm_gem_shmem_helper driver has a number of DRM_UT_* debugs, make
them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling
dyndbg that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a
is is just as per-module as just adding the _USE()
explicitly to the main .c file, which is less magical than make-fu.
Also, it appears to cause make && make rebuilds.
and try to link it to helpers and everything
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/Makefile | 9
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
drivers/gpu/drm/display/drm_dp_helper.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gp
The gud driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/gud/gud_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/gud/gud_drv.c
The udl driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/udl/udl_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/udl
onfigurations.
Signed-off-by: Jim Cromie
Co-developed-by: Łukasz Bartosik
Signed-off-by: Łukasz Bartosik
---
- skip comma tests if no builtins
-v3 squash in tests and doc
---
.../admin-guide/dynamic-debug-howto.rst | 9 +---
lib/dynamic_debug.c
etnaviv has 5 DRM_UT_CORE debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs as well as plain-old pr_debug()s
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 ++
1 file changed, 2 insertions(+)
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
drivers/gpu/drm/drm_crtc_helper.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm
ow the module
defining the classmap to protect its classes from unintended
alterations by legacy/class-less queries.
Next:
Author choice: use of DYNAMIC_DEBUG_CLASSMAP_PARAM() means they want
the drm.debug style control point. We should presume they want it to
reflect whats set underneath, with o
drm_dbg()s.
Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3
drivers.")
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gp
tic-key patches in the proper state. The
compiler evidently sees this lack of reference and complains.
So this drops the local var and refs the field directly in the
macro-call, which avoids the warning/error.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
drivers/gpu/drm/drm_pri
ed 1 queries, with 0 matches, 0 errs
Also reduce verbose=3 messages in ddebug_add_module
When modprobing a module, dyndbg currently logs/says "add-module", and
then "skipping" if the module has no prdbgs. Instead just check 1st
and return quietly.
no functional change
Signe
ng is actually lost here.
selftests-dyndbg: test_percent_splitting
This does basic testing of classmaps using '%' separated
multi-queries. It modprobes test_dynamic_debug with several classes
enabled, and counts to verify that the expected sites show the
enablement in the control file.
Signed-off-by: J
igned-off-by: Jim Cromie
---
---
lib/dynamic_debug.c | 29 +
lib/test_dynamic_debug.c | 8
2 files changed, 37 insertions(+)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 53e261dbf81e..56b503af0b31 100644
--- a/lib/dynamic_debug.c
+++
this usage by changing __dynamic_func_call_cls{,_no_desc}
macros into expressions, by replacing the do-while-0s with a ({ })
wrapper. In the common usage, the trailing ';' converts the
expression into a statement.
drm_dbg("statement form");
Signed-off-by: Jim Cromie
nts messages (once) to the-log.
NB: the count is clamped to 1, chosen to be notice able, but not
annoying, and not enough to accidentally flood the logs.
Signed-off-by: Jim Cromie
---
lib/test_dynamic_debug.c | 37 ++---
1 file changed, 26 insertions(+),
nside the fn, to give
access to all kp members.
Also clean up and improve comments in test-code, and add
MODULE_DESCRIPTIONs.
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
---
-v9
- fixup drm-print.h add PARAM_REF forwarding macros
with DYNAMIC_DEBUG_CLASSMAP_PARAM_REF in the API
ddebug_apply_class_bitmap(), also check for actual changes to the
bits before announcing them, to declutter logs.
No functional change.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
v3 s/modnm/mod_name/g
---
lib/dynamic_debug.c | 65 -
1 file
ing of classmaps
currently, and doesn't need to. For now, just add comment.
Signed-off-by: Jim Cromie
---
v3- drop __outvar as promising magic it doesnt have
---
include/linux/dynamic_debug.h | 1 -
lib/dynamic_debug.c | 62 ++-
2 files changed, 32
ARRAY_SIZE works here, since array decl is complete.
no functional change
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
include/linux/dynamic_debug.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
ead.
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
Documentation/admin-guide/dynamic-debug-howto.rst | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst
b/Documentation/adm
they will both see the same value.
Signed-off-by: Jim Cromie
Reviewed-by: Louis Chauvet
---
include/linux/dynamic_debug.h | 2 +-
lib/dynamic_debug.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
TBD: some of this might be over-specification, or just over-talked.
NB: The _DEFINE & _USE model makes the user dependent on the definer,
just like EXPORT_SYMBOL(__drm_debug) already does.
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
---
v5 adjustments per Randy Dunlap
v7 checkp
The vmwgfx driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm
nside the fn, to give
access to all kp members.
Also clean up and improve comments in test-code, and add
MODULE_DESCRIPTIONs.
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
---
-v9
- fixup drm-print.h add PARAM_REF forwarding macros
with DYNAMIC_DEBUG_CLASSMAP_PARAM_REF in the API
On Tue, Mar 25, 2025 at 12:29 PM wrote:
>
> On Mon, Mar 24, 2025 at 9:20 AM Louis Chauvet
> wrote:
> >
> >
> >
> > Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> > > Current classmap code protects class'd pr_debugs from uninten
On Mon, Mar 24, 2025 at 9:03 AM Louis Chauvet wrote:
>
>
>
> Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> > tiny/bochs has 5 DRM_UT_* debugs, make them controllable when
> > CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
> > class'd debugs
> > - int valid_class;
> > + int slctd_class;
>
> Nitpick: can you use full words? slctd is difficult to read.
>
yes. done. thx.
On Mon, Mar 24, 2025 at 9:23 AM Louis Chauvet wrote:
>
>
>
> Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> > Describe the 3 API macros providing dynamic_debug's classmaps
> >
> > DYNDBG_CLASSMAP_DEFINE - create & export a cl
On Mon, Mar 24, 2025 at 9:19 AM Louis Chauvet wrote:
>
>
>
> Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> > The Xe driver's XE_IOCTL_DBG macro calls drm_dbg() from inside an if
> > (expression). This breaks when CONFIG_DRM_USE_DYNAMIC_DEBUG=y because
> >
On Mon, Mar 24, 2025 at 9:07 AM Louis Chauvet wrote:
>
trimming
> >>> + __section("__dyndbg_class_users") _uname = {\
> >>> + .mod_name = KBUILD_MODNAME, \
> >>> + .map = &(_var), \
;
modules built with CONFIG_DYNAMIC_DEBUG=y (!1) don't need the flag.
Fixes: 84ec67288c10 ("drm_print: wrap drm_*_dbg in dyndbg descriptor factory
macro")
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/
On Sun, Mar 16, 2025 at 3:14 PM wrote:
>
> On Tue, Feb 25, 2025 at 7:29 AM Louis Chauvet
> wrote:
> >
> >
> >
> > Le 25/01/2025 à 07:45, Jim Cromie a écrit :
> > > move the DYNDBG_CLASSMAP_PARAM macro from test-dynamic-debug.c into
> > > the
On Mon, Mar 24, 2025 at 9:08 AM Louis Chauvet wrote:
>
>
>
> Le 20/03/2025 à 19:51, Jim Cromie a écrit :
> Thanks for your explanation of __outvar! It makes sense. I never seen
> this pattern anywhere in the kernel, maybe a simple doc comment is
> enough to carry the informa
args.
cc: Andy Whitcroft
cc: Joe Perches
cc: Dwaipayan Ray
cc: Lukas Bulwahn
Signed-off-by: Jim Cromie
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7b28ad331742..0c4f578ea6e7 10075
a different offset.
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 1 +
lib/dynamic_debug.c | 41 ++-
2 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index
Invoke DYNAMIC_DEBUG_CLASSMAP_PARAM to hook drm.debug (__drm_debug) to the
DRM_UT_* classmap, replacing the ad-hoc wiring previously doing it.
Add DRM_CLASSMAP_* adapter macros to selectively use
DYNAMIC_DEBUG_CLASSMAP_* when DRM_USE_DYNAMIC_DEBUG=y is configured.
Signed-off-by: Jim Cromie
Add mention of comma and percent delimiters into the respective
paragraphs describing their equivalents: space and newline.
cc: linux-...@vger.kernel.org
Signed-off-by: Jim Cromie
---
.../admin-guide/dynamic-debug-howto.rst | 19 +++
1 file changed, 11 insertions(+), 8
igned-off-by: Jim Cromie
---
---
lib/dynamic_debug.c | 33 +++--
lib/test_dynamic_debug.c | 8
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index aebafa1be06a..e84b6677e94d 100644
---
The drm_gem_shmem_helper driver has a number of DRM_UT_* debugs, make
them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling
dyndbg that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a
radeon has some DRM_UT_* debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg about its use of
the class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/radeon/radeon_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/r
g: query 0: "=_" mod:*
[ 35.553544] dyndbg: processed 1 queries, with 1778 matches, 0 errs
Signed-off-by: Jim Cromie
Co-developed-by: Łukasz Bartosik
Signed-off-by: Łukasz Bartosik
---
- check KCONFIG_CONFIG to avoid silly fails
Several tests are dependent upon config choices. Lets avoid fai
tiny/simpledrm has 3 DRM_UT_DRIVER debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/tiny/simpledrm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm
The mgag200 driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm
is is just as per-module as just adding the _USE()
explicitly to the main .c file, which is less magical than make-fu.
Also, it appears to cause make && make rebuilds.
and try to link it to helpers and everything
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/Makefile | 9
Time for some thorough CI.
Also, the previous 18 patches could perhaps be replaced by a single
invocation of DYNDBG_CLASSMAP_USE, from a C-file linked into all drm
drivers & helpers. I didn't find such a file, nor a drm-client
linkage item in the Makefile.
Signed-off-by: J
The gma500 has 126 DRM_UT_* debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/gma500/psb_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/g
1 - 100 of 1150 matches
Mail list logo