Re: [RFC][PATCH] Make ftrace able to trace function return

From: Frédéric Weisbecker
Date: Thu Oct 30 2008 - 14:38:38 EST


2008/10/30 Ingo Molnar <mingo@xxxxxxx>:
> hm, are you aware of the -finstrument-functions feature of GCC?
>
> that feature generates such entry points at build time:
>
> void __cyg_profile_func_enter (void *this_fn,
> void *call_site);
> void __cyg_profile_func_exit (void *this_fn,
> void *call_site);

Oh I didn't know it.
But wouldn't it conflict with the -pg used for mcount in ftrace?

> this might be faster/cleaner than using a trampoline approach IMO.

Yes, oubviously!

> OTOH, entry+exit profiling has about double the cost of just entry
> profiling - so maybe there should be some runtime flexibility there.
> Plus the same recordmcount trick should be used to patch up these
> entry points to NOP by default.

Yes that's right. Hm I don't know what to do since there is already mcount....
--
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/