This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Some notes on translation


Tom Zanussi writes:
 > Hi,
 > 
 > I've been thinking about what work needs to be done on the user side
 > of systemtap, more specifically about things that correspond to the
 > translation phase and bits of the execution and output phases.  To

What I'd like to do is start implementing or at least prototyping some
of this stuff, but it would be good to know first if anyone else is
working on any of these things yet.  I missed the first part of the
systemtap call this morning, so I didn't get to hear about any status
on things like the runtime library, which I'd like to start using (and
which I'd be happy to add things to if needed).

What I'm thinking of doing is hand-coding a functional kprobe handler
(not using jprobes) that would look something like what would be
output from the translation phase, probably a variation on one of the
probes I outlined here.  It would use dwarf2 information to access the
probed function parameters (I'd have to do some reading of the dwarf2
spec but it shouldn't be a big deal to do something simple like figure
out where an int parameter is for instance), and use whatever's
available (or easy to add) from the runtime library to do something
useful in the handler.  The boilerplate probe
registration/deregistration code would be auto-generated.  I would
also implement the kernel->user/user->kernel netlink protocol and API
- since I've already written code to do similar things, this is
relatively low-hanging fruit - and would use it to print() from the
probe and have the user space program request and print data items
from the probe.  I'd also create a userspace library called taplib
which I'd stick the userside API implementation into.  Finally, I'd
write a simple systemtap command that just hangs around printing
whatever it gets from the netlink socket and requesting and printing
the results when Control-C is pressed to end the session.

I don't know if it makes sense to try using the 'toy parser' at this
point - does it output a syntax tree or something that could be used
to generate code?  It doesn't really matter - for the purposes of this
code, I can just pretend the starting point came from a parser or
some previous stage.


Thanks,

Tom




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]