Re: [RFC][PATCH 5/5] ftrace/x86-32: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set

From: Steven Rostedt
Date: Thu Mar 16 2017 - 09:02:23 EST


On Thu, 16 Mar 2017 18:24:12 +0900
Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:

> > +/* mcount uses a frame pointer even if CONFIG_FRAME_POINTER is not set */
> > +#if !defined(CC_USING_FENTRY) || defined(CONFIG_FRAME_POINTER)
> > +# define USING_FRAME_POINTER
> > +#endif
> > +
> > +#ifdef USING_FRAME_POINTER
> > +# ifdef CC_USING_FENTRY
> > +# define MCOUNT_FRAME_SIZE (4*4) /* bp,ip and parent's */
> > +# else
> > +# define MCOUNT_FRAME_SIZE 4 /* just the bp */
> > +# endif
> > +# define MCOUNT_FRAME 1 /* using frame = true */
> > +#else
> > +# define MCOUNT_FRAME_SIZE 0 /* no stack frame */
> > +# define MCOUNT_FRAME 0 /* using frame = false */
> > +#endif
>
> It seems that there is no use of MCOUNT_FRAME_SIZE below. Do we really need it?

Hmm, one of the previous versions of my patch required it. I think I
was able to tinker with the code to remove all the use cases of it. But
I never removed the definition. Thanks, I'll fix this too.

-- Steve