From: Andrew Morton <akpm@linux-foundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Ingo Molnar" <mingo@elte.hu>,
"Peter Zijlstra" <peterz@infradead.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Arjan van de Ven" <arjan@infradead.org>
Subject: Re: [PATCH][GIT PULL] tracing: add function profiler
Date: Sat, 21 Mar 2009 04:26:33 -0700 [thread overview]
Message-ID: <20090321042633.1dfa536a.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.00.0903210036590.13615@gandalf.stny.rr.com>
On Sat, 21 Mar 2009 00:37:59 -0400 (EDT) Steven Rostedt <rostedt@goodmis.org> wrote:
> 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.
Why is this useful?
Can we think of any scenarios where kernel developers would get
useful-to-them results from this? Results which couldn't be
obtained by other similarly-accessible means?
<strains a bit>
I guess that one could run workload A, look at
/debugfs/tracing/trace_stat/functions changes, then run worklaod B, then
look at its /debugfs/tracing/trace_stat/functions changes, then somehow
glean some information about the differences between the effects of the two
workloads on the kernel. Or something.
But in this rather fake example and, I suspect, in many others, the result
will be less useful than using oprofile/etc in the same fashion.
next prev parent reply other threads:[~2009-03-21 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 4:37 [PATCH][GIT PULL] tracing: add function profiler Steven Rostedt
2009-03-21 11:26 ` Andrew Morton [this message]
2009-03-21 11:57 ` Peter Zijlstra
2009-03-21 14:12 ` Ingo Molnar
2009-03-21 15:50 ` Steven Rostedt
2009-03-21 16:26 ` Ingo Molnar
2009-03-21 15:46 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090321042633.1dfa536a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox