Messages in this thread | | | Date | Thu, 14 Aug 2008 19:40:14 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH v2 3/6] ftrace: enable mcount recording for modules |
| |
Rusty Russell wrote: > On Friday 15 August 2008 05:45:09 Steven Rostedt wrote: > >> This patch enables the loading of the __mcount_section of modules and >> changing all the callers of mcount into nops. >> > ... > >> + if (mcountindex) { >> + void *mseg = (void *)sechdrs[mcountindex].sh_addr; >> + ftrace_init_module(mseg, mseg + sechdrs[mcountindex].sh_size); >> > > You don't actually need the if. The size of section 0 is 0. >
Thanks,
But I find the if is a bit more clear. It may confuse code reviewers if we expect them to know that sechdrs[0].sh_size is zero. This isn't a hot path.
-- Steve
| |