From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
Florent Revest <revest@chromium.org>,
Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will@kernel.org>
Subject: Re: [PATCH v3 09/10] tracing/probes: Add fprobe events for tracing function entry and exit.
Date: Sat, 1 Apr 2023 22:46:09 +0900 [thread overview]
Message-ID: <20230401224609.bebb256be8e6da55f0358ea9@kernel.org> (raw)
In-Reply-To: <20230329081454.05133571@rorschach.local.home>
On Wed, 29 Mar 2023 08:14:54 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 2 Feb 2023 00:57:13 +0900
> "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
>
> > From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> >
> > Add fprobe events for tracing function entry and exit instead of kprobe
> > events. With this change, we can continue to trace function entry/exit
> > even if the CONFIG_KPROBES_ON_FTRACE is not available. Since
> > CONFIG_KPROBES_ON_FTRACE requires the CONFIG_DYNAMIC_FTRACE_WITH_REGS,
> > it is not available if the architecture only supports
> > CONFIG_DYNAMIC_FTRACE_WITH_ARGS. And that means kprobe events can not
> > probe function entry/exit effectively on such architecture.
> > But this can be solved if the dynamic events supports fprobe events.
> >
> > The fprobe event is a new dynamic events which is only for the function
> > (symbol) entry and exit. This event accepts non register fetch arguments
> > so that user can trace the function arguments and return values.
> >
>
> Hi Masami,
>
> After applying this patch I get a bunch of these:
>
> /work/git/linux-trace.git/kernel/trace/trace_fprobe.c:117:1: error: redefinition of ‘fetch_store_strlen_user’
> 117 | fetch_store_strlen_user(unsigned long addr)
> | ^~~~~~~~~~~~~~~~~~~~~~~
> In file included from /work/git/linux-trace.git/kernel/trace/trace_fprobe.c:16:
> /work/git/linux-trace.git/kernel/trace/trace_probe_kernel.h:15:1: note: previous definition of ‘fetch_store_strlen_user’ with type ‘int(long unsigned int)’
> 15 | fetch_store_strlen_user(unsigned long addr)
> | ^~~~~~~~~~~~~~~~~~~~~~~
> /work/git/linux-trace.git/kernel/trace/trace_fprobe.c: In function ‘fetch_store_strlen_user’:
> /work/git/linux-trace.git/kernel/trace/trace_fprobe.c:119:16: error: implicit declaration of function ‘kern_fetch_store_strlen_user’; did you mean ‘fetch_store_strlen_user’? [-Werror=implicit-function-declaration]
> 119 | return kern_fetch_store_strlen_user(addr);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | fetch_store_strlen_user
> /work/git/linux-trace.git/kernel/trace/trace_fprobe.c: At top level:
> /work/git/linux-trace.git/kernel/trace/trace_fprobe.c:124:1: error: redefinition of ‘fetch_store_strlen’
> 124 | fetch_store_strlen(unsigned long addr)
> | ^~~~~~~~~~~~~~~~~~
> /work/git/linux-trace.git/kernel/trace/trace_probe_kernel.h:32:1: note: previous definition of ‘fetch_store_strlen’ with type ‘int(long unsigned int)’
> 32 | fetch_store_strlen(unsigned long addr)
> | ^~~~~~~~~~~~~~~~~~
> /work/git/linux-trace.git/kernel/trace/trace_fprobe.c: In function ‘fetch_store_strlen’:
> /work/git/linux-trace.git/kernel/trace/trace_fprobe.c:126:16: error: implicit declaration of function ‘kern_fetch_store_strlen’; did you mean ‘fetch_store_strlen’? [-Werror=implicit-function-declaration]
> 126 | return kern_fetch_store_strlen(addr);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> | fetch_store_strlen
>
>
> Can you rebase it on the latest changes (on top of trace/for-next)?
OK, let me update it.
>
> BTW, I've applied patches 1-8 and I'm currently running them through my
> tests. So if you do rebase, just send patches 9 and 10. I'm hoping to
> post a for-next series later today, that will include those other
> patches.
Thanks!
>
> -- Steve
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2023-04-01 13:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 15:55 [PATCH v3 00/10] tracing: Add fprobe events Masami Hiramatsu (Google)
2023-02-01 15:56 ` [PATCH v3 01/10] fprobe: Pass entry_data to handlers Masami Hiramatsu (Google)
2023-02-01 15:56 ` [PATCH v3 02/10] lib/test_fprobe: Add private entry_data testcases Masami Hiramatsu (Google)
2023-02-01 15:56 ` [PATCH v3 03/10] fprobe: Add nr_maxactive to specify rethook_node pool size Masami Hiramatsu (Google)
2023-02-01 15:56 ` [PATCH v3 04/10] lib/test_fprobe: Add a test case for nr_maxactive Masami Hiramatsu (Google)
2023-02-01 15:56 ` [PATCH v3 05/10] fprobe: Skip exit_handler if entry_handler returns !0 Masami Hiramatsu (Google)
2023-02-01 15:56 ` [PATCH v3 06/10] lib/test_fprobe: Add a testcase for skipping exit_handler Masami Hiramatsu (Google)
2023-02-01 15:56 ` [PATCH v3 07/10] docs: tracing: Update fprobe documentation Masami Hiramatsu (Google)
2023-02-01 15:57 ` [PATCH v3 08/10] fprobe: Pass return address to the handlers Masami Hiramatsu (Google)
2023-02-01 15:57 ` [PATCH v3 09/10] tracing/probes: Add fprobe events for tracing function entry and exit Masami Hiramatsu (Google)
2023-03-29 12:14 ` Steven Rostedt
2023-04-01 13:46 ` Masami Hiramatsu [this message]
2023-02-01 15:57 ` [PATCH v3 10/10] selftests/ftrace: Add fprobe related testcases Masami Hiramatsu (Google)
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=20230401224609.bebb256be8e6da55f0358ea9@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=revest@chromium.org \
--cc=rostedt@goodmis.org \
--cc=will@kernel.org \
/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).