linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 00/11] ftrace/recordmcount: Remove useless mcount calls not being traced
@ 2011-04-21  2:28 Steven Rostedt
  2011-04-21  2:28 ` [RFC][PATCH 01/11] ftrace/trivial: Clean up recordmcount.c to use Linux style comparisons Steven Rostedt
                   ` (10 more replies)
  0 siblings, 11 replies; 48+ messages in thread
From: Steven Rostedt @ 2011-04-21  2:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, H. Peter Anvin

The following is just a heads up on the changes to recordmcount.

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 section
is 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 mcount
function and returning. Most of the time we don't care because these are
usually 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 may
not 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 one
of my modifications.

Steven Rostedt (11):
      ftrace/trivial: Clean up recordmcount.c to use Linux style comparisons
      ftrace/trivial: Clean up record mcount to use Linux switch style
      ftrace: Add .kprobe.text section to whitelist for recordmcount.c
      ftrace/recordmcount: Modify only executable sections
      ftrace/recordmcount: Make ignored mcount calls into nops at compile time
      ftrace/recordmcount: Add warning logic to warn on mcount not recorded
      kbuild/recordmcount: Add RECORDMCOUNT_WARN to warn about mcount callers
      ftrace: Avoid recording mcount on .init sections directly
      ftrace/x86: Do not trace .discard.text section
      ftrace/recordmcount: Remove duplicate code to find mcount symbol
      ftrace/recordmcount: Add helper function get_sym_str_and_relp()

----
 Makefile                     |    1 +
 arch/x86/include/asm/setup.h |    2 +-
 include/linux/init.h         |   14 ++--
 scripts/Makefile.build       |    5 +-
 scripts/recordmcount.c       |  162 +++++++++++++++++++++++++++--------------
 scripts/recordmcount.h       |  165 +++++++++++++++++++++++++++++++++---------
 scripts/recordmcount.pl      |    1 +
 7 files changed, 253 insertions(+), 97 deletions(-)

^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2011-06-16 14:08 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21  2:28 [RFC][PATCH 00/11] ftrace/recordmcount: Remove useless mcount calls not being traced Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 01/11] ftrace/trivial: Clean up recordmcount.c to use Linux style comparisons Steven Rostedt
2011-04-21  8:46   ` Alan Cox
2011-04-21 11:36     ` Steven Rostedt
2011-04-21 12:28       ` Steven Rostedt
2011-04-22 15:09   ` John Reiser
2011-04-22 15:52     ` Thiago Farina
2011-04-22 16:05       ` Steven Rostedt
2011-04-26 18:52         ` Thiago Farina
2011-04-26 19:09           ` Steven Rostedt
2011-04-22 16:13     ` Steven Rostedt
2011-04-22 17:40       ` John Reiser
2011-04-22 17:56         ` H. Peter Anvin
2011-05-18 18:31   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:04   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 02/11] ftrace/trivial: Clean up record mcount to use Linux switch style Steven Rostedt
2011-05-18 18:31   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:04   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 03/11] ftrace: Add .kprobe.text section to whitelist for recordmcount.c Steven Rostedt
2011-05-18 18:32   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:05   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 04/11] ftrace/recordmcount: Modify only executable sections Steven Rostedt
2011-05-18 18:32   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:05   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 05/11] ftrace/recordmcount: Make ignored mcount calls into nops at compile time Steven Rostedt
2011-05-18 18:32   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:05   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 06/11] ftrace/recordmcount: Add warning logic to warn on mcount not recorded Steven Rostedt
2011-05-18 18:33   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:06   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 07/11] kbuild/recordmcount: Add RECORDMCOUNT_WARN to warn about mcount callers Steven Rostedt
2011-04-21  2:40   ` Steven Rostedt
2011-04-21 20:40   ` Michal Marek
2011-04-26 19:08     ` Steven Rostedt
2011-05-18 18:33   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:06   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 08/11] ftrace: Avoid recording mcount on .init sections directly Steven Rostedt
2011-05-18 18:34   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:07   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 09/11] ftrace/x86: Do not trace .discard.text section Steven Rostedt
2011-05-18 18:34   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:07   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 10/11] ftrace/recordmcount: Remove duplicate code to find mcount symbol Steven Rostedt
2011-05-18 18:34   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:07   ` tip-bot for Steven Rostedt
2011-04-21  2:28 ` [RFC][PATCH 11/11] ftrace/recordmcount: Add helper function get_sym_str_and_relp() Steven Rostedt
2011-05-18 18:35   ` [tip:perf/core] " tip-bot for Steven Rostedt
2011-06-16 14:08   ` tip-bot for Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).