mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>, Jiri Kosina <jikos@kernel.org>,
	Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	live-patching@vger.kernel.org, x86@kernel.org,
	Borislav Petkov <bp@alien8.de>
Subject: Re: [RFC][PATCH] ftrace/x86: Remove mcount support
Date: Thu, 9 May 2019 22:37:28 -0400	[thread overview]
Message-ID: <20190509223728.203a58cd@gandalf.local.home> (raw)
In-Reply-To: <20190509154902.34ea14f8@gandalf.local.home>

On Thu, 9 May 2019 15:49:02 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
> index cf350639e76d..287f1f7b2e52 100644
> --- a/arch/x86/include/asm/ftrace.h
> +++ b/arch/x86/include/asm/ftrace.h
> @@ -3,12 +3,10 @@
>  #define _ASM_X86_FTRACE_H
>  
>  #ifdef CONFIG_FUNCTION_TRACER
> -#ifdef CC_USING_FENTRY
> -# define MCOUNT_ADDR		((unsigned long)(__fentry__))
> -#else
> -# define MCOUNT_ADDR		((unsigned long)(mcount))
> -# define HAVE_FUNCTION_GRAPH_FP_TEST
> +#ifndef CC_USING_FENTRY
> +# error Compiler does not support fentry?
>  #endif
> +# define MCOUNT_ADDR		((unsigned long)(__fentry__))
>  #define MCOUNT_INSN_SIZE	5 /* sizeof mcount call */
>  
>  #ifdef CONFIG_DYNAMIC_FTRACE

Failed my tests. :-(

In arch/x86/Kconfig ...

	select HAVE_FENTRY                      if X86_64 || DYNAMIC_FTRACE


Bah! I need to work a little on this patch.

I need to implement fentry in the !DYNAMIC_FTRACE code of x86_32 first.
Shouldn't be too hard, but still.

I could also just force DYNAMIC_FTRACE to be 'y' for x86_32 if
CONFIG_FUNCTION_TRACER is set. The only reason I still support static
FTRACE on x86 is because I use it to test !DYNAMIC_FTRACE generic code,
because there's still some archs that only support the !DYNAMIC_FTRACE
function tracer.

-- Steve

      parent reply	other threads:[~2019-05-10  2:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 19:49 Steven Rostedt
2019-05-09 19:59 ` Peter Zijlstra
2019-05-09 20:03 ` Jiri Kosina
2019-05-09 20:12 ` Linus Torvalds
2019-05-10  2:28   ` Steven Rostedt
2019-05-10  7:30     ` Jiri Kosina
2019-05-09 20:14 ` Josh Poimboeuf
2019-05-10  2:30   ` Steven Rostedt
2019-05-10  2:37 ` Steven Rostedt [this message]

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=20190509223728.203a58cd@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®