<HTML><HEAD><TITLE>Manpage of STAP</TITLE>
</HEAD><BODY>
<H1>STAP</H1>
-Section: User Commands (1)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: User Commands (1)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPEX</TITLE>
</HEAD><BODY>
<H1>STAPEX</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPFUNCS</TITLE>
</HEAD><BODY>
<H1>STAPFUNCS</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
<DL COMPACT>
<DT>kernel_string:string (addr:long)<DD>
Copy a 0-terminated string from kernel space at given address.
+<DT>kernel_string_n:string (addr:long, n:long)<DD>
+Similar with kernel_string, except that not more than n bytes are copied.
+Thus, if there are null bytes among the first n bytes, it is same as
+kernel_string(addr). If not, n bytes will be copied and a null byte will
+be padded to the end.
<DT>kernel_long:long (addr:long)<DD>
Copy a long from kernel space at given address.
<DT>kernel_int:long (addr:long)<DD>
<P>
</DL>
<A NAME="lbAH"> </A>
-<H3>CONTEXTINFO</H3>
+<H3>CONTEXT INFO</H3>
<DL COMPACT>
<DT>cpu:long ()<DD>
<P>
</DL>
<A NAME="lbAK"> </A>
+<H3>TASK</H3>
+
+<P>
+
+These functions return data about a task. They all require
+a task handle as input, such as the value return by task_current() or the variables
+prev_task and next_task in the scheduler.ctxswitch probe alias.
+<P>
+<DL COMPACT>
+<DT>task_current:long()<DD>
+Return the task_struct of the current process.
+<P>
+<DT>task_parent:long(task:long)<DD>
+Return the parent task_struct of the given task.
+<DT>task_state:long(task:long)<DD>
+Return the state of the given task, which can be one of the following:
+<P>
+<BR> TASK_RUNNING 0
+<BR> TASK_INTERRUPTIBLE 1
+<BR> TASK_UNINTERRUPTIBLE 2
+<BR> TASK_STOPPED 4
+<BR> TASK_TRACED 8
+<BR> EXIT_ZOMBIE 16
+<BR> EXIT_DEAD 32
+<P>
+<DT>task_execname:string(task:long)<DD>
+Return the name of the given task.
+<P>
+<DT>task_pid:long(task:long)<DD>
+Return the process id of the given task.
+<P>
+<DT>task_tid:long(task:long)<DD>
+Return the thread id of the given task.
+<P>
+<DT>task_gid:long(task:long)<DD>
+Return the group id of the given task.
+<P>
+<DT>task_egid:long(task:long)<DD>
+Return the effective group id of the given task.
+<P>
+<DT>task_uid:long(task:long)<DD>
+Return the user id of the given task.
+<P>
+<DT>task_euid:long(task:long)<DD>
+Return the effective user id of the given task.
+<P>
+<DT>task_prio:long(task:long)<DD>
+Return the priority of the given task.
+<P>
+<DT>task_nice:long(task:long)<DD>
+Return the nice value of the given task.
+<P>
+<DT>task_cpu:long(task:long)<DD>
+Return the scheduled cpu for the given task.
+<P>
+<DT>task_open_file_handles:long(task:long)<DD>
+Return the number of open file handles for the given task.
+<P>
+<DT>task_max_file_handles:long(task:long)<DD>
+Return the maximum number of file handles for the given task.
+<P>
+</DL>
+<A NAME="lbAL"> </A>
<H3>QUEUE_STATS</H3>
<P>
Return the average rate of requests per scale units of time.
<P>
</DL>
-<A NAME="lbAL"> </A>
+<A NAME="lbAM"> </A>
<H3>INDENT</H3>
<P>
<P>
</DL>
-<A NAME="lbAM"> </A>
+<A NAME="lbAN"> </A>
<H3>SYSTEM</H3>
<DL COMPACT>
when the current probe completes.
<P>
</DL>
-<A NAME="lbAN"> </A>
+<A NAME="lbAO"> </A>
<H3>NUMA</H3>
<DL COMPACT>
Return which node the given address belongs to in a NUMA system.
<P>
</DL>
-<A NAME="lbAO"> </A>
+<A NAME="lbAP"> </A>
<H3>CTIME</H3>
<DL COMPACT>
<P>
</DL>
-<A NAME="lbAP"> </A>
+<A NAME="lbAQ"> </A>
<H3>PERFMON</H3>
<DL COMPACT>
the handle being used for that event.
<P>
</DL>
-<A NAME="lbAQ"> </A>
+<A NAME="lbAR"> </A>
<H3>SOCKETS</H3>
These functions convert arguments in the socket tapset back and
Returns the string representation of the given message flags bit map.
<P>
</DL>
-<A NAME="lbAR"> </A>
+<A NAME="lbAS"> </A>
<H3>INET</H3>
These functions convert between network (big-endian) and host byte order, like their
<P>
<P>
</DL>
-<A NAME="lbAS"> </A>
+<A NAME="lbAT"> </A>
<H2>FILES</H2>
<P>
-<A NAME="lbAT"> </A>
+<A NAME="lbAU"> </A>
<H2>SEE ALSO</H2>
<I><A HREF="stap.1.html">stap</A></I>(1)
<DT><A HREF="#lbAE">CONVERSIONS</A><DD>
<DT><A HREF="#lbAF">STRING</A><DD>
<DT><A HREF="#lbAG">TIMESTAMP</A><DD>
-<DT><A HREF="#lbAH">CONTEXTINFO</A><DD>
+<DT><A HREF="#lbAH">CONTEXT INFO</A><DD>
<DT><A HREF="#lbAI">TARGET_SET</A><DD>
<DT><A HREF="#lbAJ">ERRNO</A><DD>
-<DT><A HREF="#lbAK">QUEUE_STATS</A><DD>
-<DT><A HREF="#lbAL">INDENT</A><DD>
-<DT><A HREF="#lbAM">SYSTEM</A><DD>
-<DT><A HREF="#lbAN">NUMA</A><DD>
-<DT><A HREF="#lbAO">CTIME</A><DD>
-<DT><A HREF="#lbAP">PERFMON</A><DD>
-<DT><A HREF="#lbAQ">SOCKETS</A><DD>
-<DT><A HREF="#lbAR">INET</A><DD>
+<DT><A HREF="#lbAK">TASK</A><DD>
+<DT><A HREF="#lbAL">QUEUE_STATS</A><DD>
+<DT><A HREF="#lbAM">INDENT</A><DD>
+<DT><A HREF="#lbAN">SYSTEM</A><DD>
+<DT><A HREF="#lbAO">NUMA</A><DD>
+<DT><A HREF="#lbAP">CTIME</A><DD>
+<DT><A HREF="#lbAQ">PERFMON</A><DD>
+<DT><A HREF="#lbAR">SOCKETS</A><DD>
+<DT><A HREF="#lbAS">INET</A><DD>
</DL>
-<DT><A HREF="#lbAS">FILES</A><DD>
-<DT><A HREF="#lbAT">SEE ALSO</A><DD>
+<DT><A HREF="#lbAT">FILES</A><DD>
+<DT><A HREF="#lbAU">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES</TITLE>
</HEAD><BODY>
<H1>STAPPROBES</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
passes down through all levels of alias/wildcard expansion.
<P>
These are all syntactically valid probe points:
+<P>
<BR>
If the order of execution among "begin" or "end" probes is significant,
then an optional sequence number may be provided:
+<P>
<BR>
</DL>
+<P>
The number N may be positive or negative. The probe handlers are run in
increasing order, and the order between handlers with the same sequence
number is unspecified. When "begin" or "end" are given without a
Intervals defined by the standard kernel "jiffies" timer may be used
to trigger probe handlers asynchronously. Two probe point variants
are supported by the translator:
+<P>
<BR>
</DL>
+<P>
The probe handler is run every N jiffies (a kernel-defined unit of
time, typically between 1 and 60 ms). If the "randomize" component is
given, a linearly distributed random value in the range [-M..+M] is
Alternatively, intervals may be specified in units of time.
There are two probe point variants similar to the jiffies timer:
+<P>
<BR>
</DL>
+<P>
Here, N and M are specified in milliseconds, but the full options for units
are seconds (s/sec), milliseconds (ms/msec), microseconds (us/usec),
nanoseconds (ns/nsec), and hertz (hz). Randomization is not supported for
Profiling timers are also available to provide probes that execute on all
CPUs at the rate of the system tick. This probe takes no parameters.
+<P>
<BR>
</DL>
+<P>
Full context information of the interrupted process is available, making
this probe suitable for a time-based sampling profiler.
<P>
<P>
Points in a kernel, which are identified by
-module, source file, line number, function name, C label name, or some
+module, source file, line number, function name, or some
combination of these.
<P>
variant places a probe at the exact spot, exposing those local variables
that are visible there.
+<P>
<BR>
</DL>
+<P>
In the above list, MPATTERN stands for a string literal that aims to
identify the loaded kernel module of interest. It may include "*", "[]",
and "?" wildcards. PATTERN stands for a string literal that
aims to identify a point in the program. It is made up of three
-parts. The first part is the name of a function, as would appear in
-the
+parts:
+<DL COMPACT>
+<DT>*<DD>
+The first part is the name of a function, as would appear in the
<I>nm</I>
program's output. This part may use the "*" and "?" wildcarding
-operators to match multiple names. The second part is optional, and
-begins with the "@" character. It is followed by a source file name
-wildcard pattern, such as
-<I>mm/slab*</I>.
-
+operators to match multiple names.
+<DT>*<DD>
+The second part is optional and begins with the "@" character.
+It is followed by the path to the source file containing the function,
+which may include a wildcard pattern, such as mm/slab*.
+In most cases, the path should be relative to the top of the
+linux source directory, although an absolute path may be necessary for some kernels.
+If a relative pathname doesn't work, try absolute.
+<DT>*<DD>
Finally, the third part is optional if the file name part was given,
and identifies the line number in the source file, preceded by a ":".
+</DL>
+<P>
+
As an alternative, PATTERN may be a numeric constant, indicating an
(module-relative or kernel-_stext-relative) address. In guru mode
only, absolute kernel addresses may be specified with the ".absolute"
filesystem is a pseudo-filesystem which is used an an interface to
kernel data structures. There are four probe point variants supported
by the translator:
+<P>
<BR>
</DL>
+<P>
<I>PATH</I>
is the file name (relative to /proc/systemtap/MODNAME) to be created.
<I>$value</I>,
like this:
+<P>
<BR>
<I>$value</I>,
like this:
+<P>
<BR>
on the processor to count the number of events occuring on the
processor. For more details on the performance monitoring events
available on a specific processor use the command perfmon2 command:
+<P>
<BR>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.IOSCHED</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.IOSCHED</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.NETDEV</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.NETDEV</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.NFS</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.NFS</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.NFSD</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.NFSD</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.PAGEFAULT</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.PAGEFAULT</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.PROCESS</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.PROCESS</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.RPC</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.RPC</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.SCSI</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.SCSI</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.SIGNAL</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.SIGNAL</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.SOCKET</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.SOCKET</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.TCP</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.TCP</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:06 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPPROBES.UDP</TITLE>
</HEAD><BODY>
<H1>STAPPROBES.UDP</H1>
-Section: File Formats (5)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: File Formats (5)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:06 GMT, October 18, 2007
</BODY>
</HTML>
<HTML><HEAD><TITLE>Manpage of STAPRUN</TITLE>
</HEAD><BODY>
<H1>STAPRUN</H1>
-Section: Maintenance Commands (8)<BR>Updated: 2007-10-11<BR><A HREF="#index">Index</A>
+Section: Maintenance Commands (8)<BR>Updated: 2007-10-18<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 17:18:18 GMT, October 11, 2007
+Time: 22:28:05 GMT, October 18, 2007
</BODY>
</HTML>