Skip to content

dyndbg: POC use dynamic_debug_exec_queries in DRM

Jim Cromie dri-devel intel-gfx lkml oe-kbuild-all 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm-printk: POC caller of dynamic-debug-exec-queriesdrivers/gpu/drm/drm_print.c+35 -00 replies
2/4drm-printk: call pr_debug() from drm_dev_dbg, __drm_dbgdrivers/gpu/drm/drm_print.c+17 -100 replies
3/4i915: add -DDYNAMIC_DEBUG_MODULE to i915/gvt/Makefiledrivers/gpu/drm/i915/gvt/Makefile+3 -20 replies
4/4i915: POC use dynamic_debug_exec_queries to control pr_debugs in gvtdrivers/gpu/drm/i915/i915_params.c+76 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] dyndbg: POC use dynamic_debug_exec_queries in DRM

This patchset tests/demonstrates using dynamic_debug_exec_queries() to alter 2 drivers' pr_debugs without a user directly using >control.

For drm.core, I copied drm.debug module parameter model, adding drm.debug2 as a POC user interface to control 2 pr_debug additions to drm_printk:drm_dbg,dev_dbg, allowing both category and >control to work in parallel. This patch makes no attempt to integrate drm's category mechanism with the "format=^class" callsite selection; thats the "theory", but it needs testing.

For i915/gvt, I repeated the pattern. I focussed on gvt only, because it had the most compelling use of format strings as pr_debug classes; ~120 pr_debugs in 9 classes. These are mapped onto bits of the param.

bash-5.0# echo 0x0 > /sys/module/i915/parameters/debug_dyn

[ 3137.044185] set_dyndbg: result:0x0 from 0x0
[ 3137.044185] 
[ 3137.047370] dyndbg: query 0: "format='^gvt: cmd: ' -p"
[ 3137.050302] dyndbg: entry, buf:'format='^gvt: cmd: ' -p'
[ 3137.053331] dyndbg: start-of-word:0 'format='^gvt: cmd: ' -p'

These patches were the test/use case for-59 fixes:
https://lore.kernel.org/lkml/[email protected]/

Jim Cromie (4):
drm-printk: POC caller of dynamic-debug-exec-queries
drm-printk: call pr_debug() from drm_dev_dbg, __drm_dbg
i915: add -DDYNAMIC_DEBUG_MODULE to i915/gvt/Makefile
i915: POC use dynamic_debug_exec_queries to control pr_debugs in gvt

 drivers/gpu/drm/drm_print.c        | 54 ++++++++++++++++++---
 drivers/gpu/drm/i915/gvt/Makefile  |  5 +-
 drivers/gpu/drm/i915/i915_params.c | 76 ++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+), 8 deletions(-)
Signature · 1 line
2.26.2