[PATCH v9-resend 46/54] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 31/54] drm-dyndbg: adapt DRM to invoke DYNDBG_CLASSMAP_PARAM

2024-07-17 Thread Jim Cromie
Invoke DYNDBG_CLASSMAP_PARAM to hook drm.debug (__drm_debug) to the DRM_UT_* classmap, replacing the ad-hoc wiring previously doing it. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_print.c | 8 ++-- include/drm/drm_print.h | 6 -- 2 files changed, 6 insertions(+), 8 deletions

[PATCH v9-resend 03/54] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2024-07-17 Thread Jim Cromie
o reserved .class_ids (the 1..64 val range per module). Signed-off-by: Jim Cromie --- 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 f2c5e7910bb1..73ccf947d4aa 100644 --- a/lib/dynamic_debug.c +++ b/lib/dy

[PATCH v9-resend 38/54] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 21/54] dyndbg: split multi-query strings with %

2024-07-17 Thread Jim Cromie
71] dyndbg: processed 2 queries, with 0 matches, 2 errs bash: echo: write error: Invalid argument The '%' splits the input into 2 queries, and both fail. Given the limited utility of matching against the working parts of a format string "foo: %d bar %s", nothing is actually lost

[PATCH v9-resend 24/54] selftests-dyndbg: add test_mod_submod

2024-07-17 Thread Jim Cromie
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 --- .../dynamic_debug/dyndbg_selftest.sh | 67 +++ 1 file ch

[PATCH v9-resend 28/54] dyndbg-selftest: reduce default verbosity

2024-07-17 Thread Jim Cromie
Remove the '-v' arg from the tests in test_mod_submod(). Setting V=1 in the environment turns it back on, for all tests. Signed-off-by: Jim Cromie --- .../dynamic_debug/dyndbg_selftest.sh | 23 +-- 1 file changed, 11 insertions(+), 12 deletions(-) diff --g

[PATCH v9-resend 10/54] dyndbg: silence debugs with no-change updates

2024-07-17 Thread Jim Cromie
In ddebug_apply_class_bitmap(), check for actual changes to the bits before announcing them, to declutter logs. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib

[PATCH v9-resend 19/54] dyndbg: treat comma as a token separator

2024-07-17 Thread Jim Cromie
dynamic_debug dyndbg=class,D2_CORE,+p Signed-off-by: Jim Cromie Co-developed-by: Łukasz Bartosik Signed-off-by: Łukasz Bartosik --- lib/dynamic_debug.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index e9a95b0f3757.

[PATCH v9-resend 25/54] dyndbg-doc: explain flags parse 1st

2024-07-17 Thread Jim Cromie
7;s the flags, and before the match-spec is detailed. Opinions ? Signed-off-by: Jim Cromie --- Documentation/admin-guide/dynamic-debug-howto.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentation/admin-guide/

[PATCH v9-resend 44/54] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 23/54] docs/dyndbg: explain new delimiters: comma, percent

2024-07-17 Thread Jim Cromie
Add mention of comma and percent delimiters into the respective paragraphs describing their equivalents: space and newline. Signed-off-by: Jim Cromie --- .../admin-guide/dynamic-debug-howto.rst| 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a

[PATCH v9-resend 15/54] dyndbg-API: fix DECLARE_DYNDBG_CLASSMAP

2024-07-17 Thread Jim Cromie
classes by name. NB: this patch ignores a checkpatch do-while warning; which is wrong for declarative macros like these: arch/powerpc/platforms/cell/spu_base.c 48:static DEFINE_SPINLOCK(spu_lock); 62:static DEFINE_SPINLOCK(spu_full_list_lock); 63:static DEFINE_MUTEX(spu_full_list_mutex); Fixes: aad

[PATCH v9-resend 54/54] docs-dyndbg: improve howto classmaps api section

2024-07-17 Thread Jim Cromie
reword the classmaps-api section to better explain how it supports DRM, and (a little bit) to steer clear of designated-inits in the _DEFINE description. probably just squash this back in Signed-off-by: Jim Cromie --- .../admin-guide/dynamic-debug-howto.rst | 64 +++ 1

