Re: [RFC] single return paradigm

From: Samuel Thibault (Samuel.Thibault@ens-lyon.fr)
Date: Tue Jul 29 2003 - 20:02:12 EST


Le dim 27 jui 2003 11:43:22 GMT, Alan Cox a tapoté sur son clavier :
> On Sad, 2003-07-26 at 23:16, Samuel Thibault wrote:
> > The "single return" paradigm of drivers/char/vt.c:tioclinux() surprised
> > me at first glance. But I'm now trying to maintain a patch which adds
> > probes at entry and exit of functions for performance instrumenting
>
> gcc will already dop that for you

Indeed. The thing is that this automatic call only gives you the
function address and its caller site (yes, it couldn't give much more),
so you have to lookup symbols in the System.map, you can't do this with
modules (at least for non-exported functions which don't appear in
/proc/ksyms), and you can't get the return code.

I'll yet add this possibility for quickly adding tracing to a particular
file by just adding CFLAGS_file.o=-finstrument-functions to the Makefile,
before progressively replacing it by hand-written probes with the wanted
parameters. The single-exit issue still remains then.

Thanks anyway,
Regards,
Samuel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:43 EST