From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Tim Bird <tim.bird@am.sony.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Li Zefan <lizf@cn.fujitsu.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] ftrace - add function_duration tracer
Date: Thu, 10 Dec 2009 17:52:38 +0100 [thread overview]
Message-ID: <20091210165238.GA13775@elte.hu> (raw)
In-Reply-To: <1260462132.2146.198.camel@gandalf.stny.rr.com>
* Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 2009-12-10 at 16:38 +0100, Ingo Molnar wrote:
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > The correctly designed way to express latency tracing is via a new
> > generic event primitive: connecting two events to a maximum value.
> >
> > That can be done without forcibly tying it and limiting it to a specific
> > 'latency tracing' variant as the /debug/tracing/ bits of ftrace do it
> > right now.
>
> Sure, when we have that, then we can remove the plugin (and then all
> plugins when there are superior alternatives).
Ok, that's good to hear.
> > Just off the top of my head we want to be able to trace:
> >
> > - max irq service latencies for a given IRQ
> > - max block IO completion latencies for a app
> > - max TLB flush latencies in the system
> > - max sys_open() latencies in a task
> > - max fork()/exit() latencies in a workload
> > - max scheduling latencies on a given CPU
> > - max page fault latencies
> > - max wakeup latencies for a given task
> > - max memory allocation latencies
> >
> > - ... and dozens and dozens of other things where there's a "start"
> > and a "stop" event and where we want to measure the time between
> > them.
>
> Note, we also need a way to "store" the max. The fly recorder method
> is not good enough.
Yeah. What we want in the larger scheme of things is to have operations
connected to events. One such operation would be "start measuring max",
another would be "stop measuring the max".
[ Whether the max is intrinsic to the context structure, or is perhaps
some _third_ event (so the max can be recovered by observing that
event) is a detail. ]
Note that other operations make sense as well, such as:
- if event X happens then enable event Y
- if event X happens then disable event Y
A popular use of that would be to enable the function events on the
'start' event of a latency measurement, and disable function events on
the 'stop' event.
Yet another use would be to enable cache miss events when 'entering' a
specific function event, and disable cache miss counting on 'exiting'
that function. (this would be an event of the function graph tracer)
This would allow the precise cache miss profiling of a given function
and all its sub-functions - and only of that function.
Note that the existing filter engine functionality connects in a natural
way here as well: it can already be used to limit events and thus can be
used to further shape the behavior of tracing, runtime.
Other interesting event operations are possible as well. Key is to
expose this via the unified interface and to stop adding new
functionality-limited crap via the ftrace plugin infrastructure - it's
clearly not suitable for this purpose. We now have found how to do these
things properly and cleanly.
And the thing is, _you_ implemented unified ftrace events, all i'm
asking you is to realize the power of them and to stop adding new
ftrace-plugins [which are crap in comparison] and contcentrate on
exposing new tracing functionality via unified ftrace events, ok? ;-)
Ingo
next prev parent reply other threads:[~2009-12-10 16:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 22:40 [PATCH 2/4] ftrace - add function_duration tracer Tim Bird
2009-12-10 7:08 ` Ingo Molnar
2009-12-10 12:03 ` Frederic Weisbecker
2009-12-10 14:11 ` Ingo Molnar
2009-12-10 14:53 ` Steven Rostedt
2009-12-10 15:38 ` Ingo Molnar
2009-12-10 16:22 ` Steven Rostedt
2009-12-10 16:52 ` Ingo Molnar [this message]
2009-12-10 17:16 ` Steven Rostedt
2009-12-10 17:28 ` Frank Ch. Eigler
2009-12-10 17:57 ` Ingo Molnar
2009-12-10 18:04 ` Frank Ch. Eigler
2009-12-10 18:35 ` Ingo Molnar
2009-12-10 18:50 ` Frank Ch. Eigler
2009-12-10 20:14 ` Ingo Molnar
2009-12-10 21:30 ` Frank Ch. Eigler
2009-12-10 14:29 ` Steven Rostedt
2009-12-10 16:16 ` Ingo Molnar
2009-12-10 20:23 ` Frederic Weisbecker
2009-12-10 21:55 ` Steven Rostedt
2009-12-10 22:40 ` Frederic Weisbecker
2009-12-10 21:13 ` Tim Bird
2009-12-10 22:04 ` Steven Rostedt
2009-12-10 22:26 ` Tim Bird
2009-12-10 22:36 ` Tim Bird
2009-12-10 23:47 ` 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=20091210165238.GA13775@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tim.bird@am.sony.com \
/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