public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Song Liu <songliubraving@fb.com>
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>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	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 14:40:40 +0900	[thread overview]
Message-ID: <20200527144040.3f12026f31b20b2011fbbcee@kernel.org> (raw)
In-Reply-To: <A9B20D93-748B-4789-801E-91720E2D4F28@fb.com>

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.

Thank you,


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  parent reply	other threads:[~2020-05-27  5:40 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 [this message]
2020-05-27 18:40       ` Song Liu

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=20200527144040.3f12026f31b20b2011fbbcee@kernel.org \
    --to=mhiramat@kernel.org \
    --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=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=songliubraving@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