Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel lock tracer

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frédéric Weisbecker
Date: Friday, October 24, 2008 - 8:26 am

2008/10/24 Frank Ch. Eigler <fche@redhat.com>:

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?
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 5/5] tracing/ftrace: Introduce the big kernel lock ..., Frederic Weisbecker, (Sat Oct 11, 1:22 pm)
Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel l ..., Frédéric Weisbecker, (Tue Oct 21, 5:28 am)
Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel l ..., Frédéric Weisbecker, (Tue Oct 21, 5:42 am)
Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel l ..., Frank Ch. Eigler, (Thu Oct 23, 11:15 am)
Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel l ..., Frédéric Weisbecker, (Fri Oct 24, 6:43 am)
Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel l ..., Frédéric Weisbecker, (Fri Oct 24, 8:26 am)
Re: [PATCH 5/5] tracing/ftrace: Introduce the big kernel l ..., Frank Ch. Eigler, (Fri Oct 24, 12:29 pm)