[PATCH v9-resend 16/54] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2024-07-17 Thread Jim Cromie
gs. These class'd flag-settings, added by modprobe, alter the counts of flag-matching patterns, breaking the tests' expectations. Signed-off-by: Jim Cromie Co-developed-by: Łukasz Bartosik Signed-off-by: Łukasz Bartosik --- MAINTAINERS | 1 +

[PATCH v9-resend 14/54] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2024-07-17 Thread Jim Cromie
uce 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_dynamic_debug.c | 26 - 3 files

[PATCH v9-resend 52/54] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2024-07-17 Thread Jim Cromie
end of official submission. Time for some quality CI Signed-off-by: Jim Cromie --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index d0aa277fc3bf..c508c0834641 100644 --- a/drivers/gpu/drm

[PATCH v9-resend 45/54] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 51/54] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver

2024-07-17 Thread Jim Cromie
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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v9-resend 40/54] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 39/54] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 37/54] drm-print: workaround unused variable compiler meh

2024-07-17 Thread Jim Cromie
zed dyndbg, the macro doesn't actually check the category, since the static-key patches in the proper state. This is also likely why the auto var appears to be unused by the compiler. commit 9fd6f61a297e ("drm/print: add drm_dbg_printer() for drm device specific printer") CC: Jani Nik

[PATCH v9-resend 07/54] dyndbg: split param_set_dyndbg_classes to _module & wrapper fns

2024-07-17 Thread Jim Cromie
: Jim Cromie --- lib/dynamic_debug.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index a1fd2e9dbafb..4a48f830507f 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -711,18 +711,9

[PATCH v9-resend 09/54] dyndbg: reduce verbose/debug clutter

2024-07-17 Thread Jim Cromie
ORE +p" mod:* dyndbg: split into words: "class" "DRM_UT_CORE" "+p" dyndbg: op='+' flags=0x1 *flagsp=0x1 *maskp=0xffff dyndbg: no-match: func="" file="" module="" format="" lineno=0-0 class=... dyndbg: processed

[PATCH v9-resend 33/54] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 34/54] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2024-07-17 Thread Jim Cromie
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/drm_crtc_helper.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/driv

[PATCH v9-resend 29/54] drm: use correct ccflags-y spelling

2024-07-17 Thread Jim Cromie
bg 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/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index f9ca4f8fa6c5..78b464cd4348 100644 --- a/drivers/gpu/drm/Makefile +++ b/d

[PATCH v9-resend 08/54] dyndbg: drop NUM_TYPE_ARRAY

2024-07-17 Thread Jim Cromie
ARRAY_SIZE works here, since array decl is complete. no functional change Signed-off-by: Jim Cromie --- 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 index 2b0057058ecf

[PATCH v9-resend 22/54] selftests-dyndbg: test_percent_splitting

2024-07-17 Thread Jim Cromie
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: Jim Cromie --- .../dynamic_debug/dyndbg_s

[PATCH v9-resend 05/54] dyndbg: replace classmap list with a vector

2024-07-17 Thread Jim Cromie
the array from start to length. Also: Move #define __outvar up, above an added use in a fn-prototype. Simplify ddebug_attach_module_classes args, ref has both address & len. no functional changes Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 1 - lib/dyn

[PATCH v9-resend 26/54] dyndbg: change __dynamic_func_call_cls* macros into expressions

2024-07-17 Thread Jim Cromie
} Fix it by changing __dynamic_func_call_cls{,_no_desc} macros into expressions, by replacing the do-while-0s with a ({ }) wrapper. In C, all legal expressions are also legal statements, as converted by the trailing semi-colon in a statement-style macro invocation: drm_dbg("statement form&q

[PATCH v9-resend 27/54] selftests-dyndbg: check KCONFIG_CONFIG to avoid silly fails

2024-07-17 Thread Jim Cromie
config also wouldn't really test anything more fully than all-loadable modules, since they default together. Signed-off-by: Jim Cromie fixup-kconfig --- .../dynamic_debug/dyndbg_selftest.sh | 45 ++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH v9-resend 18/54] dyndbg-doc: add classmap info to howto

2024-07-17 Thread Jim Cromie
__drm_debug cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- v5 adjustments per Randy Dunlap v7 checkpatch fixes v8 more --- .../admin-guide/dynamic-debug-howto.rst | 63 ++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guid

[PATCH v9-resend 02/54] test-dyndbg: fixup CLASSMAP usage error

2024-07-17 Thread Jim Cromie
* - multiple maps must set their base to share the 0-62 class_id space !! Signed-off-by: Jim Cromie --- lib/test_dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index 8dd250ad022b..a01f0193a419 100644 --- a

[PATCH v9-resend 06/54] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it

2024-07-17 Thread Jim Cromie
functional change. Signed-off-by: Jim Cromie --- after `modprobe i915`, heres the module dependencies, though not all on drm.debug. bash-5.2# lsmod Module Size Used by i915 3133440 0 drm_buddy 20480 1 i915 ttm90112 1 i915 i2

[PATCH v9-resend 20/54] selftests-dyndbg: add comma_terminator_tests

2024-07-17 Thread Jim Cromie
New fn validates parsing and effect of queries using combinations of commas and spaces to delimit the tokens. It manipulates pr-debugs in builtin module/params, so might have deps I havent foreseen on odd configurations. Signed-off-by: Jim Cromie --- .../selftests/dynamic_debug

[PATCH v9-resend 47/54] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 36/54] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 35/54] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 13/54] dyndbg: reduce verbose=3 messages in ddebug_add_module

2024-07-17 Thread Jim Cromie
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 Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 7 +++ 1 file changed, 3 insert

[PATCH v9-resend 04/54] dyndbg: make ddebug_class_param union members same size

2024-07-17 Thread Jim Cromie
they will both see the same value. Signed-off-by: Jim Cromie --- 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 index ff44ec346162

[PATCH v9-resend 12/54] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2024-07-17 Thread Jim Cromie
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 --- lib/dynamic_debug.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions

[PATCH v9-resend 43/54] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 00/54] fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2024-07-17 Thread Jim Cromie
ssmaps are in a meta-stable state right now; some governor might yet walk it over to the gravel pit out back. Tested-bys would help greatly, help get it off the fence it straddles. Please specify your test method: selftest or drm.debug=0x1ff boot. Next Im gonna try to haul this over to the freed

[PATCH v9-resend 42/54] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv

2024-07-17 Thread Jim Cromie
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(+)

[PATCH v9-resend 50/54] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver

2024-07-17 Thread 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

[PATCH v9-resend 48/54] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 32/54] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 11/54] dyndbg: tighten ddebug_class_name() 1st arg type

2024-07-17 Thread Jim Cromie
Change function's 1st arg-type, and deref in the caller. The fn doesn't need any other fields in the struct. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_deb

[PATCH v9-resend 49/54] drm-dyndbg: add DRM_CLASSMAP_USE to the gud driver

2024-07-17 Thread Jim Cromie
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

[PATCH v9-resend 53/54] dyndbg: tighten up kdoc about DYNDBG_CLASSMAP_* macros

2024-07-17 Thread Jim Cromie
to a bit in drm.debug. The macro interface shouldn't suggest a sparse map is possible. So reword DYNDBG_CLASSMAP_* macro kdoc to more actively guide reader away from designated initializers here. TBD probably squash this back into the patchset. CC: ville.syrj...@linux.intel.com Signed-o

[PATCH v9-resend 01/54] docs/dyndbg: update examples \012 to \n

2024-07-17 Thread Jim Cromie
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 --- Documentation/admin-guide/dynamic-debug-how

[PATCH v9-resend 17/54] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2024-07-17 Thread Jim Cromie
TIONs. Signed-off-by: Jim Cromie --- fixup drm-print.h add PARAM_REF forwarding macros with DYNDBG_CLASSMAP_PARAM_REF in the API, add DRM_ variant --- include/linux/dynamic_debug.h | 37 - lib/dynamic_debug.c | 70 ++--- lib/test_dynamic_de

[PATCH v9-resend 30/54] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2

2024-07-17 Thread Jim Cromie
hey still redundantly re-declare the classmap, but we can convert the drivers later to DYNDBG_CLASSMAP_USE Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_print.c | 25 + include/drm/drm_print.h | 8 2 files changed, 21 insertions(+), 12 deletions(-) dif

[PATCH v9-resend 41/54] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2024-07-17 Thread Jim Cromie
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

Re: [PATCH v9 00/53] fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2024-07-16 Thread jim . cromie
Tue, Jul 2, 2024 at 4:01 PM Luis Chamberlain > > > > wrote: > > > > > > > > > > On Tue, Jul 02, 2024 at 03:56:50PM -0600, Jim Cromie wrote: > > > > > > This fixes dynamic-debug support for DRM.debug, added via classmaps. > > > &

Re: [PATCH v9 27/52] selftests-dyndbg: check KCONFIG_CONFIG to avoid silly fails

2024-07-15 Thread jim . cromie
On Wed, Jul 10, 2024 at 2:23 PM Helen Koike wrote: > > > > On 02/07/2024 18:57, Jim Cromie wrote: > > Several tests are dependent upon config choices. Lets avoid failing > > where that is noise. > > ... > > > > test_mod_submod() recaps the bug found

Re: [PATCH v9 00/53] fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2024-07-15 Thread jim . cromie
On Fri, Jul 12, 2024 at 9:44 AM Łukasz Bartosik wrote: > > On Wed, Jul 3, 2024 at 12:14 AM wrote: > > > > On Tue, Jul 2, 2024 at 4:01 PM Luis Chamberlain wrote: > > > > > > On Tue, Jul 02, 2024 at 03:56:50PM -0600, Jim Cromie wrote: > > > > This

Re: [PATCH v9 30/52] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2

2024-07-10 Thread jim . cromie
On Wed, Jul 3, 2024 at 10:11 AM wrote: > > Got it. > I had some mental block about passing designated intializers as macro args. > it just worked, I needed to eyeball the .i file just to be sure. > thanks. > I have a fixup patch. > whats the best thing to do with it, squash it in for later ? send

Re: [PATCH v9 30/52] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2

2024-07-04 Thread jim . cromie
Syrjälä wrote: > > On Tue, Jul 02, 2024 at 08:34:39PM -0600, jim.cro...@gmail.com wrote: > > On Tue, Jul 2, 2024 at 5:33 PM Ville Syrjälä > > wrote: > > > > > > On Tue, Jul 02, 2024 at 03:57:20PM -0600, Jim Cromie wrote: > > > > dyndbg's CLAS

[PATCH v9 40/52] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2024-07-03 Thread Jim Cromie
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

[PATCH v9 13/52] dyndbg: reduce verbose=3 messages in ddebug_add_module

2024-07-03 Thread Jim Cromie
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 Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 7 +++ 1 file changed, 3 insert

[PATCH v9 52/53] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver

2024-07-03 Thread Jim Cromie
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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v9 48/52] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 33/52] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 45/52] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 34/53] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 44/52] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2024-07-03 Thread Jim Cromie
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

[PATCH v9 21/52] dyndbg: split multi-query strings with %

2024-07-03 Thread Jim Cromie
71] dyndbg: processed 2 queries, with 0 matches, 2 errs bash: echo: write error: Invalid argument The '%' splits the input into 2 queries, and both fail. Given the limited utility of matching against the working parts of a format string "foo: %d bar %s", nothing is actually lost

[PATCH v9 41/52] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2024-07-03 Thread Jim Cromie
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

[PATCH v9 37/52] drm-print: workaround unused variable compiler meh

2024-07-03 Thread Jim Cromie
zed dyndbg, the macro doesn't actually check the category, since the static-key patches in the proper state. This is also likely why the auto var appears to be unused by the compiler. commit 9fd6f61a297e ("drm/print: add drm_dbg_printer() for drm device specific printer") CC: Jani Nik

[PATCH v9 34/52] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2024-07-03 Thread Jim Cromie
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/drm_crtc_helper.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/driv

[PATCH v9 43/53] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv

2024-07-03 Thread Jim Cromie
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(+)

[PATCH v9 42/52] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv

2024-07-03 Thread Jim Cromie
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(+)

[PATCH v9 32/52] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 10/52] dyndbg: silence debugs with no-change updates

2024-07-03 Thread Jim Cromie
In ddebug_apply_class_bitmap(), check for actual changes to the bits before announcing them, to declutter logs. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib

[PATCH v9 22/52] selftests-dyndbg: test_percent_splitting

2024-07-03 Thread Jim Cromie
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: Jim Cromie --- .../dynamic_debug/dyndbg_s

[PATCH v9 05/52] dyndbg: replace classmap list with a vector

2024-07-03 Thread Jim Cromie
the array from start to length. Also: Move #define __outvar up, above an added use in a fn-prototype. Simplify ddebug_attach_module_classes args, ref has both address & len. no functional changes Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 1 - lib/dyn

[PATCH v9 44/53] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 14/52] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2024-07-03 Thread Jim Cromie
uce 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_dynamic_debug.c | 26 - 3 files

[PATCH v9 41/53] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2024-07-03 Thread Jim Cromie
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

[PATCH v9 33/53] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 11/52] dyndbg: tighten ddebug_class_name() 1st arg type

2024-07-03 Thread Jim Cromie
Change function's 1st arg-type, and deref in the caller. The fn doesn't need any other fields in the struct. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_deb

[PATCH v9 35/53] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2024-07-03 Thread Jim Cromie
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/drm_crtc_helper.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/driv

[PATCH v9 37/53] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

2024-07-03 Thread Jim Cromie
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

[PATCH v9 39/52] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu

2024-07-03 Thread Jim Cromie
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

[PATCH v9 32/53] DRM-CLASSMAP-USE in drm-drv.c

2024-07-03 Thread Jim Cromie
--- drivers/gpu/drm/drm_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 243cacb3575c..f511d40f577a 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -56,6 +56,9 @@ MODULE_LICENSE("GPL and additional ri

[PATCH v9 27/52] selftests-dyndbg: check KCONFIG_CONFIG to avoid silly fails

2024-07-03 Thread Jim Cromie
config also wouldn't really test anything more fully than all-loadable modules, since they default together. Signed-off-by: Jim Cromie fixup-kconfig --- .../dynamic_debug/dyndbg_selftest.sh | 45 ++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH v9 36/53] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2024-07-03 Thread Jim Cromie
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

[PATCH v9 53/53] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2024-07-03 Thread Jim Cromie
end of official submission. Time for some quality CI Signed-off-by: Jim Cromie --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 5a0c476361c3..b2ea73ae48f0 100644 --- a/drivers/gpu/drm

[PATCH v9 36/52] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

2024-07-03 Thread Jim Cromie
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

[PATCH v9 45/53] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2024-07-03 Thread Jim Cromie
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

[PATCH v9 26/52] dyndbg: change __dynamic_func_call_cls* macros into expressions

2024-07-03 Thread Jim Cromie
} Fix it by changing __dynamic_func_call_cls{,_no_desc} macros into expressions, by replacing the do-while-0s with a ({ }) wrapper. In C, all legal expressions are also legal statements, as converted by the trailing semi-colon in a statement-style macro invocation: drm_dbg("statement form&q

[PATCH v9 48/53] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 52/52] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2024-07-03 Thread Jim Cromie
end of official submission. Time for some quality CI Signed-off-by: Jim Cromie --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 5a0c476361c3..b2ea73ae48f0 100644 --- a/drivers/gpu/drm

[PATCH v9 24/52] selftests-dyndbg: add test_mod_submod

2024-07-03 Thread Jim Cromie
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 --- .../dynamic_debug/dyndbg_selftest.sh | 67 +++ 1 file ch

Re: [PATCH v9 00/53] fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2024-07-03 Thread jim . cromie
On Tue, Jul 2, 2024 at 4:01 PM Luis Chamberlain wrote: > > On Tue, Jul 02, 2024 at 03:56:50PM -0600, Jim Cromie wrote: > > This fixes dynamic-debug support for DRM.debug, added via classmaps. > > commit bb2ff6c27bc9 (drm: Disable dynamic debug as broken) > > > > CONF

[PATCH v9 49/53] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 38/52] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

2024-07-03 Thread Jim Cromie
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

[PATCH v9 35/52] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2024-07-03 Thread Jim Cromie
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

  1   2   3   4   5   6   7   8   9   >