linux-stable/include
Steven Rostedt bac429f037 tracing: add function profiler
Impact: new profiling feature

This patch adds a function profiler. In debugfs/tracing/ two new
files are created.

  function_profile_enabled  - to enable or disable profiling

  trace_stat/functions   - the profiled functions.

For example:

  echo 1 > /debugfs/tracing/function_profile_enabled
  ./hackbench 50
  echo 0 > /debugfs/tracing/function_profile_enabled

yields:

  cat /debugfs/tracing/trace_stat/functions

  Function                               Hit
  --------                               ---
  _spin_lock                        10106442
  _spin_unlock                      10097492
  kfree                              6013704
  _spin_unlock_irqrestore            4423941
  _spin_lock_irqsave                 4406825
  __phys_addr                        4181686
  __slab_free                        4038222
  dput                               4030130
  path_put                           4023387
  unroll_tree_refs                   4019532
[...]

The most hit functions are listed first. Functions that are not
hit are not listed.

This feature depends on and uses dynamic function tracing. When the
function profiling is disabled, no overhead occurs. But it still
takes up around 300KB to hold the data, thus it is not recomended
to keep it enabled for systems low on memory.

When a '1' is echoed into the function_profile_enabled file, the
counters for is function is reset back to zero. Thus you can see what
functions are hit most by different programs.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2009-03-24 23:40:00 -04:00
..
acpi acpi/x86: introduce __apci_map_table, v4 2009-02-09 13:35:07 +01:00
asm-arm
asm-frv Merge branch 'x86/core' into tracing/textedit 2009-03-06 16:45:01 +01:00
asm-generic tracing/syscalls: core infrastructure for syscalls tracing, enhancements 2009-03-13 16:57:42 +01:00
asm-h8300
asm-m32r Merge branch 'x86/core' into tracing/textedit 2009-03-06 16:45:01 +01:00
asm-mn10300 Merge branch 'x86/core' into tracing/textedit 2009-03-06 16:45:01 +01:00
crypto crypto: shash - Fix tfm destruction 2009-02-05 16:51:25 +11:00
drm drm: fix EDID parser problem with positive/negative hsync/vsync 2009-03-11 12:18:48 +10:00
keys
linux tracing: add function profiler 2009-03-24 23:40:00 -04:00
math-emu
media Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-02-02 19:26:06 -08:00
mtd headers_check fix: mtd/inftl-user.h 2009-01-31 00:13:34 +05:30
net netns: Remove net_alive 2009-03-03 01:14:27 -08:00
pcmcia
rdma
rxrpc
scsi [SCSI] fcoe: Out of order tx frames was causing several check condition SCSI status 2009-03-10 09:09:21 -05:00
sound headers_check fix: sound/hdsp.h 2009-01-31 00:13:56 +05:30
trace tracing: tracepoints for softirq entry/exit - tracepoints 2009-03-12 21:20:58 -04:00
video atyfb: fix CONFIG_ namespace violations 2009-02-05 12:56:48 -08:00
xen
Kbuild