From: Masami Hiramatsu <mhiramat@kernel.org>
To: Christian Convey <christian.convey@gmail.com>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Milian Wolff <milian.wolff@kdab.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: newbie question: tracing userspace call/return sequences
Date: Tue, 10 Jan 2017 09:25:07 +0900 [thread overview]
Message-ID: <20170110092507.939229d10bc7cd08b12d31dc@kernel.org> (raw)
In-Reply-To: <CAPfS4ZxuWKhR2KXvkTQf9om5DcAsC_D2sQE5KC-eJNv6GDREyQ@mail.gmail.com>
On Mon, 9 Jan 2017 12:59:38 -0500
Christian Convey <christian.convey@gmail.com> wrote:
> On Mon, Jan 9, 2017 at 12:03 PM, Naveen N. Rao
> <naveen.n.rao@linux.vnet.ibm.com> wrote:
> ...
> > On 2017/01/09 10:19AM, Christian Convey wrote:
> > Try compiling your program with -O2, or use a newer perf:
> > https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?id=e47392bf9c0613a058cd20ee89d8ce9d957d4b24
>
> Thanks for the suggestion. I switched from -O0 to -O2, and
> unfortunately I could no longer add the probe events at all:
>
> cconvey@spaceman ~/dw/scratch/cconvey/src/fib $ sudo -E
> ${PERF_EXEC_PATH}/perf probe --exec=./fib -f --add='* $params'
> Failed to write event: Invalid argument
> Please upgrade your kernel to at least 3.14 to have access to feature @__fmt
> Error: Failed to add events.
>
> cconvey@spaceman ~/dw/scratch/cconvey/src/fib $ sudo -E
> ${PERF_EXEC_PATH}/perf --version
> perf version 4.8.11
>
> cconvey@spaceman ~/dw/scratch/cconvey/src/fib $ uname -a
> Linux spaceman 4.8.0-32-generic #34-Ubuntu SMP Tue Dec 13 14:30:43 UTC
> 2016 x86_64 x86_64 x86_64 GNU/Linux
It seems that the above fix is included v4.9 series, not v4.8.
Could you try to download the latest kernel and build the perf?
You don't need to build kernel, only tools/perf/perf is what you need.
So, what you need is
$ cd <somewhere-your-download-kernel>/tools/perf/
$ make
Not that you have to install libdw-dev for perf-probe before that.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2017-01-10 0:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 3:49 newbie question: tracing userspace call/return sequences Christian Convey
2017-01-06 10:16 ` Milian Wolff
2017-01-06 20:05 ` Christian Convey
2017-01-07 23:44 ` Masami Hiramatsu
2017-01-09 15:19 ` Christian Convey
2017-01-09 17:03 ` Naveen N. Rao
2017-01-09 17:59 ` Christian Convey
2017-01-10 0:25 ` Masami Hiramatsu [this message]
2017-01-10 2:32 ` Christian Convey
2017-01-06 18:49 ` Andi Kleen
2017-01-06 19:07 ` Christian Convey
2017-01-07 4:37 ` Namhyung Kim
2017-01-07 18:26 ` Christian Convey
2017-01-07 19:08 ` Andi Kleen
2017-01-08 8:08 ` Namhyung Kim
2017-01-06 19:23 ` Arnaldo Carvalho de Melo
2017-01-09 17:20 ` Frank Ch. Eigler
2017-01-09 18:08 ` Christian Convey
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=20170110092507.939229d10bc7cd08b12d31dc@kernel.org \
--to=mhiramat@kernel.org \
--cc=christian.convey@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=naveen.n.rao@linux.vnet.ibm.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).