tations, and passed or failed.
v8 is here:
https://patchwork.freedesktop.org/series/93914/
https://lore.kernel.org/lkml/20210915163957.2949166-1-jim.cro...@gmail.com/
The major change since v8 is that +T now works for all users, if
CONFIG_TRACING=y, otherwise it complains/errors.
Jim Crom
quot;gvt:render:" },
[8] = { "gvt:sched:" });
If CONFIG_DYNAMIC_DEBUG_CORE=y, then gvt/Makefile adds
-DDYNAMIC_DEBUG_MODULE to cflags, which CONFIG_DYNAMIC_DEBUG=n
(CORE-only) builds need. This is redone more comprehensively soon.
Signed-off-by: Jim Cromie
---
v5:
. stati
o format "^drm:atomic:fail: " +p > control
Removing embedded spaces in the class-prefixes simplifies the
corresponding match-prefix. This means that "quoted" match-prefixes
are only needed when the trailing space is desired, in order to
exclude explicitly sub-categorized pr
EGORIES to create a sysfs location which
maps from bits to these 13 sets of categorized pr_debugs to en/disable.
Makefile adds -DDYNAMIC_DEBUG_MODULE for CONFIG_DYNAMIC_DEBUG_CORE,
otherwise BUILD_BUG_ON triggers (obvious errors on subtle misuse is
better than mysterious ones).
Signed-off-by:
allocates and initializes ...
Signed-off-by: Jim Cromie
---
include/drm/drm_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 0cd95953cdf5..4b29261c4537 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
acer(),
since dyndbg could just provide it when TRACING is on.
NOTES:
$> modprobe test_dynamic_debug dyndbg=+p
it fails 3/29 tests. havent looked at why.
$> modprobe test_dynamic_debug use_bad_tracer=1
Earlier in dev, bad_tracer() exploded in recursion, I havent been able
to replicate
quot;); // trailing _ for ad-hoc subcat
Summarizing:
- "drm:kms: " & "drm:kms:" are different
- "drm:kms"also different - includes drm:kms2:
- "drm:kms:\t" also different - could be troublesome
- "drm:kms:*" does
both interfaces
Bad: arg-type/count handling (expecting 4 args) is ugly,
especially preceding the bitmap-init var-args.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/drm_print.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu
=_ "todo:
maybe avoid via dyndbg\012"
drivers/gpu/drm/drm_edid_load.c:178 [drm]edid_load =_ "todo: maybe avoid via
dyndbg\012"
At quick glance, edid won't qualify, drm_print might, drm_vblank is
strongest chance, maybe atomic-ioctl too.
Signed-off-by: Jim Cromie
---
-
race_var // these may be NULL, IFF !CONFIG_TRACE ??
then a bitmap:
[0] = { "category1" }, ...)
My BUILD_BUG-fu is insufficient to protect a naive macro.
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 19 ++-
lib/dynamic_debug.c | 4 ++--
2
lsites from getting stomped on by `echo 0 >
debug`. Other categories could differ, but we need some default.
Dyndbg requires that the prefix be in the compiled-in format string;
run-time prefixing evades callsite selection by category.
pr_debug("%s: ...", __func__, ...) //
tments), and has no users yet, so
it can't cause regressions.
Obviously, DRM is the anticipated user. I've fixed the patchwork CI
problems I have seen on v6, v7, and lkp-robot reports since. Since
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by default, it should have seen "on"
testin
dd-exec-queries accepts a separate module arg (so it can support
$module.dyndbg cmdline arg), add it to the vpr-info for more context.
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
add "bootparam" to format. no functional changes.
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 dfe1e6a857bc..da91ff507117 100644
--- a/lib/dynamic_debug.c
-command strings) would produce short writes, truncating
last command and confusing test results.
4 gets per-callsite "changed:" pr-infos, which are very noisy during
stress tests, and obscure v1-3 messages.
Update docs verbose example to 3 per its comment
Signed-off-by: Jim Cromie
---
`echo $cmd > control` can be finicky with respect to quoting (mostly
wrt * expansion), so lets not complicate things by adding our own in
debug messages. Quote as <%s> instead of '%s' or \"%s\"
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 16 ++
On qemu --smp 3 runs, remove-module can get called 3 times.
Instead, print once at end, if entry was found and removed.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index
when `echo $cmd > control` contains multiple queries, extra query
separators (;\n) can parse as empty statements. This is normal, and
pr-info on empty command is just noise. Also change varname.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 13 +++--
1 file changed, 7 inserti
atomic: fail:", with that undesirable embedded space;
obviously not ideal wrt clear and simple prefixes.
a fix: drm_dbg_atomic_("fail: ..."); // trailing _ for ad-hoc subcat
Summarizing:
- "drm:kms: " & "drm:kms:" are different
- "drm:kms"
This example uses dyndbg as a core/kernel param; it is a (fake) module
param. Using it as given gets an "Unknown command line parameters:"
warning. Fix the broken example.
Signed-off-by: Jim Cromie
---
Documentation/admin-guide/dynamic-debug-howto.rst | 6 ++
1 file changed, 2
no code changes, good for rc
Signed-off-by: Jim Cromie
---
include/drm/drm_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index b439ae1921b8..ebb22166ace1 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
d pr-debugs; in this example,
"drm:atomic:fail:".
RFC: maybe the prefix catenation should paste in the " " class-prefix
terminator explicitly. A pr_debug_() flavor could exclude the " ",
allowing ad-hoc sub-categorization by appending for example, "fail:"
t
t;),
_DD_cat_(7, "gvt:render:"),
_DD_cat_(8, "gvt:sched:"));
If CONFIG_DYNAMIC_DEBUG_CORE=y, then gvt/Makefile adds
-DDYNAMIC_DEBUG_MODULE to cflags, which CONFIG_DYNAMIC_DEBUG=n
(CORE-only) builds need. This is redone more comprehensively soon.
Signed-off-by: Ji
uveau
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/amd/amdgpu/Makefile | 2 +
.../gpu/drm/amd/display/dc/core/dc_debug.c| 43 ++-
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile
b/drivers/gpu/drm/amd/amdgpu/Makefil
ould
differ, but we need some default.
Dyndbg requires that the prefix be in the compiled-in format string;
run-time prefixing evades callsite selection by category.
pr_debug("%s: ...", __func__, ...) // not ideal
Unfortunately __func__ is not a macro, and cannot be catenated at
pr
=_ "todo:
maybe avoid via dyndbg\012"
drivers/gpu/drm/drm_edid_load.c:178 [drm]edid_load =_ "todo: maybe avoid via
dyndbg\012"
At quick glance, edid won't qualify, drm_print might, drm_vblank is
strongest chance, maybe atomic-ioctl too.
Signed-off-by: Jim Cromie
---
-
With DRM_USE_DYNAMIC_DEBUG, each callsite record requires 56 bytes.
We can combine 12 into one here and save ~620 bytes.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +--
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/drivers
break any syslog
conventions ?
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 293 --
1 file changed, 158 insertions(+), 135 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
index
On Wed, Sep 15, 2021 at 10:50 AM Patchwork
wrote:
>
> == Series Details ==
>
> Series: use DYNAMIC_DEBUG to implement DRM.debug (rev3)
> URL : https://patchwork.freedesktop.org/series/93914/
> State : failure
>
> == Summary ==
>
> Applying: dyndbg: add module to a vpr-info in dd-exec-queries
> A
hi drm folks,
Heres a small set of assorted patches which are IMO suitable for rcX;
one doc fix, 2 patches folding multiple DBGs together, and a format
string modification.
Jim Cromie (4):
drm: fix doc grammar error
amdgpu_ucode: reduce number of pr_debug calls
nouveau: fold multiple
no code changes, good for rc
Signed-off-by: Jim Cromie
---
include/drm/drm_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 0cd95953cdf5..4b29261c4537 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
break any syslog
conventions ?
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 293 --
1 file changed, 158 insertions(+), 135 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
index
ailing space is desired, in order to
exclude explicitly sub-categorized pr-debugs; in this example,
"drm:atomic:fail:".
Signed-off-by: Jim Cromie
---
---
drivers/gpu/drm/i915/gvt/debug.h | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drive
With DRM_USE_DYNAMIC_DEBUG, each callsite record requires 56 bytes.
We can combine 12 into one here and save ~620 bytes.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +--
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/drivers
On Wed, Sep 29, 2021 at 8:08 PM Joe Perches wrote:
>
> On Wed, 2021-09-29 at 19:44 -0600, Jim Cromie wrote:
> > There are blocks of DRM_DEBUG calls, consolidate their args into
> > single calls. With dynamic-debug in use, each callsite consumes 56
> > bytes of calls
Thanks for the feedback!
On Tue, Jul 20, 2021 at 9:29 AM Daniel Vetter wrote:
>
> On Wed, Jul 14, 2021 at 11:51:36AM -0600, Jim Cromie wrote:
> > drm's debug system uses distinct categories of debug messages, encoded
> > in an enum (DRM_UT_), which are mapp
On Wed, Jul 21, 2021 at 1:55 PM Sean Paul wrote:
>
> From: Sean Paul
>
> Use drm logging helpers to add support for the upcoming tracefs
> implementation.
>
> Signed-off-by: Sean Paul
> Link:
> https://patchwork.freedesktop.org/patch/msgid/20200608210505.48519-4-s...@poorly.run
> #v5
>
> Chang
On Tue, Jul 27, 2021 at 10:03 AM Sean Paul wrote:
>
> On Thu, Jul 22, 2021 at 11:20 AM Sean Paul wrote:
> >
>
> Reply-all fail. Adding everyone else back to my response.
>
> > On Tue, Jul 20, 2021 at 03:29:34PM +0200, Daniel Vetter wrote:
> > > On Wed, J
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 \
s/prink/printk/ - no functional changes
Signed-off-by: Jim Cromie
---
include/drm/drm_print.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 9b66be54dd16..15a089a87c22 100644
--- a/include/drm/drm_print.h
+++ b/include
lls __module_param_call_wdata(), which has accepts new data
param and inits .data with it. Re-define __module_param_call() using it.
Use of this new data member will be rare, it might be worth redoing
this as a separate/sub-type to keep the base case.
Signed-off-by: Jim Cromie
---
include/li
D: set_dyndbg() works to enable categories, but fails to disable
them. This is because the code relied on having an old copy of the
param (__gvt_debug) to detect +/- changes. Rewriting the loop is
probably easier than stashing the old state for change detection.
Signed-off-by: Jim Cromie
--
plicitly. A pr_debug_() flavor could exclude the " ",
allowing ad-hoc sub-categorization by appending for example, "fail:"
to "drm:atomic:".
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/i915/gvt/debug.h | 18 +-
1 file changed, 9 insertions(
{ "gvt: dpy: ", "display help" },
{ "gvt: el: ", "help" },
{ "gvt: irq: ", "help" },
{ "gvt: mm: ", "help" },
{ "gvt: mmio: ", "help" },
{ "gvt: r
e the class prefix, and to
read naturally in logs with plain #catenation.
Prefixes given in args to DYNDBG_BITMAP_DESC() determine the bit-query
map; so to insure the map is stable, new categories or 3rd level
categories must be added to the end. The prefixes may have trailing
spaces, depending upon
efine
bits to control those pr_debugs by their category.
Signed-off-by: Jim Cromie
---
.../gpu/drm/amd/display/dc/core/dc_debug.c| 42 ++-
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c
b/drivers/gpu/drm/amd/displ
e, and a wrapper on drm_trace_printf to bundle up the
args and comport with the prototype, which can evolve to suit this 1st
client.
it is on top of:
https://patchwork.freedesktop.org/series/92544/
(v4 on lkml, v2 in patchwork)
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 7
e, and a wrapper on drm_trace_printf to bundle up the
args and comport with the prototype, which can evolve to suit this 1st
client.
it is on top of:
https://patchwork.freedesktop.org/series/92544/
(v4 on lkml, v2 in patchwork)
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 7
On Mon, Aug 2, 2021 at 10:18 AM Emil Velikov wrote:
>
> Hi Jim,
>
> On Sat, 31 Jul 2021 at 22:42, Jim Cromie wrote:
>
> > Use of this new data member will be rare, it might be worth redoing
> > this as a separate/sub-type to keep the base case.
> &
On Mon, Aug 2, 2021 at 10:24 AM Emil Velikov wrote:
>
> Hi Jim,
>
> On Sat, 31 Jul 2021 at 22:42, Jim Cromie wrote:
>
> > +struct dyndbg_bitdesc {
> > + /* bitpos is inferred from index in containing array */
> > + char *prefix;
> > + cha
Its worth noting, this changes the dyndbg-state underneath settings
applied with `echo > parameters/debug`; the latter is qualitatively
writeonly, maybe a param_get should return "NA" "-1"
this merged cleanly, on top of
commit d65ef4634e5c795a6a4df1d198992c70e9692fb3 (drm
s/prink/printk/ - no functional changes
Signed-off-by: Jim Cromie
---
include/drm/drm_print.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 9b66be54dd16..15a089a87c22 100644
--- a/include/drm/drm_print.h
+++ b/include
ase.
---
v4+:
. const void* data -
Signed-off-by: Jim Cromie
---
include/linux/moduleparam.h | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index eed280fae433..878387e0b2d9 100644
--- a/include/linux/modulepara
ncludes (modifies)
subcategories, but then 2nd overrides it. So don't do that.
There is still plenty of bikeshedding to do.
---
v4+:
. rename to DEFINE_DYNAMIC_DEBUG_CATEGORIES from DEFINE_DYNDBG_BITMAP
. in query, replace hardcoded "i915" w kp->mod->name
. static inline
categorized pr-debugs; in this example,
"drm:atomic:fail:".
RFC: maybe the prefix catenation should paste in the " " class-prefix
terminator explicitly. A pr_debug_() flavor could exclude the " ",
allowing ad-hoc sub-categorization by appending for
ion construct.
if CONFIG_DRM_USE_DYNAMIC_DEBUG, then -DDYNAMIC_DEBUG_MODULE is added
cflags, by gvt/Makefile.
---
v4+:
. static decl of vector of bit->class descriptors - Emil.V
. relocate gvt-makefile chunk from elsewhere
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/i915/gvt/Makefile
IES to create a /sys debug_dc
parameter, modinfos, and to specify a map from bits -> categorized
pr_debugs to be controlled.
Signed-off-by: Jim Cromie
---
.../gpu/drm/amd/display/dc/core/dc_debug.c| 44 ++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/
face.
---
v4+:
. use DEFINE_DYNAMIC_DEBUG_CATEGORIES in drm_print.c
. s/DRM_DBG_CLASS_/DRM_DBG_CAT_/ - dont need another term
. default=y in KBuild entry - per @DanVet
. move some commit-log prose to dyndbg commit
. add-prototyes to (param_get/set)_dyndbg
. more wrinkles found by
. relocate rat
There are blocks of DRM_DEBUG calls, consolidate their args into
single calls. With dynamic-debug in use, each callsite consumes 56
bytes of ro callsite data, and this patch removes about 65 calls, so
it saves ~3.5kb.
no functional changes.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/amd
) needs if (+p), since +T also enables
. add prototypes for un/register_aux_print
. change iface names: s/aux_print/tracer/
. also s/trace_print/tracer/
. struct va_format *vaf - tighten further ?
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 32 -
lib/Kconfig.debug |
On Fri, Aug 13, 2021 at 9:44 AM Andy Shevchenko
wrote:
>
> On Fri, Aug 13, 2021 at 09:17:10AM -0600, Jim Cromie wrote:
> > Add a const void* data member to the struct, to allow attaching
> > private data that will be used soon by a setter method (via kp->data)
> >
in a configurable manner.
v6: cleans up per v5 feedback, and adds RFC stuff:
- test_dynamic_debug.ko: uses tracer facility added in v5:8/9
- prototype print-once & rate-limiting
Hopefully adding RFC stuff doesnt distract too much.
Jim Cromie (11):
moduleparam: add data member to
ase.
Signed-off-by: Jim Cromie
---
v6:
. const void* data -
. better macro names s/_cbd/_cb_data/, s/_wdata/_with_data/
. more const, no cast - Willy
---
include/linux/moduleparam.h | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/linux/moduleparam.h b/incl
stable map, new categories or 3rd level categories must
be added to the end.
Since bits are/will-stay applied 0-N, the later bits can countermand
the earlier ones, but its tricky - consider;
DD_CATs(... "drm:atomic:", "drm:atomic:fail:" ) // misleading
The 1st search
p" },
{ "gvt:mm: ", "help" },
{ "gvt:mmio: ", "help" },
{ "gvt:render: ", "help" },
{ "gvt:sched: " "help" });
The actual patch has a few details different, cmd_help() macro emits
the initia
categorized pr-debugs; in this example,
"drm:atomic:fail:".
RFC: maybe the prefix catenation should paste in the " " class-prefix
terminator explicitly. A pr_debug_() flavor could exclude the " ",
allowing ad-hoc sub-categorization by appending for
=_ "todo:
maybe avoid via dyndbg\012"
drivers/gpu/drm/drm_edid_load.c:178 [drm]edid_load =_ "todo: maybe avoid via
dyndbg\012"
At quick glance, edid won't qualify, drm_print might, drm_vblank is
strongest chance, maybe atomic-ioctl too.
Signed-off-by: Jim Cromie
---
With DRM_USE_DYNAMIC_DEBUG, each callsite record requires 56 bytes.
We can combine 12 into one here and save ~620 bytes.
Signed-off-by: Jim Cromie
---
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +--
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a
e aux_print callsites (or subsets of them)
to tailor the debug-stream for the purpose. Controlling flow is the
best work limiter.
Signed-off-by: Jim Cromie
---
v5: (this patch sent after (on top of) v4)
. fix "too many arguments to function", and name the args:
int (*aux_print)(co
IES to create a /sys debug_dc
parameter, modinfos, and to specify a map from bits -> categorized
pr_debugs to be controlled.
Signed-off-by: Jim Cromie
---
.../gpu/drm/amd/display/dc/core/dc_debug.c| 44 ++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/
break any syslog
conventions ?
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 293 --
1 file changed, 158 insertions(+), 135 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
index
on, but
it is predictable for a given function (except perhaps recursive, but
thats not done anyway).
Note also that any function can have a single group of prdebugs, plus
any number of prdbgs without 'g', either with or without 'r'. So
grouping should be flexible enough
ut we need some default.
Dyndbg requires that the prefix be in the compiled-in format string;
run-time prefixing evades callsite selection by category.
pr_debug("%s: ...", __func__, ...) // not ideal
With "lineno X" in a query, its possible to enable single callsi
On Mon, Aug 23, 2021 at 12:41 AM Andy Shevchenko
wrote:
>
> On Mon, Aug 23, 2021 at 1:21 AM Jim Cromie wrote:
> >
> > DEFINE_DYNAMIC_DEBUG_CATEGORIES(name, var, bitmap_desc, @bit_descs)
> > allows users to define a drm.debug style (bitmap) sysfs interface, and
> >
On Wed, Aug 25, 2021 at 11:13 AM Jason Baron wrote:
>
>
>
> On 8/22/21 6:19 PM, Jim Cromie wrote:
> > Add a const void* data member to the struct, to allow attaching
> > private data that will be used soon by a setter method (via kp->data)
> > to perform more ela
dule wmi
[43852.517497] dyndbg: 92 debug prints in module nouveau
There are a few multi-second delays there, just before dyndbg
initializes the large blocks of debug prints.
Jim Cromie (8):
dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks
dyndbg: remove spaces in pr_debug "gvt:
ot;drm:kms:*" doesn't work, no wildcard on format atm.
Order matters in DEFINE_DYNAMIC_DEBUG_CATEGORIES(... @bit_descs)
@bit_descs (array) position determines the bit mapping to the prefix,
so to keep a stable map, new categories or 3rd level categories must
be added to the end.
Since
d pr-debugs; in this example,
"drm:atomic:fail:".
RFC: maybe the prefix catenation should paste in the " " class-prefix
terminator explicitly. A pr_debug_() flavor could exclude the " ",
allowing ad-hoc sub-categorization by appending for example, "fail:"
to &
p" },
{ "gvt:mm: ", "help" },
{ "gvt:mmio: ", "help" },
{ "gvt:render: ", "help" },
{ "gvt:sched: " "help" });
The actual patch has a few details different, cmd_help() macro emits
the initi
IES to create a /sys debug_dc
parameter, modinfos, and to specify a map from bits -> categorized
pr_debugs to be controlled.
Signed-off-by: Jim Cromie
---
.../gpu/drm/amd/display/dc/core/dc_debug.c| 44 ++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/
prefix be in the compiled-in format string;
run-time prefixing evades callsite selection by category.
pr_debug("%s: ...", __func__, ...) // not ideal
With "lineno X" in a query, its possible to enable single callsites,
but it is tedious, and useless in a category conte
=_ "todo:
maybe avoid via dyndbg\012"
drivers/gpu/drm/drm_edid_load.c:178 [drm]edid_load =_ "todo: maybe avoid via
dyndbg\012"
At quick glance, edid won't qualify, drm_print might, drm_vblank is
strongest chance, maybe atomic-ioctl too.
Signed-off-by: Jim Cromie
---
inc
With DRM_USE_DYNAMIC_DEBUG, each callsite record requires 56 bytes.
We can combine 12 into one here and save ~620 bytes.
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +--
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/drivers
break any syslog
conventions ?
Signed-off-by: Jim Cromie
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 293 --
1 file changed, 158 insertions(+), 135 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
index
On Tue, Aug 31, 2021 at 5:38 PM Patchwork
wrote:
> *Patch Details*
> *Series:* use DYNAMIC_DEBUG to implement DRM.debug (rev2)
> *URL:* https://patchwork.freedesktop.org/series/93914/
> *State:* failure
> *Details:*
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20931/index.html CI
> Bug Lo
On Fri, Sep 3, 2021 at 5:07 AM Tvrtko Ursulin
wrote:
>
>
> On 31/08/2021 21:21, Jim Cromie wrote:
> > The gvt component of this driver has ~120 pr_debugs, in 9 categories
> > quite similar to those in DRM. Following the interface model of
> > drm.debug, add a par
On Fri, Sep 3, 2021 at 5:15 AM Tvrtko Ursulin
wrote:
>
>
> On 31/08/2021 21:21, Jim Cromie wrote:
> > drm's debug system writes 10 distinct categories of messages to syslog
> > using a small API[1]: drm_dbg*(10 names), DRM_DEV_DEBUG*(3 names),
> > DRM_DEBUG*(8
On Tue, Aug 31, 2021 at 2:21 PM Jim Cromie wrote:
>
> Duplicate drm_debug_enabled() code into both "basic" and "dyndbg"
> ifdef branches. Then add a pr_debug("todo: ...") into the "dyndbg"
> branch.
>
> Then convert the "dyndbg"
On Mon, Sep 6, 2021 at 6:26 AM Tvrtko Ursulin <
tvrtko.ursu...@linux.intel.com> wrote:
>
>
> On 03/09/2021 20:22, jim.cro...@gmail.com wrote:
> > On Fri, Sep 3, 2021 at 5:07 AM Tvrtko Ursulin
> > wrote:
> >>
> >>
> >> On 31/08/2021 21:21, Ji
> I'll try to extract the "executive summary" from this, you tell me if I
> got it right.
>
> So using or not using dynamic debug for DRM debug ends up being about
> shifting the cost between kernel binary size (data section grows by each
> pr_debug call site) and runtime conditionals?
Yes.
> Sin
n 03/09/2021 20:22, jim.cro...@gmail.com
> > <mailto:jim.cro...@gmail.com> wrote:
> > > > On Fri, Sep 3, 2021 at 5:07 AM Tvrtko Ursulin
> > > > > <mailto:tvrtko.ursu...@linux.intel.com>> wrote:
> > > >>
> > > >>
> &g
whitespace only, to diff-minimize a later commit.
no functional changes
---
include/drm/drm_print.h | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 9b66be54dd16..6419b4e7c5dc 100644
--- a/include/drm
s/prink/printk/ - no functional changes
---
include/drm/drm_print.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 6419b4e7c5dc..4559583bc88b 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -327,7 +3
stress.
this is on top of master @ v5.13-13688-gde5540965853
v1 is here:
https://lore.kernel.org/lkml/20201204035318.332419-1-jim.cro...@gmail.com/
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
The gvt component of this driver has ~120 pr_debugs, in 9 "classes".
Following the interface model of drm.debug, add a parameter to map
bits to these classes.
If CONFIG_DRM_USE_DYNAMIC_DEBUG=y (and CONFIG_DYNAMIC_DEBUG_CORE), add
-DDYNAMIC_DEBUG_MODULE into Makefile. TBD: maybe add a separate
CON
drm's debug system uses distinct categories of debug messages, encoded
in an enum (DRM_UT_), which are mapped to bits in drm.debug.
drm_debug_enabled() does a lot of unlikely bit-mask checks on
drm.debug; we can use dynamic debug instead, and get all that
static_key/jump_label goodness.
Dynamic de
On Sun, Jul 11, 2021 at 10:17 AM Joe Perches wrote:
>
> On Sat, 2021-07-10 at 23:49 -0600, Jim Cromie wrote:
> > whitespace only, to diff-minimize a later commit.
> > no functional changes
> []
> > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> []
dbg 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 somethi
s/prink/printk/ - no functional changes
Signed-off-by: Jim Cromie
---
include/drm/drm_print.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 9b66be54dd16..15a089a87c22 100644
--- a/include/drm/drm_print.h
+++ b/include
whitespace only, to minimize the diff of a later commit.
no functional changes
Signed-off-by: Jim Cromie
---
include/drm/drm_print.h | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 15a089a87c22
1 - 100 of 891 matches
Mail list logo