Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444509

Re: [PATCH v2 1/2] arm64: implement FTRACE_WITH_REGS

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] arm64: implement FTRACE_WITH_REGS
Date 2016-07-15 20:40 +0200
Message-ID <rVgbL-1Sh-3@gated-at.bofh.it> (permalink)
References (5 earlier) <rSGcp-6ES-1@gated-at.bofh.it> <rSGm6-6Ir-23@gated-at.bofh.it> <rSKzo-1bN-11@gated-at.bofh.it> <rSLc6-1Ig-17@gated-at.bofh.it> <rSWqR-Vp-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 9 Jul 2016 11:06:32 +0200
Torsten Duwe <duwe@lst.de> wrote:


> Maybe the code in question can be replaced with the change below, now that
> there is a preprocessor define in V2?
> (untested)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 3f743b1..695a646 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -2423,6 +2423,12 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
>  	if (unlikely(ftrace_disabled))
>  		return 0;
>  
> +#ifdef CC_USING_PROLOG_PAD
> +	/* If the compiler already generated NOPs instead of
> +	 * calls to mcount, we're done here.
> +	*/
> +	return 1;
> +#endif

I really hate adding #ifdef's like this in generic code if the arch can
handle it with some other means.

-- Steve


>  	ret = ftrace_make_nop(mod, rec, MCOUNT_ADDR);
>  	if (ret) {
>  		ftrace_bug(ret, rec);

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2 1/2] arm64: implement FTRACE_WITH_REGS Steven Rostedt <rostedt@goodmis.org> - 2016-07-15 20:40 +0200

csiph-web