Hi -
On Fri, Oct 24, 2008 at 05:26:53PM +0200, Frédéric Weisbecker wrote:
There comes a point not too far beyond this example where one may want
to capture functions of values; filter; perform loops/conditionals;
refer to variables/arrays. Coding that logic this way would be so
clumsy as to take away any charm of working in python.
This is too gets impractical. If the only event handler code is
general python, it can't practically be executed within the kernel.
So we're then talking about a python script consuming trace data
streamed in. We lose:
- capability to take immediate action upon event occurrence
- any claim to good performance (~microsecond event handling)
- the natural coupling between events and their handlers
- the ability to statically analyze the entire instrumentation,
to optimize locking, data encoding
Now, one may imagine using this sort of thing as a *wrapper* around
plain systemtap: where the python libraries generate stylized
systemtap code that emits data in a form that the later "getEvent"
routine can decode again and act upon.
Several people have written shell, perl, even awk scripts scripts to
generate systemtap code for particular special purposes. So one can
hide the script language as an implementation detail of a higher level
tool. It's not a substitute though.
- FChE
--