Re: [PATCH 09/10] perf: Remove more fastpath code

From: Peter Zijlstra
Date: Fri May 21 2010 - 07:18:14 EST


On Fri, 2010-05-21 at 07:15 -0400, Steven Rostedt wrote:
> > - if (WARN_ON_ONCE(((long)(handle->head - handle->offset)) < 0))
> > - return;
>
> Are you sure you want to remove this? I mean, sanity checks are a small
> cost (I have several in the ftrace ring buffer) and can catch bugs in
> case something happens during development. Especially when the code is
> under a lot of flux.

Yeah, I pondered adding a CONFIG_PERF_DEBUG for that.. thing is I was
tracking 2 variables just for this, and that seemed a bit excessive.

> I even have a sanity check that Ingo asked me to add, which would detect
> if a tracer (not the ring buffer, but the user of the ring buffer)
> recursed on itself. I think that check detected one bug in the function
> tracer in the begging, but hasn't caught anything since.

I still have recursion checks.

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