This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
what is a tapset? [RE: Skeleton detailed design document]
- From: "Chen, Brad" <brad dot chen at intel dot com>
- To: "Vara Prasad" <prasadav at us dot ibm dot com>
- Cc: <systemtap at sources dot redhat dot com>
- Date: Fri, 1 Apr 2005 12:18:47 -0800
- Subject: what is a tapset? [RE: Skeleton detailed design document]
Looking this over the draft paper, and thinking about Frank's
note concerning script libraries, I started thinking about
the first figure suggested in the draft. See my ASCII art
below. Perhaps this is overly simplistic; is any of this
incorrect? What parts are missing?
===========================================================
INPUT: script
|
v
TOOLS: elaborator -> compiler -> ld -> mytap.ko
^ ^ ^
| | |
tapset defns | systemtap libs
| tapset libs
| kernel libs
|
/usr/include/systemtap/
/usr/include/systemtap/tapset/
kernel symbolic information
EXECUTION: insmod("mytap.ko") -> [kernel]
[kjr]probes + trap handler
systemtap runtime in kernel [needed?]
user-level data handler
===========================================================
Question: Can two taps "mytap1.ko" and "mytap2.ko" be loaded
in the kernel at the same time? If so, do they need to share
anything besides kprobes? If they do, does the shared part
need to be in the kernel instead of being linked statically
into the ko? Maybe we started this discussion this morning
already...
Other tapset design questions:
- Do the tapset libraries need to be built with the kernel?
[yes; they will reference kernel symbols that must be
resolved statically]
- I believe kernel symbolic info will be needed during the
compile of the elaborated script to deal with kernel data.
- Can a script refer directly to a kernel code symbol,
or can it only do so via a tapset? It might be nice if
jprobes were responsible for most/all resolution of kernel
symbolic info.
- Systemtap scripts ought generally to be portable. Is there
any hope of making a mytap.ko that is portable across kernel
builds and configurations? Is this an appropriate goal?
- The above flow suggests that a tapset consists of three
pieces:
- definitions for the elaborator. This would have
to define everything the elaborator would need
to know to translate a script
- include files. APIs for the tapset's library as well
as possibly constants etc.
- a tapset library. Code to initialize the tapset and
implement the taps. Some tapsets will use kprobes
directly; others might only reference other tapsets.
Is this consistent with what other folks are thinking?
I'm imaging that the script libraries described by Frank
might actually compile into a tapset library.
Brad
-----Original Message-----
From: systemtap-owner@sources.redhat.com
[mailto:systemtap-owner@sources.redhat.com] On Behalf Of Vara Prasad
Sent: Thursday, March 31, 2005 12:48 AM
To: systemtap@sources.redhat.com
Subject: Skeleton detailed design document
Frank had started an initial design document but we have not done any
updates to it after that.
I have taken Frank's document added few more sections that i think are
relevant based on the
discussions we have been having. Once we think we got the basic sections
i will commit that
skeleton to the cvs. I am thinking people who are driving the individual
sections can fill them
up and commit to CVS so we will have more complete design document.
Please let me know your thoughts on the attached Linux text document.
If people prefer inline let me know i can make it inline.