Re: [RFC Patch 4/5] PERF-HW_HBKPT: Enable perf-events to usehw-breakpoints

From: Frederic Weisbecker
Date: Sat Nov 21 2009 - 23:08:34 EST


On Sun, Nov 22, 2009 at 03:52:00AM +0100, Frederic Weisbecker wrote:
> On Fri, Oct 30, 2009 at 03:52:23AM +0530, K.Prasad wrote:
> > Enable perf-events to collect memory access statistics on kernel-space
> > data in the context of a running process.
> >
> > Signed-off-by: K.Prasad <prasad@xxxxxxxxxxxxxxxxxx>
>
>
>
> I'm going to take the userspace part of this patch to integrate breakpoints
> in perf tools.
>
> But I'm not sure passing the name of the symbol to the kernel and store
> it in the perf attr is a good idea.
> We should probably resolve the name from userspace and pass the address
> to the kernel. Mostly because if we want to support breakpoints in
> userspace apps, we don't want conflicts between kernel and userspace
> symbols.
>
> Thanks.
>


Hmm, actually instead of memory-write/memory-readwrite
I would rather see:

mem:symbol:[r][w][x]

like mem:pid_max:rw

We could default it to rw for now.

This will be more flexible I guess.
And later for ranges:

mem:symbol[[start]:[len]:[rwx]

This could be:
mem:array_name[0:5]:rwx

So, I'll need an ad-hoc parsing function for this one. This
would be hard by integrating your patch.
I'll try something else. But I can probably take the 5th patch
of your series.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/