From: Jiri Olsa <olsajiri@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Olsa <olsajiri@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Ingo Molnar <mingo@redhat.com>, bpf <bpf@vger.kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>
Subject: Re: [RFC] ftrace: Add support to keep some functions out of ftrace
Date: Sat, 23 Jul 2022 23:39:27 +0200 [thread overview]
Message-ID: <YtxqjxJVbw3RD4jt@krava> (raw)
In-Reply-To: <20220722174120.688768a3@gandalf.local.home>
On Fri, Jul 22, 2022 at 05:41:20PM -0400, Steven Rostedt wrote:
> On Fri, 22 Jul 2022 23:05:19 +0200
> Jiri Olsa <olsajiri@gmail.com> wrote:
>
> > ok, I think we could use that, I'll check
> >
> > >
> > > But other than that, we don't need infrastructure to hide any mcount/fentry
> > > locations from ftrace. Those were add *for* ftrace.
> >
> > I think I understand the fentry/ftrace equivalence you see, I remember
> > the perl mcount script ;-)
>
> It's even more than that. We worked with the compiler folks to get fentry
> for ftrace purposes (namely to speed it up, and not rely on frame
> pointers, which mcount did). fentry never existed until then. Like I said.
> fentry was created *for* ftrace. And currently it's x86 specific, as it
> relies on the calling convention that a call does both, push the return
> address onto the stack, and jump to a function. The blr
> (branch-link-register) method is more complex, which is where the
> "patchable" work comes from.
>
> >
> > still I think we should be able to define function that has fentry
> > profile call and be able to manage it without ftrace
> >
> > one other thought.. how about adding function that would allow to disable
> > function in ftrace, with existing FTRACE_FL_DISABLED or some new flag
> >
> > that way ftrace still keeps track of it, but won't allow to use it in
> > ftrace infra
>
> Another way is to remove it at compile time from the mcount_loc table, and
> add it to your own table. I take it, this is for bpf infrastructure code
hm, perhaps we could move it to separate object and switch off
-mrecord-mcount for it, I'll check
> and not for any code that's in the day to day processing of the kernel,
> right?
yes, it's bpf specific code
thanks,
jirka
next prev parent reply other threads:[~2022-07-23 21:39 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 11:08 [RFC] ftrace: Add support to keep some functions out of ftrace Jiri Olsa
2022-07-22 11:26 ` Steven Rostedt
2022-07-22 16:04 ` Alexei Starovoitov
2022-07-22 16:08 ` Steven Rostedt
2022-07-22 16:25 ` Steven Rostedt
2022-07-22 16:53 ` Alexei Starovoitov
2022-07-22 17:14 ` Steven Rostedt
2022-07-22 21:05 ` Jiri Olsa
2022-07-22 21:41 ` Steven Rostedt
2022-07-23 3:53 ` Steven Rostedt
2022-07-23 3:56 ` Steven Rostedt
2022-07-25 7:00 ` Jiri Olsa
2022-07-23 21:39 ` Jiri Olsa [this message]
2022-08-12 21:18 ` Jiri Olsa
2022-08-12 21:50 ` Steven Rostedt
2022-08-13 19:02 ` Steven Rostedt
2022-08-14 11:32 ` Steven Rostedt
2022-08-14 15:22 ` Jiri Olsa
2022-08-15 2:07 ` Chen Zhongjin
2022-08-15 8:04 ` Jiri Olsa
2022-08-15 11:01 ` Björn Töpel
2022-08-15 11:29 ` Jiri Olsa
2022-08-15 12:19 ` Björn Töpel
2022-08-15 12:30 ` Björn Töpel
2022-08-15 8:03 ` Peter Zijlstra
2022-08-15 9:44 ` Jiri Olsa
2022-08-15 12:37 ` Peter Zijlstra
2022-08-15 14:25 ` Alexei Starovoitov
2022-08-15 14:33 ` Peter Zijlstra
2022-08-15 14:45 ` Alexei Starovoitov
2022-08-15 15:02 ` Peter Zijlstra
2022-08-15 15:17 ` Alexei Starovoitov
2022-08-15 15:28 ` Peter Zijlstra
2022-08-15 15:35 ` Alexei Starovoitov
2022-08-15 15:44 ` Steven Rostedt
2022-08-15 15:53 ` Alexei Starovoitov
2022-08-15 16:13 ` Steven Rostedt
2022-08-15 15:48 ` Peter Zijlstra
2022-08-16 6:56 ` Jiri Olsa
2022-08-17 9:29 ` Jiri Olsa
2022-08-17 16:57 ` Alexei Starovoitov
2022-08-17 19:39 ` Jiri Olsa
2022-08-15 15:41 ` Peter Zijlstra
2022-08-15 15:49 ` Alexei Starovoitov
2022-08-15 16:08 ` Steven Rostedt
2022-08-18 20:27 ` Jiri Olsa
2022-08-18 20:50 ` Steven Rostedt
2022-08-18 21:00 ` Alexei Starovoitov
2022-08-18 21:05 ` Steven Rostedt
2022-08-18 21:32 ` Jiri Olsa
2022-08-19 11:45 ` Jiri Olsa
2022-08-23 17:23 ` Alexei Starovoitov
2022-08-26 8:00 ` Jiri Olsa
2022-08-18 21:14 ` Jiri Olsa
2022-08-15 15:32 ` Steven Rostedt
2022-07-22 16:26 ` Jiri Olsa
2022-07-22 16:37 ` Steven Rostedt
2022-07-22 16:54 ` Alexei Starovoitov
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=YtxqjxJVbw3RD4jt@krava \
--to=olsajiri@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=sdf@google.com \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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