Re: [PATCH/RFC 2/3] ftrace: introduce nohotpatch function attribute

From: Heiko Carstens
Date: Mon Jan 26 2015 - 10:03:30 EST


On Mon, Jan 26, 2015 at 09:37:01AM -0500, Steven Rostedt wrote:
> On Mon, 26 Jan 2015 13:54:53 +0100
> Heiko Carstens <heiko.carstens@xxxxxxxxxx> wrote:
>
> > gcc supports an s390 specific function attribute called "hotpatch".
> > It can be used to specify the number of halfwords that shall be added before
> > and after a function that shall be filled with nops for runtime patching.
> >
> > s390 will use the hotpatch attribute for function tracing, therefore
> > introduce a nohotpatch define, depending on CC_USING_HOTPATCH, and add it
> > to the existing notrace define.
>
> Are the two mutually exclusive? That is, can you have -pg and hotpatch
> together? Reason why I ask is, if you have either -pg or hotpatch, then
> we only need "no_instrument_function" or "hotpatch" in the notrace
> define, not both. But I could be wrong.

Actually they should be mutually exclusive. I just merged them "just in case".

So something like this

#ifdef CC_USING_HOTPATCH
#define notrace __attribute__((hotpatch(0,0)))
#else
#define notrace __attribute__((no_instrument_function))
#endif

will work as well (just tested).

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