From: Song Liu <songliubraving@fb.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>, Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Alexey Budankov <alexey.budankov@linux.intel.com>
Subject: Re: [RFC] perf/core: allow ftrace for functions in kernel/event/core.c
Date: Wed, 27 May 2020 18:40:33 +0000 [thread overview]
Message-ID: <DD3FC894-134E-4A8E-A769-406FCC6B8F61@fb.com> (raw)
In-Reply-To: <20200527144040.3f12026f31b20b2011fbbcee@kernel.org>
> On May 26, 2020, at 10:40 PM, Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> On Tue, 26 May 2020 21:46:29 +0000
> Song Liu <songliubraving@fb.com> wrote:
>
>>
>>
>>> On May 26, 2020, at 2:39 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>>>
>>> On Tue, May 26, 2020 at 02:28:26PM -0700, Song Liu wrote:
>>>> It is useful to trace functions in kernel/event/core.c. Allow ftrace for
>>>> them by removing $(CC_FLAGS_FTRACE) from Makefile.
>>>
>>> Did you try using the ftrace event with perf with this on?
>>
>> I have tried a few things, like
>>
>> perf stat -e probe:perf_read -I 1000
>> perf record -e probe:__x64_sys_perf_event_open -aR
>>
>> They all work fine.
>
> Did you try using perf with function-tracer or function-graph tracer?
> If you just want to trace those functions with kprobes, you can
> build your kernel with CONFIG_KPROBE_EVENTS_ON_NOTRACE=y, which allows
> you to probe perf_read etc.
Thanks for the hint.
kprobe does work with CONFIG_KPROBE_EVENTS_ON_NOTRACE, but BPF trampoline
doesn't work. If it is safe, removing $(CC_FLAGS_FTRACE) is preferable.
Thanks,
Song
prev parent reply other threads:[~2020-05-27 19:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200526212826.4097888-1-songliubraving@fb.com>
2020-05-26 21:39 ` [RFC] perf/core: allow ftrace for functions in kernel/event/core.c Peter Zijlstra
2020-05-26 21:46 ` Song Liu
2020-05-26 21:54 ` Peter Zijlstra
2020-05-26 22:04 ` Steven Rostedt
2020-05-26 22:05 ` Steven Rostedt
2020-05-26 22:09 ` Song Liu
2020-06-05 21:58 ` Song Liu
2020-06-05 22:02 ` Steven Rostedt
2020-06-15 18:27 ` Song Liu
2021-09-24 17:15 ` Song Liu
2020-05-26 22:08 ` Song Liu
2020-05-27 5:40 ` Masami Hiramatsu
2020-05-27 18:40 ` Song Liu [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=DD3FC894-134E-4A8E-A769-406FCC6B8F61@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=acme@redhat.com \
--cc=alexey.budankov@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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).