[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfuBxxYDzL5jkJb6A=sk4qibw4KPrhOvatfBikVqRYx=6WAMA@mail.gmail.com>
Date: Sun, 10 Dec 2023 18:07:11 -0700
From: jim.cromie@...il.com
To: Łukasz Bartosik <lb@...ihalf.com>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
bleung@...gle.com, contact@...rsion.fr, daniel@...ll.ch,
dianders@...omium.org, groeck@...gle.com, jbaron@...mai.com,
john.ogness@...utronix.de, keescook@...omium.org, pmladek@...e.com,
ppaalanen@...il.com, rostedt@...dmis.org, seanpaul@...omium.org,
sergey.senozhatsky@...il.com, upstream@...ihalf.com,
vincent.whitchurch@...s.com, yanivt@...gle.com,
gregkh@...uxfoundation.org
Subject: Re: [re: PATCH v2 00/15 - 08/11] dyndbg: split multi-query strings
with %
On Fri, Dec 8, 2023 at 5:32 PM Łukasz Bartosik <lb@...ihalf.com> wrote:
>
> pt., 8 gru 2023 o 01:15 Jim Cromie <jim.cromie@...il.com> napisał(a):
> >
> > vng -v --user root -p 4 \
> > -a dynamic_debug.verbose=3 \
> > -a \*.dyndbg=class,DRM_UT_CORE,+pfmlt_%class,DRM_UT_KMS,+pfm%class,DRM_UT_ATOMIC,+pf
> >
> > ':' would be a more natural multi-cmd separator, but is reserved
> > for +T:<trace_buf> to designate separate tracebuf instances.
> >
> > If '%' is distasteful, the backup plan is ",_,", since that would
> > never appear in a useful <format "$foo"> cmd.
> >
>
> What if we use a different character for passing trace instance name
> to the T flag, for example "-", +T-trace_buf
> and then use ":" instead of "%" as a separator ?
>
*** entering the Bikeshed ***
One of the nice constraints of the flags-val is that it always starts with +/-/=
the 1st char of flags is the only place they would appear unquoted.
using '-' again dilutes that specialness.
the whole +T:named_stream. syntax has a mnemonic value,
it seems to explain itself (but I'm weird)
WRT to ':' vs '%' as multi-cmd separator, what do we lose in each trade ?
ultimately it invalidates a query containing those chars. IOW
# impossible query when cmd-splitting on %
echo format "search for %s because %d" +p > /proc/dynamic_debug/control
# impossible when splitting on :
echo format "my_label: " +p > /proc/dynamic_debug/control
NB: only format would see an arg with either : or %, since theyre
*never* in filenames, functions or module (or class) names.
Of the 2, % is even more unlikely to wind up in a name,
colon already appears in host:path and urls,
and in some class-name systems
(tho not planned for "class" keyword)
the ability to search for colon-terminated labels seems more useful
than searching for a particular set of printf format specifiers,
which btw cant have colons between them.
Powered by blists - more mailing lists