Re: HW breakpoints perf_events request

From: Frederic Weisbecker
Date: Mon Jan 18 2010 - 06:04:18 EST

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@xxxxxxxxxxxxxx> 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

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?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at