From: Eiichi Tsukata <devel@etsukata.com>
To: rostedt@goodmis.org, linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, peterz@infradead.org, mingo@redhat.com
Subject: Re: [PATCH] tracing: Fix user stack trace "??" output
Date: Thu, 18 Jul 2019 10:23:19 +0900 [thread overview]
Message-ID: <1789efd4-1108-64e8-a6aa-39ca5d5595dc@etsukata.com> (raw)
In-Reply-To: <20190630085438.25545-1-devel@etsukata.com>
Hello Steven
Would you review the patch?
On 2019/06/30 17:54, Eiichi Tsukata wrote:
> Commit c5c27a0a5838 ("x86/stacktrace: Remove the pointless ULONG_MAX
> marker") removes ULONG_MAX marker from user stack trace entries but
> trace_user_stack_print() still uses the marker and it outputs unnecessary
> "??".
>
> For example:
>
> less-1911 [001] d..2 34.758944: <user stack trace>
> => <00007f16f2295910>
> => ??
> => ??
> => ??
> => ??
> => ??
> => ??
> => ??
>
> The user stack trace code zeroes the storage before saving the stack, so if
> the trace is shorter than the maximum number of entries it can terminate
> the print loop if a zero entry is detected.
>
> Fixes: 4285f2fcef80 ("tracing: Remove the ULONG_MAX stack trace hackery")
> Signed-off-by: Eiichi Tsukata <devel@etsukata.com>
> ---
> kernel/trace/trace_output.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
> index ba751f993c3b..cab4a5398f1d 100644
> --- a/kernel/trace/trace_output.c
> +++ b/kernel/trace/trace_output.c
> @@ -1109,17 +1109,10 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter,
> for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
> unsigned long ip = field->caller[i];
>
> - if (ip == ULONG_MAX || trace_seq_has_overflowed(s))
> + if (!ip || trace_seq_has_overflowed(s))
> break;
>
> trace_seq_puts(s, " => ");
> -
> - if (!ip) {
> - trace_seq_puts(s, "??");
> - trace_seq_putc(s, '\n');
> - continue;
> - }
> -
> seq_print_user_ip(s, mm, ip, flags);
> trace_seq_putc(s, '\n');
> }
>
next prev parent reply other threads:[~2019-07-18 1:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-30 8:54 Eiichi Tsukata
2019-07-18 1:23 ` Eiichi Tsukata [this message]
2019-07-18 16:37 ` Steven Rostedt
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=1789efd4-1108-64e8-a6aa-39ca5d5595dc@etsukata.com \
--to=devel@etsukata.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®