From: Ingo Molnar <mingo@elte.hu>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
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 19:35:08 +0100 [thread overview]
Message-ID: <20091210183508.GB17986@elte.hu> (raw)
In-Reply-To: <20091210180412.GB30999@redhat.com>
* Frank Ch. Eigler <fche@redhat.com> wrote:
> Hi -
>
> > > FWIW, those who want to collect such measurements today can do so
> > > with a few lines of systemtap script for each of the above.
> >
> > Well, i dont think stap can do workload instrumentation. It can do
> > system-wide (and user local / task local) - but can it do per task
> > hierarchies?
>
> It can track the evolution of task hierarchies by listening to process
> forking events, and filter other kernel/user events according to
> then-current hierarchy data. One primitive implementation of this is
> in the target_set.stp tapset, but it's easy to script up other
> policies.
target_set.stp is not really adequate. Have you actually _tried_ to use
it on something real like hackbench, which runs thousands (or tens of
thousands) of tasks? You'll soon find that associative arrays are not
really adequate for that ...
Another problem i can see is that target_set.stp starts with:
global _target_set # map: target-set-pid -> ancestor-pid
see that 'global' thing? It's a system global variable - i.e. you cannot
measure two task hierarchies at once.
> > Also, i dont think stap supports proper separation of per workload
> > measurements either. I.e. can you write a script that will work
> > properly even if multiple monitoring tools are running, each trying
> > to measure latencies?
>
> Sure, always has. You can run many scripts concurrently, each with
> its own internal state. (Overheads accumulate, sadly & naturally.)
To measure latencies you need two probes, a start and a stop one. How do
you define a local variable that is visible to those two probes? You
have to create a global variable - but that will/can clash with other
instances.
( Also, you dont offer per application channels/state from the same
script. Each app has to define their own probes, duplicating the
script and increasing probe chaining overhead. )
The whole state sharing and eventing model of SystemTap is poorly
thought out.
> > Also, i personally find built-in kernel functionality more trustable
> > than dynamically built stap kernel modules that get inserted.
>
> I understand. In the absence of a suitable bytecode engine in the
> kernel, this was the only practical way to do everything we needed.
You seem to be under the mistaken assumption that your course of action
with SystemTap is somehow limited by what is available (or not) in the
upstream kernel.
In reality you can implement anything you want (in fact you did
precisely that - _against_ repeated advice of upstream kernel
developers), and if it's good, it will be merged - simple as that. It
might take years, but once you deliver the proof (which comes in form of
lots of happy users/developers), it happens.
So saying 'but the kernel does not have a bytecode interpreter' (or any
other excuse) is pretty lame.
Ingo
next prev parent reply other threads:[~2009-12-10 18:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 22:40 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
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 [this message]
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=20091210183508.GB17986@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fche@redhat.com \
--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
all inboxes | Powered by JetHome®