[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bok7x0e1.fsf@sejong.aot.lge.com>
Date: Mon, 25 Jun 2012 17:26:46 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Jovi Zhang <bookjovi@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: perf support user-space hw_breakpoint?
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@...ong: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@...ong: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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists