Re: perf support user-space hw_breakpoint?

From: Jovi Zhang
Date: Thu Jun 28 2012 - 00:12:50 EST


Hi,

On Thu, Jun 28, 2012 at 10:20 AM, Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> On Thu, 28 Jun 2012 09:02:02 +0800, Jovi Zhang wrote:
>> On Mon, Jun 25, 2012 at 4:26 PM, Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>>> 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.
>>>
>> I have same result as you in my linux box.
>> This should be a bug cause by commit d1cb9f(perf target: Add uses_mmap field)
>>
>> Namhyung, How about below patch?
>>
>
> NAK. This uses_mmap field is needed to setup per-task-per-cpu events for
> perf record (mostly). Without it, perf suffered from severe scalability
> issues. Maybe we can change it not to create per-task-per-cpu events iff
> for hwbp events only, but I'm not sure it's the right thing.
>
> Thanks,
> Namhyung
>
perf tool create cpumaps and threadmaps for evlist, not for evsel, this means
we cannot easily create a dummy cpumaps for hwbp event even when
evlist include hwbp type evsel.

Any ideas?

.jovi
--
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/