Re: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)

From: Ingo Molnar
Date: Wed Jan 27 2010 - 03:25:08 EST

* Avi Kivity <avi@xxxxxxxxxx> wrote:

> On 01/20/2010 11:57 AM, Peter Zijlstra wrote:
> >On Wed, 2010-01-20 at 11:43 +0200, Avi Kivity wrote:
> >> 1. Write a trace entry into shared memory, trap into the kernel on
> >> overflow.
> >> 2. Trap if a condition is satisfied (fast watchpoint implementation).
> >
> > So now you want to consume more of a process' address space to store trace
> > data as well?
> Yes. I know I'm bad.

No, you are just wrong.

> > Not to mention that that process could wreck the trace data rendering it
> > utterly unreliable.
> It could, but it also might not. Are we going to deny high performance
> tracing to users just because it doesn't work in all cases?

Tracing and monitoring is foremost about being able to trust the instrument,
then about performance and usability. That's one of the big things about
ftrace and perf.

By proposing 'user space tracing' you are missing two big aspects:

- That self-contained, kernel-driven tracing can be replicated in user-space.
It cannot. Sharing and global state is much harder to maintain reliably,
but the bigger problem is that user-space can stomp on its own tracing
state and can make it unreliable. Tracing is often used to figure out bugs,
and tracers will be trusted less if they can stomp on themselves.

- That somehow it's much faster and that this edge matters. It isnt and it
doesnt matter. The few places that need very very fast tracing wont use any
of these facilities - it will use something specialized.

So you are creating a solution for special cases that dont need it, and you
are also ignoring prime qualities of a good tracing framework.

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