summaryrefslogtreecommitdiffstats
path: root/SystemTap_Beginners_Guide/understanding-tapsets.html
blob: c203741f3e37d2b14301769bc0505958689e559b (plain) (blame)
1 2 3 4 5 6 7 8 9 10 11 
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.6. Tapsets</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="arrayops-aggregates.html" title="3.5.7. Computing for Statistical Aggregates" /><link rel="next" href="userspace-probing.html" title="Chapter 4. User-space Probing" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-aggregates.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="userspace-probing.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="understanding-tapsets"></a>3.6. Tapsets</h2></div></div></div><a id="idm47748176328160" class="indexterm"></a><div class="para"> <em class="firstterm">Tapsets</em> 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 (refer to <a class="xref" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Section 3.1, “Architecture”</a> for information on what transpires in a SystemTap session). </div><div class="para">	Like SystemTap scripts, tapsets use the file name extension <code class="filename">.stp</code>. The standard library of tapsets is located in <code class="filename">/usr/share/systemtap/tapset/</code> 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. </div><div class="para">	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. </div><div class="para">	Several handlers and functions in <a class="xref" href="scripts.html#systemtapscript-events">Section 3.2.1, “Event”</a> and <a class="xref" href="systemtapscript-handler.html#systemtapscript-functions">SystemTap Functions</a> are defined in tapsets. For example, <code class="command">thread_indent()</code> is defined in <code class="filename">indent.stp</code>. </div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="arrayops-aggregates.html"><strong>Prev</strong>3.5.7. Computing for Statistical Aggregates</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="userspace-probing.html"><strong>Next</strong>Chapter 4. User-space Probing</a></li></ul></body></html>