From: Jim Cromie <jim.cromie@gmail.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Zhenyu Wang <zhenyuw@linux.intel.com>,
Zhi Wang <zhi.a.wang@intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
intel-gvt-dev@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org
Cc: Jim Cromie <jim.cromie@gmail.com>, jbaron@akamai.com
Subject: [PATCH v3 0/5] drm: use dyndbg in drm_print
Date: Wed, 14 Jul 2021 11:51:33 -0600 [thread overview]
Message-ID: <20210714175138.319514-1-jim.cromie@gmail.com> (raw)
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
next reply other threads:[~2021-07-14 17:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 17:51 Jim Cromie [this message]
2021-07-14 17:51 ` [PATCH v3 1/5] drm/print: fixup spelling in a comment Jim Cromie
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 ` [PATCH v3 3/5] drm/print: RFC add choice to use dynamic debug in drm-debug Jim Cromie
2021-07-20 13:29 ` Daniel Vetter
2021-07-22 15:20 ` [Intel-gfx] " Sean Paul
2021-07-27 14:02 ` Sean Paul
2021-07-28 21:22 ` jim.cromie
2021-07-22 19:38 ` 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 ` [PATCH v3 5/5] i915: map gvt pr_debug categories to bits in parameters/debug_gvt Jim Cromie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210714175138.319514-1-jim.cromie@gmail.com \
--to=jim.cromie@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=jbaron@akamai.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tzimmermann@suse.de \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.a.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).