From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Tatsuya S <tatsuya.s2862@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ftrace: Hide a extra entry in stack trace
Date: Wed, 2 Oct 2024 23:02:43 +0900 [thread overview]
Message-ID: <20241002230243.db4bd69dfa815f9af06007a6@kernel.org> (raw)
In-Reply-To: <b0ec6a2d-8734-46f3-8cfb-f2bbe17dbf59@gmail.com>
On Wed, 2 Oct 2024 15:43:35 +0900
Tatsuya S <tatsuya.s2862@gmail.com> wrote:
>
>
> On 10/1/24 10:47 PM, Steven Rostedt wrote:
> > On Tue, 1 Oct 2024 22:27:03 +0900
> > ts <tatsuya.s2862@gmail.com> wrote:
> >
> >>> ...
> >>> sh-140 [001] ...1. 18.352601: myevent: (vfs_write+0x4/0x560)
> >>> sh-140 [001] ...1. 18.352602: <stack trace>
> >>> => ksys_write
> >>> => do_syscall_64
> >>> => entry_SYSCALL_64_after_hwframe
> >>> sh-140 [001] ...1. 18.352602: vfs_write <-ksys_write
> >>> sh-140 [001] ...1. 18.352604: <stack trace>
> >>> => ftrace_regs_call
> >>> => vfs_write
> >>> => ksys_write
> >>> => do_syscall_64
> >>> => entry_SYSCALL_64_after_hwframe
> >>> ------
> >>> As you can see, myevent skips "vfs_write".
> >>> (and function tracer still have ftrace_regs_call() )
> >>
> >> Thanks for the other tests. This issue may be function_trace_call()
> >> specific problem.
> >>
> >> So I will change the place to increment skip number.
> >
> > My fear is that we are going to just break it elsewhere. The problem with
> > the "skip" is that there's so many configurations when we get here, we may
> > not really know what to skip. If the compiler inlines something, then we
> > may skip something we do not want to.
> >
> > I rather have extra information than not enough.
> >
> > -- Steve
>
> It may not be clean and be bit redundant, but I think it would be more
> maintainable to treat
>
> "skip(and skipped functions)" separately only at the top(parent) of
> functions that display stack trace.
I think you'd better make a set of test programs which gets the stacktrace
with several different conditions (combinations of tracers/probes/kconfgis)
at first. Then we can make sure it does not break anything.
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2024-10-02 14:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 6:13 [PATCH v2] ftrace: Hide a extra entry in stack trace Tatsuya S
2024-09-29 23:51 ` Masami Hiramatsu
2024-10-01 13:27 ` ts
2024-10-01 13:33 ` ts
2024-10-01 13:47 ` Steven Rostedt
2024-10-02 6:43 ` Tatsuya S
2024-10-02 14:02 ` Masami Hiramatsu [this message]
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=20241002230243.db4bd69dfa815f9af06007a6@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
--cc=tatsuya.s2862@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).