Re: [RFC PATCH] Tracepoint: add exec tracepoint

From: Steven Rostedt
Date: Tue Oct 18 2011 - 16:28:12 EST


On Tue, 2011-10-18 at 14:31 -0500, David Smith wrote:
> On 10/18/2011 01:58 PM, Christoph Hellwig wrote:
>
> > On Tue, Oct 18, 2011 at 01:41:35PM -0500, David Smith wrote:
> >> Added general purpose exec tracepoint. The 'bprm' argument gives details of the exec.
> >
> > Given that you only need the filename from the bprm please just pass
> > it directly.
>
>
> Thanks for looking at the patch.
>
> I'm not totally opposed to this change, but passing bprm allows custom
> tracepoint handlers to look at other fields in bprm besides filename,
> which could be useful (depending on your needs).

I like flexible tracepoints too.

>
> But, I don't have a real strong opinion here.
>

I rather pass the pointer. If we pass the string, gcc may not optimize
when tracing is disabled and still do the work to dereference the
pointer unnecessarily.

-- Steve



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