From: Randy Dunlap <randy.dunlap@oracle.com>
To: Elias Oltmanns <eo@nebensachen.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Clark Williams <clark.williams@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jon Masters <jonathan@jonmasters.org>
Subject: Re: [PATCH] ftrace: Documentation
Date: Thu, 10 Jul 2008 13:28:32 -0700 [thread overview]
Message-ID: <20080710132832.38cc5048.randy.dunlap@oracle.com> (raw)
In-Reply-To: <87zlop7bp6.fsf@denkblock.local>
On Thu, 10 Jul 2008 21:59:01 +0200 Elias Oltmanns wrote:
> Steven Rostedt <rostedt@goodmis.org> wrote:
> > This is the long awaited ftrace.txt. It explains in quite detail how to
> > use ftrace and the various tracers.
> >
> > Signed-off-by: Steven Rostedt <srostedt@redhat.com>
>
> Exactly what I've just been looking for. Very nice.
>
> As I read through this enlightening peace, I took the liberty to make
> some comments where I thought I'd spotted some mistake. Note that I'm
> not a native English speaker nor familiar with all the terminology.
> Also, I didn't exactly scratch my head when I had a bad feeling about
> something but couldn't come up with a better idea straight away.
> Basically, I just skimmed through the lines because im interested in the
> matter.
>
> Anyway, here it goes:
[I'm dropping good comments, just making more comments.]
> > + set_ftrace_notrace: This has the opposite effect that
> > + set_ftrace_filter has. Any function that is added
> > + here will not be traced. If a function exists
> > + in both set_ftrace_filter and set_ftrace_notrace
>
> (comma)
>
> > + the function will _not_ bet traced.
be
> > + stacktrace - This is one of the options that changes the trace itself.
>
> change
changes :) [subject is "This", singular]
>
> > + When a trace is recorded, so is the stack of functions.
> > + This allows for back traces of trace sites.
> > +
> > +sched_switch
> > +------------
> > +
> > +This tracer simply records schedule switches. Here's an example
> > +on how to implement it.
of
>
> use?
>
> [...]
> > +Here we traced a 50 microsecond latency. But we also see all the
> > +functions that were called during that time. Note that enabling
>
> by enabling?
>
> > +function tracing we endure an added overhead. This overhead may
>
> (comma)
>
> > +extend the latency times. But never the less, this trace has provided
nevertheless,
> > +some very helpful debugging.
>
> debugging information?
>
> > +
> > +
> > +preemptoff
> > +----------
> > +
> > +When preemption is disabled we may be able to receive interrupts but
>
> (comma)
>
> > +the task can not be preempted and a higher priority task must wait
cannot
> > +for preemption to be enabled again before it can preempt a lower
> > +priority task.
> > +
> > +The preemptoff tracer traces the places that disables preemption.
>
> disable
>
> > +Like the irqsoff, it records the maximum latency that preemption
> > +was disabled. The control of preemptoff is much like the irqsoff.
> > +Since this tracer only deals with RT tasks, we will run this slightly
> > +different than we did with the previous tracers. Instead of performing
differently
> > +an 'ls' we will run 'sleep 1' under 'chrt' which changes the
>
> (comma)
>
> > +priority of the task.
> [...]
> > +Where as the setting of the NEED_RESCHED bit happens on the
Whereas
> > +task's stack. But because we are in a hard interrupt, the test
^? That's not a complete sentence.
> > +is with the interrupts stack which has that to be false. We don't
interrupt
>
> ^^^^
> Superfluous that? Don't understand that sentence.
>
> > +see the 'N' until we switch back to the task's stack.
> [...]
> > +When dynamic ftrace is initialized, it calls kstop_machine to make it
^^ what is "it"?
> > +act like a uniprocessor so that it can freely modify code without
> > +worrying about other processors executing that same code. At
> > +initialization, the mcount calls are change to call a "record_ip"
>
> changed
>
> > +function. After this, the first time a kernel function is called,
> > +it has the calling address saved in a hash table.
> [...]
> > +Two files that contain to the enabling and disabling of recorded
> > +functions are:
>
> Can this be expressed somewhat differently?
or drop "to".
>
> > +
> > + set_ftrace_filter
> > +
> > +and
> > +
> > + set_ftrace_notrace
> > +
> > +A list of available functions that you can add to this files is listed
>
> these
>
> > +in:
> > +
> > + available_filter_functions
> [...]
> > +Perhaps this isn't enough. The filters also allow simple wild cards.
> > +Only the following is currently available
Only the following are currently available:
> > +
> > + <match>* - will match functions that begins with <match>
>
> begin
>
> > + *<match> - will match functions that end with <match>
> > + *<match>* - will match functions that have <match> in it
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
next prev parent reply other threads:[~2008-07-10 20:30 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 16:46 Steven Rostedt
2008-07-10 18:16 ` Jon Masters
2008-07-10 19:59 ` Elias Oltmanns
2008-07-10 20:28 ` Randy Dunlap [this message]
2008-07-11 0:02 ` Steven Rostedt
2008-07-11 0:37 ` [PATCH -v2] " Steven Rostedt
2008-07-11 19:16 ` Andrew Morton
2008-07-11 20:59 ` Steven Rostedt
2008-07-11 22:37 ` Andrew Morton
2008-07-11 23:16 ` Eric W. Biederman
2008-07-15 1:08 ` Steven Rostedt
2008-07-15 1:26 ` Eric W. Biederman
2008-07-15 1:43 ` Steven Rostedt
2008-07-15 1:59 ` Eric W. Biederman
2008-07-15 2:18 ` Steven Rostedt
2008-07-15 2:41 ` Eric W. Biederman
2008-07-15 3:05 ` Steven Rostedt
2008-07-15 3:29 ` Eric W. Biederman
2008-07-12 10:16 ` John Kacur
2008-07-16 10:10 ` Florian Weimer
2008-07-16 11:39 ` Steven Rostedt
2008-07-17 14:19 ` Christoph Hellwig
2008-07-18 2:47 ` Steven Rostedt
2008-07-20 11:16 ` Christoph Hellwig
2008-07-10 23:55 ` [PATCH] " Steven Rostedt
2008-07-11 7:51 ` Elias Oltmanns
2008-07-12 12:49 ` Abhishek Sagar
2008-07-15 14:39 ` Steven Rostedt
2008-07-15 15:33 ` Abhishek Sagar
2008-07-14 9:38 ` Peter Zijlstra
2008-07-14 18:02 ` David Teigland
2008-07-14 19:59 ` 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=20080710132832.38cc5048.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=clark.williams@gmail.com \
--cc=eo@nebensachen.de \
--cc=jonathan@jonmasters.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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
Powered by JetHome