RFC Allow using dyndbg to replace drm_debug_enabled
Get series with b4
b4 am [email protected]Versions newest first
- v2 RFC Latest4 patches 2 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macroinclude/ | +13 | 2 replies | |
| 2/4 | drm: fixup comment spellinginclude/ | +1 | 0 replies | |
| 3/4 | drm: RFC add choice to use dynamic debug in drm-debugdrivers/ drivers/ include/ | +159 | 0 replies | |
| 4/4 | i915: map gvt pr_debug categories to bits in parameters/debug_gvtdrivers/ drivers/ | +80 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [RFC PATCH v2 0/4] Allow using dyndbg to replace drm_debug_enabled
drm_debug_enabled() is called a lot to do unlikely bit-tests to control debug printing; this is a good job for dynamic-debug, IFF it is built with JUMP_LABEL.
Enable the use of dynamic-debug to avoid drm_debug_enabled() overheads, opt in with CONFIG_DRM_USE_DYNAMIC_DEBUG=y.
I have this patchset running bare-metal on an i915 laptop & an amdgpu desktop (both as loadable modules).
I booted the amdgpu box with:
BOOT_IMAGE=(hd2,gpt2)/vmlinuz-5.13.0-dd7-13692-g8def25788f56 \
root=UUID=mumble ro \
rootflags=subvol=root00 rhgb \
dynamic_debug.verbose=3 main.dyndbg=+p \
amdgpu.debug=1 amdgpu.test=1 \
"amdgpu.dyndbg=format ^[ +p"That last line activates ~1700 callsites with a format like '[DML' etc at boot, causing ~76k prdbgs in 409 seconds, before I turned them off with:
echo module amdgpu -p > /proc/dynamic_debug/control
[root@gandalf jimc]# journalctl -b-0 | grep -P '\[(DML|VBLANK|SURFACE|BIOS|BANDWIDTH)' | wc
68708 578503 5054437
[root@gandalf jimc]# journalctl -b-0 | grep -P '\[(DML|VBLANK|SURFACE|BIOS|BANDWIDTH|\w+)' | wc
76298 661176 6028087
IOW, things appear to hold up under some stress.
this is on top of master @ v5.13-13688-gde5540965853
v1 is here:
https://lore.kernel.org/lkml/[email protected]/
Jim Cromie (4):
drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro
drm: fixup comment spelling
drm: RFC add choice to use dynamic debug in drm-debug
i915: map gvt pr_debug categories to bits in parameters/debug_gvt
drivers/gpu/drm/Kconfig | 13 ++++ drivers/gpu/drm/drm_print.c | 75 +++++++++++++++++- drivers/gpu/drm/i915/gvt/Makefile | 4 + drivers/gpu/drm/i915/i915_params.c | 76 ++++++++++++++++++ include/drm/drm_print.h | 119 ++++++++++++++++++++--------- 5 files changed, 249 insertions(+), 38 deletions(-)
Signature · 1 line
2.31.1