Re: HW breakpoints perf_events request

Frederic Weisbecker
2010-01-18T11:04:14Z

On Thu, Jan 14, 2010 at 10:03:27AM -0800, Joshua Pincus wrote:
> Hi,
>
> On Thu, Jan 14, 2010 at 1:23 AM, Andi Kleen <andi@firstfloor.org> wrote:
> >> We would like to avoid using ptrace at all costs.
> >> It requires us to have a parent thread running
> >> which monitors all the others.  It's not clear that
> >> the wait() call by the parent doesn't mask a barrage
> >> of signals from various threads and the performance
> >
> > mask? It'll report them. You expect to have so
> > many signals that this would be a problem?
>
> Yes. We expect to see a zillion of them.

I don't quite understand what signals are masked here,
actually I'm not sure what is the true problem with ptrace.
Is it because a breakpoint in a thread is going to stop
all thread in the process until the parent handles the
signal?

Anyway, although I first suggested extending perf, with
more thoughts I now agree that perf should keep doing what
it does currently (profiling) and not trying to become an
messy mix of a profiler, debugger, etc...
This is not its role.

But it can certainly be used by a debugging facility.

What about extending ptrace to support a new type of
breakpoint debugging interface?