lkml.org 
[lkml]   [2012]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 3/4] ftrace: Do not test frame pointers if -mfentry is used
From
Date
On Wed, 2012-08-08 at 13:34 +0900, Masami Hiramatsu wrote:
>
> > -#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST
> > +#if defined(CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST) && !defined(CC_USING_FENTRY)
>
> I think CONFIG_HAVE_FENTRY would better unselect
> CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST in arch/x86/Kconfig explicitly.

No, CONFIG_HAVE_FENTRY just means fentry is supported, it does not mean
that it is being used. It only gets used if CC_USING_FENTRY is set,
which is set by the Makefile at time of compile.

If CONFIG_HAVE_FENTRY is defined, a test is done to see if the gcc
compiling the kernel supports -mfentry. If it does, then it defines the
CC_USING_FENTRY macro, if not, the macro is not defined and the old way
is performed.

If the old way is performed, even if CONFIG_HAVE_FENTRY is defined, then
we still need the above test. We can not have CONFIG_HAVE_FENTRY
unselect CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST.

-- Steve




\
 
 \ /
  Last update: 2012-08-08 15:22    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site