Implement as new function wrapping ddebug_exec_queries(now static
again), which copies the query-string, preserving ddebug_exec_queries'
in-place parsing, while allowing users to pass "const strings".
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 20 +++
- fix new export name, with a wrapper for more utility.
- parse format="foo bar" like "format" "foo bar"
- pretty-print
Jim Cromie (3):
dyndbg: give %3u width in pr-format, cosmetic only
dyndbg: refine export, rename to dynamic_debug_exec_queries()
dynd
Specify the print-width so log entries line up nicely.
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 1d012e597cc3..01b7d0210412 100644
--- a/lib
tokenizer by terminating an unquoted token on
the '=', avoiding that problem. And since ddebug-parse-query will
never see a combined 'keyword=value', revert those parts of the
previous commit.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 33 ++---
1 file changed, 14
Specify the print-width so log entries line up nicely.
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 1d012e597cc3..01b7d0210412 100644
--- a/lib
2 items for v5.9-rc1
fix sparse complaint about exported ddebug_exec_queries
fixed width format %3u
Jim Cromie (2):
dyndbg: add decl for exported ddebug_exec_queries()
dyndbg: give %3u width in pr-format, cosmetic only
include/linux/dynamic_debug.h | 3 +++
lib/dynamic_debug.c
59cf47e7df31 dyndbg: export ddebug_exec_queries
elicited a sparse complaint. Add declaration to header file.
I skipped the kerneldoc for now, unsure where it should go.
Ive seen it in .c files, Im leaning that way.
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 3 +++
1 file
)
> [ 29.713523] Run /sbin/init as init process
> [ 29.714612] with arguments:
> [ 29.715484] /sbin/init
> [ 29.716328] with environment:
> [ 29.717235] HOME=/
> [ 29.717983] TERM=linux
> [ 29.718801] user=lkp
> [ 29.719587]
> job=/lkp/jobs/scheduled/vm
On Sat, Aug 8, 2020 at 11:06 PM Randy Dunlap wrote:
>
> On 8/7/20 1:09 PM, Jim Cromie wrote:
> > dyndbg will next need zs_malloc and friends, so add config reqs now,
> > to avoid touching make-deps late in a patch-set.
> >
> > I used select in order not to hide dy
together nicely until the
"cache" commit, when it blows up starting init (or right after freeing
unused kernel image, which Im hoping to do...).
last commit log has the BUG trace from a LOCKDEP build, which reports
stuff I dont quite undertand, except that it looks bad.
Jim Cromie (7)
ction. I suspect keep may go as a part of
effecting the section reclaim.
Signed-off-by: Jim Cromie
---
include/asm-generic/vmlinux.lds.h | 4 +++
include/linux/dynamic_debug.h | 35 +++--
lib/dynamic_debug.c | 52 +--
3 files changed, 58 ins
this table dramatically.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 01b7d0210412..691e79826fc2 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
dyndbg will next need zs_malloc and friends, so add config reqs now,
to avoid touching make-deps late in a patch-set.
I used select in order not to hide dyndbg inadvertently.
I want to say recommends, since it could be an optional feature.
Whats the best way ?
Signed-off-by: Jim Cromie
---
lib
he locking in ddebug_add_module().
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index fdf52a26a504..701d3d1fb7e7 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -1182,
zram/etc
- zram compression
- eventually swap it out entirely
- map in the enabled callsites only
Signed-off-by: Jim Cromie
---
include/linux/dynamic_debug.h | 1 +
lib/dynamic_debug.c | 156 +++---
2 files changed, 145 insertions(+), 12 deletions(-)
Specify the print-width so log entries line up nicely.
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 1d012e597cc3..01b7d0210412 100644
--- a/lib
add ddebug_zpool_remove() to undo ddebug_zpool_add(), and call it from
ddebug_remove_module().
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 049299027fb3..102f47b2a439
in ddebug_zpool_put() dont zs_unmap the callsite, if it is enabled for
printing. This will eliminate possibly repeated un-maps then re-maps
of enabled and invoked pr-debug callsites, and will promptly retire
all other uses.
But this causes kernel to BUG
[1.364303] BUG: sleeping function
that protection.
This commit adds locking to ddebug_zpool_init(), around the loop of
ddebug_zpool_add(), to match the locking in ddebug_add_module().
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib
a struct to
a member in that struct, and hoist the member deref up to the caller.
This makes the function reusable (soon) where flags are unpacked.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/lib
Current code expects "keyword" "arg" as 2 words, space separated.
Change to also accept "keyword=arg" form as well, and drop !(nwords%2)
requirement. Then in rest of function, use new keyword, arg variables
instead of word[i], word[i+1]
Signed-off-by: Jim Cromie
reduce word count via gcc ?: extension, no actual code change.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index e879af4e66e0..6d0159075308 100644
--- a/lib
this pr_err attempts to print the string after the OP, but the string
has been parsed and chopped up, so looks empty.
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
Make the code-block reusable to later handle "file foo.c:101-200" etc.
This is a 99% code move, with reindent, function wrap, +pr_debug.
no functional changes.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 63 ++---
1 file changed, 36
bug_change vs "module=* +p".
ISTM this proposed export presents no locking problems.
TLDR;
It would be interesting to see how drm.dyndbg=$QUERY and
drm.debug=$HEXY would interact; it might be order dependent, as
if given as modprobe args or in /etc/modprobe.d/
Signed-off-by: Jim C
For log-message output, reduce column space consumed by current
pr_fmt by dropping __func__ and shortening "dynamic_debug" to
"dyndbg". This improves readability on narrow consoles, and better
matches other kernel boot info messages.
Signed-off-by: Jim Cromie
---
lib/dynam
cit wildcards.
This makes no attempt at wider regex features, just the one we need.
TLDR: Using the anchor also means the []s are less helpful for
disamiguating the prefix from a random in-message occurrence, allowing
shorter prefixes.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 13
.
Heres my overhead, on a virtme-run VM on a fedora-31 laptop:
dynamic_debug:dynamic_debug_init: 260 modules, 2479 entries \
and 10400 bytes in ddebug tables, 138824 bytes in __dyndbg section
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 8 ++--
1 file changed, 2 insertions
er, less stack overhead
no functional changes
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 45 -
1 file changed, 24 insertions(+), 21 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index fad6c34c930d..c983049e986d 100644
-
ddebug_exec_query declares an auto var, and passes it to
ddebug_parse_query, which memsets it before using it. Drop that
memset, instead initialize the variable in the caller; let the
compiler decide how to do it.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 3 +--
1 file changed, 1
emove)_module() also print 1 line per action on a module,
not needed by typical modprobe user.
This leaves verbose=1 better focussed on the >control parsing process.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
commit 4bad78c55002 ("lib/dynamic_debug.c: use seq_open_private() instead of
seq_open()")'
The commit was one of a tree-wide set which replaced open-coded
boilerplate with a single tail-call. It therefore obsoleted the
comment about that boilerplate, clean that up now.
Signed-o
# wildcards still work
path/to/file.c:*_foo # lead wildcard too
1st 2 examples are treated as line-ranges, 3-5 are treated as func's
Doc these changes, and sprinkle in a few extra wild-card examples and
trailing # explanation texts.
Signed-off-by: Jim Cromie
---
.../admin-guide/
loadable modules are the last in on this list, and are the only
modules that could be removed. ddebug_remove_module() searches from
head, but ddebug_add_module() uses list_add_tail(). Change it to
list_add() for a micro-optimization.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 2 +-
1
dyndbg populates its callsite info into __verbose section, change that
to a more specific and descriptive name, __dyndbg.
Also, per checkpatch:
simplify __attribute(..) to __section(__dyndbg) declaration.
and 1 spelling fix, decriptor
Signed-off-by: Jim Cromie
---
include/asm-generic
th,
and it safely does nothing otherwize.
So instead, quietly deprecate "file /full/path" query form, by
removing all /full/paths examples in the docs. I skipped adding a
back-compat note.
Signed-off-by: Jim Cromie
---
.../admin-guide/dynamic-debug-howto.rst | 19 +---
since cf964976484 in 2012, initialization is done with early_initcall,
update the Docs, which still say arch_initcall.
Signed-off-by: Jim Cromie
---
Documentation/admin-guide/dynamic-debug-howto.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin
han2 could be wired to a
callback which invokes ddebug_exec_queries to toggle arbitary groups
of pr_debug callsites.
Useful callsite groups would exploit existing message-prefix
classifcation schemes:
"format=^[IF_TRACE]: +p; format=^[SURFACE]: +p" >control
Jim Cromie (18):
dynd
> > @@ -321,6 +321,8 @@ static int parse_linerange(struct ddebug_query *query,
> > const char *first)
> > } else {
> > query->last_lineno = query->first_lineno;
> > }
> > + vpr_info("parsed line %d-%d\n", query->first_lineno,
> > + query->last_lineno);
>
ding clutter or or too much info.
Now a reader can know which module's info they're looking at, or which
2 modules they are comparing.
--
v2 has:
better commit message
s/:%s/%s:/
s/final/Final/
Signed-off-by: Jim Cromie
---
kernel/module.c | 14 +++---
1 file changed, 7 insertions(+), 7 delet
On Tue, Jun 30, 2020 at 3:37 AM Jessica Yu wrote:
>
> +++ Jim Cromie [11/06/20 08:20 -0600]:
> >when booted with arg: module.dyndbg=+p
> >dmesg gets volumes of info about loaded modules.
> >This adds module & symbol names, and sizes where pertinent.
> >Now
.
Heres my overhead, on a virtme-run VM on a fedora-31 laptop:
dynamic_debug:dynamic_debug_init: 260 modules, 2479 entries \
and 10400 bytes in ddebug tables, 138824 bytes in __dyndbg section
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 8 ++--
1 file changed, 2 insertions
loadable modules are the last in on this list, and are the only
modules that could be removed. ddebug_remove_module() searches from
head, but ddebug_add_module() uses list_add_tail(). Change it to
list_add() for a micro-optimization.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 2 +-
1
reduce word count via gcc ?: extension, no actual code change.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index e879af4e66e0..6d0159075308 100644
--- a/lib
this pr_err attempts to print the string after the OP, but the string
has been parsed and chopped up, so looks empty.
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
since cf964976484 in 2012, initialization is done with early_initcall,
update the Docs, which still say arch_initcall.
Signed-off-by: Jim Cromie
---
Documentation/admin-guide/dynamic-debug-howto.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin
emove)_module() also print 1 line per action on a module,
not needed by typical modprobe user.
This leaves verbose=1 better focussed on the >control parsing process.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
commit 4bad78c55002 ("lib/dynamic_debug.c: use seq_open_private() instead of
seq_open()")'
The commit was one of a tree-wide set which replaced open-coded
boilerplate with a single tail-call. It therefore obsoleted the
comment about that boilerplate, clean that up now.
Signed-o
Current code expects "keyword" "arg" as 2 space separated words.
Change to also accept "keyword=arg" form as well, and drop !(nwords%2)
requirement. Then in rest of function, use new keyword, arg variables
instead of word[i], word[i+1]
Signed-off-by: Jim Cromie
a struct to
a member in that struct, and hoist the member deref up to the caller.
This makes the function reusable (soon) where flags are unpacked.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/lib
er, less stack overhead
no functional changes
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 45 -
1 file changed, 24 insertions(+), 21 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index d737c733967a..c0bc78d67b36 100644
-
ason to prefer either of forms 1 or 2. Its
case-by-case, judging brevity, clarity, and query specificity and
robustness.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
in
ddebug_exec_query declares an auto var, and passes it to
ddebug_parse_query, which memsets it before using it. Drop that
memset, instead initialize the variable in the caller; let the
compiler decide how to do it.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 3 +--
1 file changed, 1
://lore.kernel.org/lkml/20200613155738.2249399-1-jim.cro...@gmail.com/
v1: https://lore.kernel.org/lkml/20200605162645.289174-1-jim.cro...@gmail.com/
Jim Cromie (17):
Patchset starts with 11 cleanups;
- change section name from vague "__verbose" to "__dyndbg"
- cleaner docs, d
# wildcards still work
path/to/file.c:*_foo # lead wildcard too
1st 2 examples are treated as line-ranges, 3,4 are treated as func's
Doc these changes, and sprinkle in a few extra wild-card examples and
trailing # explanation texts.
Signed-off-by: Jim Cromie
---
.../admin-guide/
submitted via export will have module specified, which dramatically
cuts matching work done by ddebug_change vs "module=* +p".
ISTM this proposed export presents no locking problems.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a
dyndbg populates its callsite info into __verbose section, change that
to a more specific and descriptive name, __dyndbg.
Also, per checkpatch:
simplify __attribute(..) to __section(__dyndbg) declaration.
and 1 spelling fix, decriptor
Signed-off-by: Jim Cromie
---
include/asm-generic
Make the code-block reusable to later handle "file foo.c:101-200" etc.
This is a 99% code move, with reindent, function wrap & call, etc.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 61 +
1 file changed, 34 insertions(+), 27 dele
th,
and it safely does nothing otherwize.
So instead, quietly deprecate "file /full/path" query form, by
removing all /full/paths examples in the docs. I skipped adding a
back-compat note.
Signed-off-by: Jim Cromie
---
.../admin-guide/dynamic-debug-howto.rst | 19 +---
On Thu, Jun 18, 2020 at 4:34 PM Stanimir Varbanov
wrote:
>
> Hi Jason, Jim,
>
> > I would be curious to see what Stanimir thinks of this proposal
> > and whether it would work for his venus driver, which is what
> > prompted this module group discussion.
>
> Hmm, we spin in a circle :)
>
>
oops. got 3 copies of 14/21, this is the good one. with module=foo
AND file=bar
On Wed, Jun 17, 2020 at 10:26 AM Jim Cromie wrote:
>
> Current code expects "keyword" "arg" as 2 space separated words.
> Change to also accept "keyword=arg" form as w
On Thu, Jun 18, 2020 at 1:40 PM Jason Baron wrote:
>
>
>
> On 6/18/20 3:11 PM, jim.cro...@gmail.com wrote:
> > On Thu, Jun 18, 2020 at 12:17 PM Jason Baron wrote:
> >>
> >
> >> The grouping stuff is already being used by lots of modules so
> >> that seems useful.
> >
> > I now dont see the
On Thu, Jun 18, 2020 at 12:17 PM Jason Baron wrote:
>
>
>
> On 6/18/20 1:40 PM, Petr Mladek wrote:
> > On Thu 2020-06-18 18:19:12, Petr Mladek wrote:
> >> On Wed 2020-06-17 10:25:35, Jim Cromie wrote:
> >>> 1. Add a user-flag [u] which works like the
On Thu, Jun 18, 2020 at 10:19 AM Petr Mladek wrote:
>
> On Wed 2020-06-17 10:25:35, Jim Cromie wrote:
OK.
Please tell me how this chunk of prose fails to explain a use case for
the u-flag
we can differ on how useful it looks.
if u-flag is useful, then filtering on flags is also needed,
On Thu, Jun 18, 2020 at 6:44 AM Petr Mladek wrote:
>
> On Wed 2020-06-17 10:25:34, Jim Cromie wrote:
> > Change ddebug_parse_flags to accept optional filterflags before the
> > required operator [-+=]. Read the flags into the filter_flags
> > parameter added in the prev
On Wed, Jun 17, 2020 at 4:13 PM Joe Perches wrote:
>
> On Wed, 2020-06-17 at 10:25 -0600, Jim Cromie wrote:
> > 1. Add a user-flag [u] which works like the [pfmlt] flags, but has no
> > effect on callsite behavior; it allows incremental marking of
> > arbitrary sets of c
t+p; lt+p;' >control
You just can't prohibit true flags.
Signed-off-by: Jim Cromie
---
.../admin-guide/dynamic-debug-howto.rst | 18
lib/dynamic_debug.c | 29 ++-
2 files changed, 28 insertions(+), 19 deletions(-)
diff
te
subgroups of callsites, then enable those groups by filtering on just
their flagstates, or you could add further constraints on callsite
selection.
Signed-off-by: Jim Cromie
---
.../admin-guide/dynamic-debug-howto.rst | 31 ---
include/linux/dynamic_debug.h
# wildcards still work
path/to/file.c:*_foo # lead wildcard too
1st 2 examples are treated as line-ranges, 3,4 are treated as func's
Doc these changes, and sprinkle in a few extra wild-card examples and
trailing # explanation texts.
Signed-off-by: Jim Cromie
---
.../admin-guide/
a struct to
a member in that struct, and hoist the member deref up to the caller.
This makes the function reusable (soon) where flags are unpacked.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/lib
$qtrms f-ft > control # for a callsite subset, if f-bit is true,
clear 2 bits, preserve others
Signed-off-by: Jim Cromie
---
Documentation/admin-guide/dynamic-debug-howto.rst | 10 ++
lib/dynamic_debug.c | 6 --
2 files changed, 10 insertions(+),
s
each. Any arbitrary subset is.
drm.dyndbg='file drm_gem_* +p' # gem debug
drm.dyndbg='file *_gem_* +p' # *gem debug
With this proposed export, drm authors could exec these examples, most
likely in the callback that handles updates to the drm.debug variable.
Signed-off-by: Jim Cro
Current code expects "keyword" "arg" as 2 space separated words.
Change to also accept "keyword=arg" form as well, and drop !(nwords%2)
requirement.
Then in rest of function, use new keyword, arg variables instead of
word[i], word[i+1]
Signed-off-by: Jim Cromie
since cf964976484 in 2012, initialization is done with early_initcall,
update the Docs, which still say arch_initcall.
Signed-off-by: Jim Cromie
---
Documentation/admin-guide/dynamic-debug-howto.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin
emove)_module() also print 1 line per action on a module,
not needed by typical modprobe user.
This leaves verbose=1 better focussed on the >control parsing process.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
Make the code-block reusable to later handle "file foo.c:101-200" etc.
This is a 99% code move, with reindent, function wrap & call, etc.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 61 +
1 file changed, 34 insertions(+), 27 dele
Move flag-char reading and validating code to a separate function.
This will allow later reuse to read 2 sets of flags:
1- flags to set or clear (after the [=-+] Operator)
2- flags to require or prohibit before changing a callsite's flagstate
Signed-off-by: Jim Cromie
---
lib
Current code expects "keyword" "arg" as 2 space separated words.
Change to also accept "keyword=arg" form as well, and drop !(nwords%2)
requirement.
Then in rest of function, use new keyword, arg variables instead of
word[i], word[i+1]
Signed-off-by: Jim Cromie
reduce word count via gcc ?: extension, no actual code change.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index e879af4e66e0..6d0159075308 100644
--- a/lib
.
Heres my overhead, on a virtme-run VM on a fedora-31 laptop:
dynamic_debug:dynamic_debug_init: 260 modules, 2479 entries \
and 10400 bytes in ddebug tables, 138824 bytes in __dyndbg section
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 8 ++--
1 file changed, 2 insertions
ddebug_exec_query declares an auto var, and passes it to
ddebug_parse_query, which memsets it before using it. Drop that
memset, instead initialize the variable in the caller; let the
compiler decide how to do it.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 3 +--
1 file changed, 1
loadable modules are the last in on this list, and are the only
modules that could be removed. ddebug_remove_module() searches from
head, but ddebug_add_module() uses list_add_tail(). Change it to
list_add() for a micro-optimization.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 2 +-
1
doesn't alter any of its arguments, including its 2
new ones; mods, filter. Say so by adding const modifier to them.
Signed-off-by: Jim Cromie
---
lib/dynamic_debug.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
ings and returns
- ddebug_change - test all callsites against query,
modify passing sites.
benefits:
- bit-banging always needs flags & mask, best together.
- simpler function signatures
- 1 less parameter, less stack overhead
Signed-off-by: Jim Cromie
---
lib/dynamic
Current code expects "keyword" "arg" as 2 space separated words.
Change to also accept "keyword=arg" form as well, and drop !(nwords%2)
requirement.
Then in rest of function, use new keyword,arg variables instead of
word[i],word[i+1]
Signed-off-by: Jim Cromie
this pr_err attempts to print the string after the OP, but the string
has been parsed and chopped up, so looks empty.
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
dyndbg populates its callsite info into __verbose section, change that
to a more specific and descriptive name, __dyndbg.
Also, per checkpatch:
simplify __attribute(..) to __section(__dyndbg) declaration.
and 1 spelling fix, decriptor
Signed-off-by: Jim Cromie
---
include/asm-generic
commit 4bad78c55002 ("lib/dynamic_debug.c: use seq_open_private() instead of
seq_open()")'
The commit was one of a tree-wide set which replaced open-coded
boilerplate with a single tail-call. It therefore obsoleted the
comment about that boilerplate, clean that up now.
Signed-o
e-by-cleanups up
front, which also decluttered these controversial patches; I think
theres a cleanup value to the early rework patches, even if
filterflags doesnt make it in.
Ive reworked all the flag-features commit messages to improve
the usefulness argument, hopefully well enough now.
Jim Cromie (21
th,
and it safely does nothing otherwize.
So instead, quietly deprecate "file /full/path" query form, by
removing all /full/paths examples in the docs. I skipped adding a
back-compat note.
Signed-off-by: Jim Cromie
---
.../admin-guide/dynamic-debug-howto.rst | 19 +---
hi Petr
> You made to do some research and I was wrong. For example, getopt()
> operates with options and their arguments. So, 'keyword' and 'arg' names
> look good after all.
>
> Well, I still think that only one syntax should be supported. And it
> is better to distinguish keywords and
On Wed, Jun 17, 2020 at 3:52 AM Petr Mladek wrote:
>
> On Wed 2020-06-17 10:31:54, Daniel Thompson wrote:
> > On Tue, Jun 16, 2020 at 02:05:27PM -0700, Joe Perches wrote:
> > > On Tue, 2020-06-16 at 15:45 +0200, Petr Mladek wrote:
> > > > On Sat 2020
> Or that meaning could be handled by merely issuing the fill-in activations.
> In the module that wants debug levels
>
> echo module foo mflags 4 >control
> auto generates same query 3 more times, with mflags 3 flags 2 mflags:1
>
let me also note that just because a module might do the
hi Petr,
On Tue, Jun 16, 2020 at 7:45 AM Petr Mladek wrote:
>
> On Sat 2020-06-13 09:57:34, Jim Cromie wrote:
> > There are *lots* of ad-hoc debug printing solutions in kernel,
> > this is a 1st attempt at providing a common mechanism for many of them.
>
> I agree
On Tue, Jun 16, 2020 at 5:57 AM Petr Mladek wrote:
>
> On Sat 2020-06-13 09:57:33, Jim Cromie wrote:
> > Current code expects "keyword" "arg" as 2 space separated words.
> > Change to also accept "keyword:arg" and "keyword=arg
On Mon, Jun 15, 2020 at 9:14 AM Petr Mladek wrote:
>
> On Sat 2020-06-13 09:57:27, Jim Cromie wrote:
> > combine flags & mask into a struct, and replace those 2 parameters in
> > 3 functions: ddebug_change, ddebug_parse_flags, ddebug_read_flags,
> > altering th
On Mon, Jun 15, 2020 at 7:37 AM Petr Mladek wrote:
>
> On Sat 2020-06-13 09:57:24, Jim Cromie wrote:
> > make the code-block reusable to later handle "file foo.c:101-200" etc.
>
> > This should be a 90%+ code-move, with minimal adaptations; reindent,
> > and
On Sun, Jun 14, 2020 at 12:05 AM Greg KH wrote:
>
> On Sat, Jun 13, 2020 at 09:57:37AM -0600, Jim Cromie wrote:
> > put pr_debug()s into most functions, to easily see code operate when
> > module is loaded and used.
> >
> > #> dmesg -w &
> > #> m
On Mon, Jun 15, 2020 at 7:20 AM Petr Mladek wrote:
>
> On Sat 2020-06-13 09:57:21, Jim Cromie wrote:
> In all patches is missing:
>
> Signed-off-by: Jim Cromie
right, I missed the -s invoking format-patch, v3 will have them
>
> > ---
>
On Mon, Jun 15, 2020 at 7:28 AM Petr Mladek wrote:
>
> On Sat 2020-06-13 09:57:23, Jim Cromie wrote:
> From my POV this makes the code less readable. Open coding is much
> more clear than an ambiguous macro name.
>
> Best Regards,
> Petr
Im going with Joes approach,
101 - 200 of 319 matches
Mail list logo