summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2009-11-18 17:59:24 +0800
committerWenji Huang <wenji.huang@oracle.com>2009-11-18 17:59:24 +0800
commit66f73b62a4ed147b229237407a00688e61f96d5a (patch)
tree83e36258ada8be05220b976b350d580a36733565
parent2e66901da2ffed2261784f458a2fc57d6f059725 (diff)
downloadsystemtap-steved-66f73b62a4ed147b229237407a00688e61f96d5a.tar.gz
systemtap-steved-66f73b62a4ed147b229237407a00688e61f96d5a.tar.xz
systemtap-steved-66f73b62a4ed147b229237407a00688e61f96d5a.zip
Clean up examples
-rwxr-xr-xtestsuite/systemtap.examples/general/badname.stp2
-rwxr-xr-xtestsuite/systemtap.examples/general/grapher.stp2
-rwxr-xr-xtestsuite/systemtap.examples/general/graphs.stp2
-rw-r--r--testsuite/systemtap.examples/io/ioblktime.meta2
-rw-r--r--testsuite/systemtap.examples/io/iotime.meta2
-rwxr-xr-xtestsuite/systemtap.examples/io/iotime.stp2
-rwxr-xr-xtestsuite/systemtap.examples/io/ttyspy.stp4
-rw-r--r--testsuite/systemtap.examples/locks/bkl_stats.meta2
-rwxr-xr-xtestsuite/systemtap.examples/locks/bkl_stats.stp10
-rw-r--r--testsuite/systemtap.examples/memory/kmalloc-top.meta2
-rw-r--r--testsuite/systemtap.examples/memory/mmanonpage.meta2
-rw-r--r--testsuite/systemtap.examples/memory/mmreclaim.meta2
-rw-r--r--testsuite/systemtap.examples/memory/mmwriteback.meta2
-rw-r--r--testsuite/systemtap.examples/network/socket-trace.meta2
-rw-r--r--testsuite/systemtap.examples/network/tcpipstat.meta2
-rwxr-xr-xtestsuite/systemtap.examples/process/errsnoop.stp3
-rw-r--r--testsuite/systemtap.examples/process/forktracker.meta2
-rwxr-xr-xtestsuite/systemtap.examples/process/forktracker.stp2
-rw-r--r--testsuite/systemtap.examples/process/schedtimes.meta2
-rw-r--r--testsuite/systemtap.examples/process/sigkill.meta2
-rw-r--r--testsuite/systemtap.examples/process/sleepingBeauties.meta2
-rwxr-xr-xtestsuite/systemtap.examples/process/sleepingBeauties.stp2
-rwxr-xr-xtestsuite/systemtap.examples/process/wait4time.stp5
-rwxr-xr-xtestsuite/systemtap.examples/profiling/latencytap.stp10
24 files changed, 29 insertions, 41 deletions
diff --git a/testsuite/systemtap.examples/general/badname.stp b/testsuite/systemtap.examples/general/badname.stp
index 153e08c5..ba5a793c 100755
--- a/testsuite/systemtap.examples/general/badname.stp
+++ b/testsuite/systemtap.examples/general/badname.stp
@@ -1,4 +1,4 @@
-#!/usr/bin/stap -g
+#!/usr/bin/env stap
# badname.stp
# Prevent the creation of files with undesirable names.
# Source: http://blog.cuviper.com/2009/04/08/hacking-linux-filenames/
diff --git a/testsuite/systemtap.examples/general/grapher.stp b/testsuite/systemtap.examples/general/grapher.stp
index 9079cb40..e8655b37 100755
--- a/testsuite/systemtap.examples/general/grapher.stp
+++ b/testsuite/systemtap.examples/general/grapher.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap
+#! /usr/bin/env stap
probe begin
{
diff --git a/testsuite/systemtap.examples/general/graphs.stp b/testsuite/systemtap.examples/general/graphs.stp
index f55d6cee..9e322820 100755
--- a/testsuite/systemtap.examples/general/graphs.stp
+++ b/testsuite/systemtap.examples/general/graphs.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap
+#! /usr/bin/env stap
# ------------------------------------------------------------------------
# data collection
diff --git a/testsuite/systemtap.examples/io/ioblktime.meta b/testsuite/systemtap.examples/io/ioblktime.meta
index 01f34295..ff895a3f 100644
--- a/testsuite/systemtap.examples/io/ioblktime.meta
+++ b/testsuite/systemtap.examples/io/ioblktime.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.
+description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.
test_check: stap -p4 ioblktime.stp
test_installcheck: stap ioblktime.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/io/iotime.meta b/testsuite/systemtap.examples/io/iotime.meta
index cf22eacf..30e0599b 100644
--- a/testsuite/systemtap.examples/io/iotime.meta
+++ b/testsuite/systemtap.examples/io/iotime.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: trace
scope: system-wide
-description: The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.
+description: The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.
test_check: stap -p4 iotime.stp
test_installcheck: stap iotime.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/io/iotime.stp b/testsuite/systemtap.examples/io/iotime.stp
index 60fb09af..288e91d0 100755
--- a/testsuite/systemtap.examples/io/iotime.stp
+++ b/testsuite/systemtap.examples/io/iotime.stp
@@ -12,7 +12,7 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Print out the amount of time spent in the read and write systemcall
- * when a process closes each file is closed. Note that the systemtap
+ * when each file opened by the process is closed. Note that the systemtap
* script needs to be running before the open operations occur for
* the script to record data.
*
diff --git a/testsuite/systemtap.examples/io/ttyspy.stp b/testsuite/systemtap.examples/io/ttyspy.stp
index 272d82e9..0c98f391 100755
--- a/testsuite/systemtap.examples/io/ttyspy.stp
+++ b/testsuite/systemtap.examples/io/ttyspy.stp
@@ -1,11 +1,11 @@
-#! /usr/bin/stap -g
+#! /usr/bin/env stap
# May also need --skip-badvars
global activity_time, activity_log
/* Concatenate head and tail, to a max of @num chars, preferring to keep the tail
(as if it were a recent history buffer). */
-function strcattail:string(head:string,tail:string,num:long) %{
+function strcattail:string(head:string,tail:string,num:long) %{ /* pure */
unsigned taillen = strlen(THIS->tail);
unsigned headlen = strlen(THIS->head);
unsigned maxlen = THIS->num < MAXSTRINGLEN ? THIS->num : MAXSTRINGLEN;
diff --git a/testsuite/systemtap.examples/locks/bkl_stats.meta b/testsuite/systemtap.examples/locks/bkl_stats.meta
index 16ac2911..e8080bf4 100644
--- a/testsuite/systemtap.examples/locks/bkl_stats.meta
+++ b/testsuite/systemtap.examples/locks/bkl_stats.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: 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 holding the lock for each of the processes.
+description: 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.
test_support: stap -l 'kernel.function("lock_kernel").return'
test_check: stap -p4 bkl_stats.stp
test_installcheck: stap bkl_stats.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/locks/bkl_stats.stp b/testsuite/systemtap.examples/locks/bkl_stats.stp
index 4481e493..4a8eba6d 100755
--- a/testsuite/systemtap.examples/locks/bkl_stats.stp
+++ b/testsuite/systemtap.examples/locks/bkl_stats.stp
@@ -11,12 +11,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Print out the amount of time spent in the read and write systemcall
- * when a process closes each file is closed. Note that the systemtap
- * script needs to be running before the open operations occur for
- * the script to record data.
- *
- * Description: displays statisics for waiting and holding big kernel lock (BKL)
+ * Description: displays statistics for waiting and holding big kernel lock (BKL)
*
* Run: stap bkl_stats.stap
*
@@ -73,11 +68,10 @@ probe kernel.function("lock_kernel").return {
}
probe kernel.function("unlock_kernel") {
- # record the amount of time the process held the lock
t = gettimeofday_us()
s = holder_time[tid()]
holder_time[tid()] = t
- # record the amount of time waiting for the lock
+ # record the amount of time the process held the lock
if (s) {
holder_stats[tid()] <<< t - s
names[tid()] = execname()
diff --git a/testsuite/systemtap.examples/memory/kmalloc-top.meta b/testsuite/systemtap.examples/memory/kmalloc-top.meta
index f4c2a9d1..6388c3e1 100644
--- a/testsuite/systemtap.examples/memory/kmalloc-top.meta
+++ b/testsuite/systemtap.examples/memory/kmalloc-top.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: 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 be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e).
+description: 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).
test_check: ./kmalloc-top -o "-p4" -c "sleep 0"
test_installcheck: ./kmalloc-top -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/mmanonpage.meta b/testsuite/systemtap.examples/memory/mmanonpage.meta
index 96ddd3a3..5e5cb843 100644
--- a/testsuite/systemtap.examples/memory/mmanonpage.meta
+++ b/testsuite/systemtap.examples/memory/mmanonpage.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. Its useful in debugging leaks in the anonymous regions of a process.
+description: The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. It's useful in debugging leaks in the anonymous regions of a process.
test_support: stap -l 'kernel.trace("mm_page_allocation"),kernel.trace("mm_page_free"),kernel.trace("mm_anon_fault"),kernel.trace("mm_anon_pgin"),kernel.trace("mm_anon_cow"),kernel.trace("mm_anon_unmap"),kernel.trace("mm_anon_userfree")'
test_check: stap -p4 mmanonpage.stp
test_installcheck: stap mmanonpage.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/mmreclaim.meta b/testsuite/systemtap.examples/memory/mmreclaim.meta
index 4b5c9de2..a2828574 100644
--- a/testsuite/systemtap.examples/memory/mmreclaim.meta
+++ b/testsuite/systemtap.examples/memory/mmreclaim.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. Its useful is debugging performance problems that occur due to page reclamation.
+description: The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. It's useful in debugging performance problems that occur due to page reclamation.
test_support: stap -l 'kernel.trace("mm_directreclaim_reclaimall"),kernel.trace("mm_pagereclaim_shrinkinactive"),kernel.trace("mm_pagereclaim_free"),kernel.trace("mm_pagereclaim_pgout"),kernel.trace("mm_pagereclaim_shrinkactive_a2a"),kernel.trace("mm_pagereclaim_shrinkinactive_i2a"),kernel.trace("mm_pagereclaim_shrinkactive_a2i"),kernel.trace("mm_pagereclaim_shrinkinactive_i2i")'
test_check: stap -p4 mmreclaim.stp
test_installcheck: stap mmreclaim.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/mmwriteback.meta b/testsuite/systemtap.examples/memory/mmwriteback.meta
index 76cc53a7..62b52cf9 100644
--- a/testsuite/systemtap.examples/memory/mmwriteback.meta
+++ b/testsuite/systemtap.examples/memory/mmwriteback.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.
+description: The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. It's useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.
test_support: stap -l 'kernel.trace("mm_pdflush_bgwriteout"),kernel.trace("mm_pdflush_kupdate"),kernel.trace("mm_pagereclaim_pgout")'
test_check: stap -p4 mmwriteback.stp
test_installcheck: stap mmwriteback.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/network/socket-trace.meta b/testsuite/systemtap.examples/network/socket-trace.meta
index f73731b5..83af903c 100644
--- a/testsuite/systemtap.examples/network/socket-trace.meta
+++ b/testsuite/systemtap.examples/network/socket-trace.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: trace
scope: system-wide
-description: The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.
+description: The script instruments each of the functions in the Linux kernel's net/socket.c file. The script prints out trace data. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.
test_check: stap -p4 socket-trace.stp
test_installcheck: stap socket-trace.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/network/tcpipstat.meta b/testsuite/systemtap.examples/network/tcpipstat.meta
index 9e97ea5b..59cddaa8 100644
--- a/testsuite/systemtap.examples/network/tcpipstat.meta
+++ b/testsuite/systemtap.examples/network/tcpipstat.meta
@@ -9,7 +9,7 @@ exit: user-controlled
output: timed
scope: per-socket
arg_[0-9]+: tcpstat.stp [index=laddr|raddr|lport|rport|tuple] [timeout=<N sec>] [nozeros=1|0] [filters...]
-description: tcpipstat collects and display network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simmer to that of the command netstat -s, only sorted and grouped by individual sockets.
+description: tcpipstat collects and displays network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simular to that of the command netstat -s, only sorted and grouped by individual sockets.
test_support: stap -l 'tcpmib.InSegs'
test_check: stap -p4 tcpipstat.stp
test_installcheck: stap tcpipstat.stp timeout=1
diff --git a/testsuite/systemtap.examples/process/errsnoop.stp b/testsuite/systemtap.examples/process/errsnoop.stp
index a3f17b77..4ad4ea1b 100755
--- a/testsuite/systemtap.examples/process/errsnoop.stp
+++ b/testsuite/systemtap.examples/process/errsnoop.stp
@@ -1,5 +1,4 @@
-#!/bin/sh
-//usr/bin/env stap -DMAXMAPENTRIES=20480 $0 $@; exit $?
+#!/usr/bin/env stap -DMAXMAPENTRIES=20480 $0 $@; exit $?
# errsnoop.stp
# Copyright (C) 2009 Red Hat, Inc., Eugene Teo <eteo@redhat.com>
#
diff --git a/testsuite/systemtap.examples/process/forktracker.meta b/testsuite/systemtap.examples/process/forktracker.meta
index 2ba3a659..21c5bc29 100644
--- a/testsuite/systemtap.examples/process/forktracker.meta
+++ b/testsuite/systemtap.examples/process/forktracker.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: trace
scope: system-wide
-description: The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful for determine what process is creating a flurry of short-lived processes.
+description: The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful to determine what process is creating a flurry of short-lived processes.
test_check: stap -p4 forktracker.stp
test_installcheck: stap forktracker.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/forktracker.stp b/testsuite/systemtap.examples/process/forktracker.stp
index 525aa0a5..f892ce17 100755
--- a/testsuite/systemtap.examples/process/forktracker.stp
+++ b/testsuite/systemtap.examples/process/forktracker.stp
@@ -1,7 +1,7 @@
#! /usr/bin/env stap
#
# This is a stap script to monitor process creations (fork(), exec()'s).
-# Based off of stap script found: http://picobot.org/wordpress/?p=27
+# Based on stap script found: http://picobot.org/wordpress/?p=27
# With some minor modifications (i.e. timestamping)
#
# Usage: stap forktracker.stp
diff --git a/testsuite/systemtap.examples/process/schedtimes.meta b/testsuite/systemtap.examples/process/schedtimes.meta
index 5315042a..9386a3e8 100644
--- a/testsuite/systemtap.examples/process/schedtimes.meta
+++ b/testsuite/systemtap.examples/process/schedtimes.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.
+description: The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends in running, sleeping, queuing, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.
test_support: stap -l 'kernel.trace("sched_switch"),kernel.trace("sched_wakeup")'
test_check: stap -p4 schedtimes.stp
test_installcheck: stap schedtimes.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/sigkill.meta b/testsuite/systemtap.examples/process/sigkill.meta
index b9c83f15..fed49a05 100644
--- a/testsuite/systemtap.examples/process/sigkill.meta
+++ b/testsuite/systemtap.examples/process/sigkill.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: trace
scope: systemwide
-description: The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name user ID that sent the signal.
+description: The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name and user ID that sents the signal.
arg_1: The name of the signal to look for on selected process.
test_check: stap -p4 sigkill.stp
test_installcheck: stap sigkill.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/sleepingBeauties.meta b/testsuite/systemtap.examples/process/sleepingBeauties.meta
index b2692ba0..693a7789 100644
--- a/testsuite/systemtap.examples/process/sleepingBeauties.meta
+++ b/testsuite/systemtap.examples/process/sleepingBeauties.meta
@@ -2,6 +2,6 @@ title: Generating Backtraces of Threads Waiting for IO Operations
name: sleepingBeauties.stp
keywords: io scheduler backtrace
subsystem: scheduler
-description: The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.
+description: The script monitors the time that threads spend in waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.
test_check: stap -p4 sleepingBeauties.stp
test_installcheck: stap sleepingBeauties.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/sleepingBeauties.stp b/testsuite/systemtap.examples/process/sleepingBeauties.stp
index 64c563a3..143fbe1c 100755
--- a/testsuite/systemtap.examples/process/sleepingBeauties.stp
+++ b/testsuite/systemtap.examples/process/sleepingBeauties.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap
+#! /usr/bin/env stap
function time () { return gettimeofday_ms() }
global time_name = "ms"
diff --git a/testsuite/systemtap.examples/process/wait4time.stp b/testsuite/systemtap.examples/process/wait4time.stp
index 2fd914b9..3e374b14 100755
--- a/testsuite/systemtap.examples/process/wait4time.stp
+++ b/testsuite/systemtap.examples/process/wait4time.stp
@@ -11,10 +11,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Print out the amount of time spent in the read and write systemcall
- * when a process closes each file is closed. Note that the script needs
- * to be running before the open operations occur for the script
- * to record data.
+ * Print out the time spent in wait4 systemcall
*
* Format is:
* timestamp pid (executabable) wait4: time_us pid
diff --git a/testsuite/systemtap.examples/profiling/latencytap.stp b/testsuite/systemtap.examples/profiling/latencytap.stp
index d202ec81..7fdbbc4e 100755
--- a/testsuite/systemtap.examples/profiling/latencytap.stp
+++ b/testsuite/systemtap.examples/profiling/latencytap.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap -g
+#! /usr/bin/env stap
# Record the time that a process has spent asleep, and in what function
@@ -7,8 +7,7 @@ global sleep_time
global process_names
global sleep_agg
-function _get_sleep_time:long(rq_param:long, p_param:long)
-%{
+function _get_sleep_time:long(rq_param:long, p_param:long) %{ /* pure */
struct rq *rq = (struct rq *)(unsigned long)THIS->rq_param;
struct task_struct *p = (struct task_struct *)(unsigned long)THIS->p_param;
struct sched_entity *se = &p->se;
@@ -19,9 +18,8 @@ function _get_sleep_time:long(rq_param:long, p_param:long)
THIS->__retvalue = delta;
%}
-# Get the backtrace from an arbitrary task
-function task_backtrace:string (task:long)
-%{
+# Get the backtrace from an arbitrary task
+function task_backtrace:string (task:long) %{ /* pure */
_stp_stack_snprint_tsk(THIS->__retvalue, MAXSTRINGLEN,
(struct task_struct *)(unsigned long)THIS->task, 0, MAXTRACE);
%}