From: Namhyung Kim <namhyung@kernel.org>
To: Jovi Zhang <bookjovi@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: perf support user-space hw_breakpoint?
Date: Mon, 25 Jun 2012 17:26:46 +0900 [thread overview]
Message-ID: <87bok7x0e1.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <CACV3sb+EqVR0Z7qtCOpFtmRS+7xvv0b4S0Jrk7o7b__89_WVcA@mail.gmail.com> (Jovi Zhang's message of "Mon, 25 Jun 2012 13:22:01 +0800")
Hi, Jovi
On Mon, 25 Jun 2012 13:22:01 +0800, Jovi Zhang wrote:
> Hi guys,
>
> Does perf support user space hw_breakpoint based on per-task?
>
> perf already support kenerl space hw_breakpoint, but there don't have
> any example for
> user-space hw_breakpoint in code base(and never metion it).
> From perf api point of view, it should support per-task hw_breakpoint easily.
> but I still want to make sure that?(badly I don't have any linux
> machine to test it now:))
>
Here is my simple test:
namhyung@sejong:perf$ nm -nD /usr/bin/ls | grep D
0000000000619ce0 D quoting_style_args
000000000061a530 D ls_mode
000000000061a538 D Version
000000000061a540 D argmatch_die
000000000061a548 D exit_failure
namhyung@sejong:perf$ ./perf stat -e mem:0x61a530 -e mem:0x61a538 -- /usr/bin/ls > /dev/null
Performance counter stats for '/usr/bin/ls':
1 mem:0x61a530:rw
0 mem:0x61a538:rw
0.002213595 seconds time elapsed
So, it should work on user-space hw_breakpoints.
BTW, when I perf record on a hwbp, it failed with ENOSPC.
I guess it's because each per-task-per-cpu event tried to
create an event so it'd get more than supported by h/w.
The strace told me that the fifth call to perf_event_open
failed on my 6-core machine.
Thanks,
Namhyung
next prev parent reply other threads:[~2012-06-25 8:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 5:22 Jovi Zhang
2012-06-25 8:26 ` Namhyung Kim [this message]
2012-06-28 1:02 ` Jovi Zhang
2012-06-28 2:20 ` Namhyung Kim
2012-06-28 4:10 ` David Ahern
2012-06-28 4:12 ` Jovi Zhang
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=87bok7x0e1.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=bookjovi@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®