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: What is a tapset?


Jim Keniston <jkenisto@us.ibm.com> writes:

> [...]

(Oops, I meant to credit jkenisto within the list of embedded-C
inspirations.)


> [...]
> > I thought joining the two concepts [aliases & prologues] made some
> > sense.  If prologues were a separately declared widget without a
> > distinct name, then the user would not have a marker in the script
> > source that tells apart the case where a prologue is being pulled
> > in vs. one where one's not.

> Since we're trying to be "safe," I assume the author/user of an
> end-user script will be able to specify which tapset (set of predefined
> probepoints+prologues) his script refers to.   [...]

You mean via an explicit "use" or something?  I guess that may be
possible, but it goes against the philosophy of implicit but
unambiguous mechanisms.


> My concern is that the standard probe definition (e.g.,
> kernel.function("foo")) may be a perfectly satisfactory handle for
> the probepoint, and we shouldn't HAVE to invent an alias for it just
> because we also want to provide a prologue.

But similarly, the user shouldn't HAVE to include a specific
"use tapset name" directive, just to get a probe point variant
with or without an implicit prologue.


> [...]
> Not one that anyone has bought into, but we're creative.  I suggested
> the ability to name handlers some time ago.  [...]

Interesting ideas.

> Then a user could refer to that handler as (say)
> kernel.syscall("read"):trace instead of having to write his own
> handler to trace that function.

This is not that different from defining an ordinary (nested) alias:

alias kernel.syscall("read") = ....
alias kernel.syscall("read").trace = kernel.syscall("read") { print ... }

> You might refer to all handlers named "trace"
> for all system-call entry points as kernel.syscall(*).entry:trace. 

Depending on wildcard matching mechanisms, this could work with
the existing alias mechanism:

probe kernel.syscall("*").trace { /* empty */ }


> [...]
> This syntax could be used in the command line ("Enable the following
> predefined handlers") on in an .stp file  [...]

The command line equivalent could be:

stap -e 'probe kernel.syscall("*").trace {}'

If such empty probe handler bodies become commonplace, we could
teach the parser to make the body optional.


- FChE


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