<li><a href="locks/bkl_stats.stp">locks/bkl_stats.stp</a> - Per Process Statistics on Big Kernel Lock (BKL) Use<br>
keywords: <a href="keyword-index.html#LOCKING">LOCKING</a> <br>
<p>The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent in holding the lock for each of the processes.<p><font size="-2"><pre># stap bkl_stats.stp -c "sleep 0.2"</pre></font></p></li>
+<li><a href="memory/hw_watch_addr.stp">memory/hw_watch_addr.stp</a> - Watch access to a kernel address using breakpoint hardware<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#WATCHPOINT">WATCHPOINT</a> <br>
+<p>The script will watch accesses to a single kernel address and prints a traceback each time the address is accessed. This script needs to be run as root to allow access to the breakpoint hardware.<p><font size="-2"><pre># stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
+-c "sleep 1"</pre></font></p></li>
+<li><a href="memory/hw_watch_sym.stp">memory/hw_watch_sym.stp</a> - Watch to a kernel symbol using breakpoint hardware<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#WATCHPOINT">WATCHPOINT</a> <br>
+<p>The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware.<p><font size="-2"><pre># stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"</pre></font></p></li>
<li><a href="memory/kmalloc-top">memory/kmalloc-top</a> - Show Paths to Kernel Malloc (kmalloc) Invocations<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be filtered to print only the first N stack traces (-t), stack traces with a minimum counts (-m), or exclude certain stack traces (-e).<p><font size="-2"><pre># ./kmalloc-top -c "sleep 0.2"</pre></font></p></li>
# stap bkl_stats.stp -c "sleep 0.2"
+memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware
+keywords: memory watchpoint
+
+ The script will watch accesses to a single kernel address and prints
+ a traceback each time the address is accessed. This script needs to
+ be run as root to allow access to the breakpoint hardware.
+
+ # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
+ -c "sleep 1"
+
+
+memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware
+keywords: memory watchpoint
+
+ The script will watch accesses to the starting address of a single
+ kernel symbol and prints a traceback each time the symbol is
+ accessed. This script needs to be run as root to allow access to the
+ breakpoint hardware.
+
+ # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"
+
+
memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations
keywords: memory
</ul>
<h2>Examples by Keyword</h2>
-<p><tt><a href="#ALLOCATOR">ALLOCATOR</a> <a href="#AUTOFS">AUTOFS</a> <a href="#BACKTRACE">BACKTRACE</a> <a href="#BUFFER">BUFFER</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#COUNTER">COUNTER</a> <a href="#CPU">CPU</a> <a href="#DEVICE">DEVICE</a> <a href="#DISK">DISK</a> <a href="#EVENT">EVENT</a> <a href="#FILES">FILES</a> <a href="#FILESYSTEM">FILESYSTEM</a> <a href="#FORMAT">FORMAT</a> <a href="#FREE">FREE</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#HACK">HACK</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#MEMORY">MEMORY</a> <a href="#MONITORING">MONITORING</a> <a href="#NETWORK">NETWORK</a> <a href="#NFS">NFS</a> <a href="#NUMA">NUMA</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PID">PID</a> <a href="#PROCESS">PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SCSI">SCSI</a> <a href="#SECURITY">SECURITY</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLAB">SLAB</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#STATISTICS">STATISTICS</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TCP">TCP</a> <a href="#TID">TID</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRACEPOINT">TRACEPOINT</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#TTY">TTY</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p>
+<p><tt><a href="#ALLOCATOR">ALLOCATOR</a> <a href="#AUTOFS">AUTOFS</a> <a href="#BACKTRACE">BACKTRACE</a> <a href="#BUFFER">BUFFER</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#COUNTER">COUNTER</a> <a href="#CPU">CPU</a> <a href="#DEVICE">DEVICE</a> <a href="#DISK">DISK</a> <a href="#EVENT">EVENT</a> <a href="#FILES">FILES</a> <a href="#FILESYSTEM">FILESYSTEM</a> <a href="#FORMAT">FORMAT</a> <a href="#FREE">FREE</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#HACK">HACK</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#MEMORY">MEMORY</a> <a href="#MONITORING">MONITORING</a> <a href="#NETWORK">NETWORK</a> <a href="#NFS">NFS</a> <a href="#NUMA">NUMA</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PID">PID</a> <a href="#PROCESS">PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SCSI">SCSI</a> <a href="#SECURITY">SECURITY</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLAB">SLAB</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#STATISTICS">STATISTICS</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TCP">TCP</a> <a href="#TID">TID</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRACEPOINT">TRACEPOINT</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#TTY">TTY</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WATCHPOINT">WATCHPOINT</a> <a href="#WRITE">WRITE</a> </tt></p>
<h3><a name="ALLOCATOR">ALLOCATOR</a></h3>
<ul>
<li><a href="memory/vm.tracepoints.stp">memory/vm.tracepoints.stp</a> - Collect slab allocation statistics<br>
<li><a href="general/sizeof.stp">general/sizeof.stp</a> - Print the size of a C type.<br>
keywords: <a href="keyword-index.html#STATISTICS">STATISTICS</a> <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#SIMPLE">SIMPLE</a> <br>
<p>This script prints the size of a type, based on dwarf debuginfo for any kernel or userspace module, or trial-compilation of a given header file name.<p><font size="-2"><pre># stap sizeof.stp FILE '</usr/include/stdio.h>'</pre></font></p></li>
+<li><a href="memory/hw_watch_addr.stp">memory/hw_watch_addr.stp</a> - Watch access to a kernel address using breakpoint hardware<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#WATCHPOINT">WATCHPOINT</a> <br>
+<p>The script will watch accesses to a single kernel address and prints a traceback each time the address is accessed. This script needs to be run as root to allow access to the breakpoint hardware.<p><font size="-2"><pre># stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
+-c "sleep 1"</pre></font></p></li>
+<li><a href="memory/hw_watch_sym.stp">memory/hw_watch_sym.stp</a> - Watch to a kernel symbol using breakpoint hardware<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#WATCHPOINT">WATCHPOINT</a> <br>
+<p>The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware.<p><font size="-2"><pre># stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"</pre></font></p></li>
<li><a href="memory/kmalloc-top">memory/kmalloc-top</a> - Show Paths to Kernel Malloc (kmalloc) Invocations<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be filtered to print only the first N stack traces (-t), stack traces with a minimum counts (-m), or exclude certain stack traces (-e).<p><font size="-2"><pre># ./kmalloc-top -c "sleep 0.2"</pre></font></p></li>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#WAIT4">WAIT4</a> <br>
<p>The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in parentheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".<p><font size="-2"><pre># stap wait4time.stp -c "sleep 0.2"</pre></font></p></li>
</ul>
+<h3><a name="WATCHPOINT">WATCHPOINT</a></h3>
+<ul>
+<li><a href="memory/hw_watch_addr.stp">memory/hw_watch_addr.stp</a> - Watch access to a kernel address using breakpoint hardware<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#WATCHPOINT">WATCHPOINT</a> <br>
+<p>The script will watch accesses to a single kernel address and prints a traceback each time the address is accessed. This script needs to be run as root to allow access to the breakpoint hardware.<p><font size="-2"><pre># stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
+-c "sleep 1"</pre></font></p></li>
+<li><a href="memory/hw_watch_sym.stp">memory/hw_watch_sym.stp</a> - Watch to a kernel symbol using breakpoint hardware<br>
+keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#WATCHPOINT">WATCHPOINT</a> <br>
+<p>The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware.<p><font size="-2"><pre># stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"</pre></font></p></li>
+</ul>
<h3><a name="WRITE">WRITE</a></h3>
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
# stap sizeof.stp FILE '</usr/include/stdio.h>'
+memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware
+keywords: memory watchpoint
+
+ The script will watch accesses to a single kernel address and prints
+ a traceback each time the address is accessed. This script needs to
+ be run as root to allow access to the breakpoint hardware.
+
+ # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
+ -c "sleep 1"
+
+
+memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware
+keywords: memory watchpoint
+
+ The script will watch accesses to the starting address of a single
+ kernel symbol and prints a traceback each time the symbol is
+ accessed. This script needs to be run as root to allow access to the
+ breakpoint hardware.
+
+ # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"
+
+
memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations
keywords: memory
# stap wait4time.stp -c "sleep 0.2"
+= WATCHPOINT =
+
+memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware
+keywords: memory watchpoint
+
+ The script will watch accesses to a single kernel address and prints
+ a traceback each time the address is accessed. This script needs to
+ be run as root to allow access to the breakpoint hardware.
+
+ # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
+ -c "sleep 1"
+
+
+memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware
+keywords: memory watchpoint
+
+ The script will watch accesses to the starting address of a single
+ kernel symbol and prints a traceback each time the symbol is
+ accessed. This script needs to be run as root to allow access to the
+ breakpoint hardware.
+
+ # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"
+
+
= WRITE =
io/iotime.stp - Trace Time Spent in Read and Write for Files