Re: [PATCH 1/8] ftrace: add ftrace_init_nop()

From: Mark Rutland
Date: Tue Oct 22 2019 - 11:31:07 EST


On Tue, Oct 22, 2019 at 08:54:28AM -0400, Steven Rostedt wrote:
> On Tue, 22 Oct 2019 12:28:11 +0100
> Mark Rutland <mark.rutland@xxxxxxx> wrote:
> > > To make the name even better, let's just rename it to:
> > >
> > > ftrace_nop_initialization()
> > >
> > > I think that may be the best description for it.
> >
> > Perhaps ftrace_nop_initialize(), so that it's not a noun?
> >
> > I've made it ftrace_nop_initialization() in my branch for now.
>
> I'm fine with ftrace_nop_initialize().

It's settled, then. :)

[...]

> > | /**
> > | * ftrace_init_nop - initialize a nop call site
> > | * @mod: module structure if called by module load initialization
> > | * @rec: the mcount call site record
>
> Perhaps say "mcount/fentry"

This is the exact wording that ftrace_make_nop and ftrace_modify_call
have. For consistency, I think those should all match.

I can add " (e.g. mcount/fentry)" to all of those if you'd like?

... or leave them all as-is?

> > | *
> > | * This is a very sensitive operation and great care needs
> > | * to be taken by the arch. The operation should carefully
> > | * read the location, check to see if what is read is indeed
> > | * what we expect it to be, and then on success of the compare,
> > | * it should write to the location.
> > | *
> > | * The code segment at @rec->ip should be as initialized by the
>
> "should be as" is a bit confusing. What about?
>
> "The code segment at @rec->ip should contain the contents created by
> the compiler".

Works for me.

Mark.