From: Breno Leitao <leitao@debian.org>
To: Carlos Llamas <cmllamas@google.com>
Cc: akpm@linux-foundation.org,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Stephen Boyd <swboyd@chromium.org>,
Elliot Berman <quic_eberman@quicinc.com>,
Xiong Nandi <xndchn@gmail.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
Bjorn Andersson <quic_bjorande@quicinc.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scripts/decode_stacktrace.sh: remove trailing space
Date: Tue, 8 Oct 2024 12:18:29 +0100 [thread overview]
Message-ID: <ZwUVBW72bZQNaWqt@gmail.com> (raw)
In-Reply-To: <ZwQ2l8zo6BZQnnkB@google.com>
Hello Carlos,
On Mon, Oct 07, 2024 at 07:29:27PM +0000, Carlos Llamas wrote:
> On Thu, Oct 03, 2024 at 03:30:05AM -0700, Breno Leitao wrote:
> > decode_stacktrace.sh adds a trailing space at the end of the decoded
> > stack if the module is not set (in most of the lines), which makes the
> > some lines of the stack having trailing space and some others not.
> >
> > Do not add an extra space at the end of the line if module is not set,
> > adding consistency in output formatting.
> >
> > Signed-off-by: Breno Leitao <leitao@debian.org>
> > ---
> > scripts/decode_stacktrace.sh | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
> > index 826836d264c6..4b3502a007fd 100755
> > --- a/scripts/decode_stacktrace.sh
> > +++ b/scripts/decode_stacktrace.sh
> > @@ -311,7 +311,12 @@ handle_line() {
> > parse_symbol # modifies $symbol
> >
> > # Add up the line number to the symbol
> > - echo "${words[@]}" "$symbol $module"
> > + if [ -z ${module} ]
> > + then
>
> nit: it seems the convention would have been something like:
> if [[ -z $module ]]; then
That is how I wrote originally, in fact, but, the rest of the code is
using the other way. Example:
if [ -z $release ] ; then
release=$(gdb -ex 'print init_uts_ns.name.release' -ex 'quit' -quiet -batch "$vmlinux" 2>/dev/null | sed -n 's/\$1 = "\(.*\)".*/\1/p')
fi
if [ -n "${release}" ] ; then
release_dirs="/usr/lib/debug/lib/modules/$release /lib/modules/$release"
fi
Thanks for the review,
Breno
next prev parent reply other threads:[~2024-10-08 11:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 10:30 [PATCH] scripts/decode_stacktrace.sh: remove trailing space Breno Leitao
2024-10-04 20:30 ` Stephen Boyd
2024-10-07 19:29 ` Carlos Llamas
2024-10-08 11:18 ` Breno Leitao [this message]
2024-10-08 18:01 ` Carlos Llamas
2024-10-10 21:14 ` Elliot Berman
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=ZwUVBW72bZQNaWqt@gmail.com \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=cmllamas@google.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=quic_bjorande@quicinc.com \
--cc=quic_eberman@quicinc.com \
--cc=swboyd@chromium.org \
--cc=xndchn@gmail.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 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.