Ce contenu n'est pas disponible dans la langue sélectionnée.
3.6. Tapsets
Tapsets are scripts that form a library of pre-written probes and functions to be used in SystemTap scripts. When a user runs a SystemTap script, SystemTap checks the script's probe events and handlers against the tapset library; SystemTap then loads the corresponding probes and functions before translating the script to C (see Section 3.1, “Architecture” for information on what transpires in a SystemTap session).
Like SystemTap scripts, tapsets use the file name extension
.stp
. The standard library of tapsets is located in the /usr/share/systemtap/tapset/
directory by default. However, unlike SystemTap scripts, tapsets are not meant for direct execution; rather, they constitute the library from which other scripts can pull definitions.
The tapset library is an abstraction layer designed to make it easier for users to define events and functions. Tapsets provide useful aliases for functions that users may want to specify as an event; knowing the proper alias to use is, for the most part, easier than remembering specific kernel functions that might vary between kernel versions.
Several handlers and functions in Section 3.2.1, “Event” and SystemTap Functions are defined in tapsets. For example,
thread_indent()
is defined in indent.stp
.