From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
"Ingo Molnar" <mingo@elte.hu>,
linux-kernel@vger.kernel.org, systemtap@sources.redhat.com
Subject: Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel lock tracer
Date: Fri, 24 Oct 2008 17:26:53 +0200 [thread overview]
Message-ID: <c62985530810240826l2e025e94i51fdfd0fc70b0449@mail.gmail.com> (raw)
In-Reply-To: <20081024150239.GB20768@redhat.com>
2008/10/24 Frank Ch. Eigler <fche@redhat.com>:
> That's what we do with the systemtap script, where kernel "handling"
> consists of "running the machine code".
>
>> But have the user application interface be very simple, and perhaps
>> even use perl or python.
>
> perl and python are pretty big procedural languages, and are not
> easily compiled down to compact & quickly executed machine code. (I
> take it no one is suggesting including a perl or python VM in the
> kernel.) Plus, debugger-flavoured event-handling programming style
> would not look nearly as compact in perl/python as in systemtap, which
> is small and domain-specific.
>
> - FChE
>
Actually what I thought is a style like this (Python like):
probe = Systemtap.probeFunc("lock_kernel")
probe.captureUtime("utime"))
probe.captureBacktrace("trace")
probe.trace()
For an obvious set of batch work like that, that could be possible,
perhaps even easy
to implement an Api...
When the object calls trace(), the userspace Systemtap analyse the list
of work to do and then translate into commands in kernel space.
And the script could wait for events and then do its own processing
with the captured events
(do some operations on delays, on output....).
for event in probe.getEvent(): #blocking
print event["utime"]
trace = event["trace"] #Systemtap.trace object with specific
fields and a default string repr
print trace
It would be interpreted by Python itself, and you just have to capture
commands and works
sent through Api. Then, when the kernel has something to give, you
just have to place it in the
appripriate object and transmit it to the script which is waiting.
Processing and output with the data are done by the python script.
So actually, the python script only needs to ask you what data to
capture. It's its own responsability to
do wathever it wants with.
What do you think?
next prev parent reply other threads:[~2008-10-24 15:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-11 20:22 Frederic Weisbecker
2008-10-21 12:28 ` Frédéric Weisbecker
2008-10-21 12:33 ` Ingo Molnar
2008-10-21 12:42 ` Frédéric Weisbecker
2008-10-23 18:15 ` Frank Ch. Eigler
2008-10-24 13:43 ` Frédéric Weisbecker
2008-10-24 14:37 ` Frank Ch. Eigler
2008-10-24 14:47 ` Steven Rostedt
2008-10-24 15:02 ` Frank Ch. Eigler
2008-10-24 15:26 ` Frédéric Weisbecker [this message]
2008-10-24 19:29 ` Frank Ch. Eigler
2008-10-29 5:46 ` Tom Zanussi
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=c62985530810240826l2e025e94i51fdfd0fc70b0449@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=fche@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=systemtap@sources.redhat.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®