diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-20 12:50:56 -0400 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-24 23:40:00 -0400 |
commit | bac429f037f1a51a74d62bad6d1518c3be065df3 (patch) | |
tree | 40c3dbdd0f6c097c3c9a1087d219dd8632bd7b74 /crypto/seed.c | |
parent | 425480081e936d8725f0d44b8829d699bf088c6b (diff) | |
download | blackbird-op-linux-bac429f037f1a51a74d62bad6d1518c3be065df3.tar.gz blackbird-op-linux-bac429f037f1a51a74d62bad6d1518c3be065df3.zip |
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>
Diffstat (limited to 'crypto/seed.c')
0 files changed, 0 insertions, 0 deletions