Ftrace function tracer will only trace sections that have been white listed.A section not in the whitelist will not be traced but if the sectionis not denoted with "notrace" it will still have calls to mcount.On x86_64 mcount is defined simply as:

mcount: retq

But these sections will take a slight overhead for calling the mcountfunction and returning. Most of the time we don't care because these areusually init and exit sections that are not very performance critical.But it would be nice not to have these calls anyway.

This patch seriers does a few things.

1) various cleanups to recordmcount.c

2) Make the calls (on x86) to mcount that are not being recorded for the function tracer into nops at compile time.

3) Add a "RECORDMCOUNT_WARN=1" feature to the make command line that will cause recordmcount to warn when a section contains mcount calls that is not being traced.

4) Added some "notrace" to section annotations that are not being traced as well as whitelisting one.

The reason this does not warn by default is because the developer maynot know if the section should be whitelisted or blacklisted (notrace)

Anyway, this is going out as RFC for now if anyone has any comments,and I also need to get Acked-by's from the Kconfig maintainer for oneof my modifications.