LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Masami Hiramatsu <maasami.hiramatsu.pt@hitachi.com>,
	Vojtech Pavlik <vojtech@suse.cz>, Jiri Kosina <jkosina@suse.cz>,
	Jiri Slaby <jslaby@suse.cz>,
	Andreas Krebbel <krebbel@linux.vnet.ibm.com>,
	Dominik Vogt <vogt@linux.vnet.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC 2/3] ftrace: introduce nohotpatch function attribute
Date: Mon, 26 Jan 2015 09:37:01 -0500	[thread overview]
Message-ID: <20150126093701.699763dc@gandalf.local.home> (raw)
In-Reply-To: <1422276894-31302-3-git-send-email-heiko.carstens@de.ibm.com>

On Mon, 26 Jan 2015 13:54:53 +0100
Heiko Carstens <heiko.carstens@de.ibm.com> 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.

-- Steve

> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>  include/linux/compiler.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> index b4fd7013c9f4..b4ab98e0e10b 100644
> --- a/include/linux/compiler.h
> +++ b/include/linux/compiler.h
> @@ -54,7 +54,13 @@ extern void __chk_io_ptr(const volatile void __iomem *);
>  #include <linux/compiler-gcc.h>
>  #endif
>  
> -#define notrace __attribute__((no_instrument_function))
> +#ifdef CC_USING_HOTPATCH
> +#define nohotpatch __attribute__((hotpatch(0,0)))
> +#else
> +#define nohotpatch
> +#endif
> +
> +#define notrace __attribute__((no_instrument_function)) nohotpatch
>  
>  /* Intel compiler defines __GNUC__. So we will overwrite implementations
>   * coming from above header files here


  reply	other threads:[~2015-01-26 14:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 12:54 [PATCH/RFC 0/3] ftrace: allow arch specific compile options Heiko Carstens
2015-01-26 12:54 ` [PATCH/RFC 1/3] ftrace: allow architectures to specify ftrace " Heiko Carstens
2015-01-26 12:54 ` [PATCH/RFC 2/3] ftrace: introduce nohotpatch function attribute Heiko Carstens
2015-01-26 14:37   ` Steven Rostedt [this message]
2015-01-26 15:03     ` Heiko Carstens
2015-01-26 15:22       ` Steven Rostedt
2015-01-26 15:26         ` Heiko Carstens
2015-01-27  6:19     ` Dominik Vogt
2015-01-27 14:42       ` Steven Rostedt
2015-01-28  5:36         ` Heiko Carstens
2015-01-28 11:57           ` Steven Rostedt
2015-01-28 12:18             ` Heiko Carstens
2015-01-28 12:38               ` Steven Rostedt
2015-01-26 12:54 ` [PATCH/RFC 3/3] s390/ftrace: hotpatch support for function tracing Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150126093701.699763dc@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jkosina@suse.cz \
    --cc=jslaby@suse.cz \
    --cc=krebbel@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maasami.hiramatsu.pt@hitachi.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=vogt@linux.vnet.ibm.com \
    --cc=vojtech@suse.cz \
    --subject='Re: [PATCH/RFC 2/3] ftrace: introduce nohotpatch function attribute' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).