All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] drm: use dyndbg in drm_print
@ 2021-07-14 17:51 ` Jim Cromie
  0 siblings, 0 replies; 39+ messages in thread
From: Jim Cromie @ 2021-07-14 17:51 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Zhenyu Wang, Zhi Wang, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, dri-devel, linux-kernel,
	intel-gvt-dev, intel-gfx
  Cc: jbaron, Jim Cromie

hi dri-devel,

Im pretty new in this particular playground.
Im using this to send, is it too spammy ? too --to ?
   git send-email --dry-run \
   --to-cmd='scripts/get_maintainer.pl --no-rolestats v3-000*.patch' \
   --to=jbaron@akamai.com v3-000*.patch

drm_debug_enabled() is called a lot (by drm_dev_dbg) to do unlikely
bit-tests to selectively enable debug printing; this is a good job for
dynamic-debug, IFF it is built with JUMP_LABEL.
 
This patchset enables the use of dynamic-debug to avoid those
drm_debug_enabled() overheads, if CONFIG_DRM_USE_DYNAMIC_DEBUG=y.

v3: fixes missed SOB, && on BOL, commit-log tweaks
    reordered patches, 1 is comment, 2 is whitespace.
    dropped RFC, to see what happens.
v2: https://lore.kernel.org/lkml/20210711055003.528167-1-jim.cromie@gmail.com/
v1: https://lore.kernel.org/lkml/20201204035318.332419-1-jim.cromie@gmail.com/

Doing so creates many new pr_debug callsites,
otherwise i915 has ~120 prdbgs, and drm has just 1;

  bash-5.1# modprobe i915
  dyndbg:   8 debug prints in module video
  dyndbg: 305 debug prints in module drm
  dyndbg: 207 debug prints in module drm_kms_helper
  dyndbg:   2 debug prints in module ttm
  dyndbg: 1720 debug prints in module i915

On amdgpu, enabling it adds ~3200 prdbgs, currently at 56 bytes each.
So CONFIG_DRM_USE_DYNAMIC_DEBUG=y affects resource requirements.

Im running this patchset 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 enables ~1700 prdbg callsites with a format like '[DML'
etc at boot, and amdgpu.test=1 triggers 3 minutes of tests, causing
~76k prdbgs in 409 seconds, before I turned them off with:

  echo module amdgpu -p > /proc/dynamic_debug/control

This is on top of master @ v5.14-rc1
Should I rebase onto something else ?

Jim Cromie (5):
  drm/print: fixup spelling in a comment
  drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro
  drm/print: RFC add choice to use dynamic debug in drm-debug
  drm/print: move conditional deref into macro defn
  i915: map gvt pr_debug categories to bits in parameters/debug_gvt

Note: 3/5, 5/5 have bits that are here for POC, but belong in
dynamic_debug.c.


 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            | 117 ++++++++++++++++++++---------
 5 files changed, 247 insertions(+), 38 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2022-03-05 16:06 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 17:51 [PATCH v3 0/5] drm: use dyndbg in drm_print Jim Cromie
2021-07-14 17:51 ` [Intel-gfx] " Jim Cromie
2021-07-14 17:51 ` Jim Cromie
2021-07-14 17:51 ` [PATCH v3 1/5] drm/print: fixup spelling in a comment Jim Cromie
2021-07-14 17:51   ` [Intel-gfx] " Jim Cromie
2021-07-14 17:51   ` Jim Cromie
2021-07-20 13:08   ` Daniel Vetter
2021-07-20 13:08     ` [Intel-gfx] " Daniel Vetter
2021-07-20 13:08     ` Daniel Vetter
2021-07-14 17:51 ` [PATCH v3 2/5] drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro Jim Cromie
2021-07-14 17:51   ` [Intel-gfx] " Jim Cromie
2021-07-14 17:51   ` Jim Cromie
2021-07-14 17:51 ` [PATCH v3 3/5] drm/print: RFC add choice to use dynamic debug in drm-debug Jim Cromie
2021-07-14 17:51   ` [Intel-gfx] " Jim Cromie
2021-07-14 17:51   ` Jim Cromie
2021-07-20 13:29   ` Daniel Vetter
2021-07-20 13:29     ` [Intel-gfx] " Daniel Vetter
2021-07-20 13:29     ` Daniel Vetter
2021-07-22 15:20     ` [Intel-gfx] " Sean Paul
2021-07-22 15:20       ` Sean Paul
2021-07-27 14:02       ` Sean Paul
2021-07-27 14:02         ` Sean Paul
2021-07-27 14:02         ` Sean Paul
2021-07-28 21:22         ` jim.cromie
2021-07-28 21:22           ` jim.cromie
2021-07-28 21:22           ` jim.cromie
2021-07-22 19:38     ` jim.cromie
2021-07-22 19:38       ` [Intel-gfx] " jim.cromie
2021-07-22 19:38       ` jim.cromie
2022-03-05 16:06     ` Jim Cromie
2022-03-05 16:06       ` [Intel-gfx] " Jim Cromie
2022-03-05 16:06       ` Jim Cromie
2021-07-14 17:51 ` [PATCH v3 4/5] drm/print: move conditional deref into macro defn Jim Cromie
2021-07-14 17:51   ` [Intel-gfx] " Jim Cromie
2021-07-14 17:51   ` Jim Cromie
2021-07-14 17:51 ` [PATCH v3 5/5] i915: map gvt pr_debug categories to bits in parameters/debug_gvt Jim Cromie
2021-07-14 17:51   ` [Intel-gfx] " Jim Cromie
2021-07-14 17:51   ` Jim Cromie
2021-07-16 14:33 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm: use dyndbg in drm_print (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.