summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml2
-rw-r--r--doc/Tapset_Reference_Guide/manpager.sh118
-rw-r--r--tapset/context-symbols.stp13
-rw-r--r--tapset/context-unwind.stp10
-rw-r--r--tapset/context.stp71
-rw-r--r--tapset/ioscheduler.stp2
-rw-r--r--tapset/memory.stp8
-rw-r--r--tapset/scsi.stp11
-rw-r--r--tapset/socket.stp70
-rw-r--r--tapset/udp.stp42
10 files changed, 171 insertions, 176 deletions
diff --git a/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml b/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml
index 01e4c358..d497eae6 100644
--- a/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml
+++ b/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml
@@ -276,7 +276,7 @@ probe process.create = kernel.function("copy_process").return
<listitem><para><command>emphasis</command></para></listitem>
<listitem><para><command>programlisting</command></para></listitem>
<listitem><para><command>remark</command> (tagged strings will appear in Publican beta
- builds of the document.</para></listitem>
+ builds of the document)</para></listitem>
</itemizedlist>
diff --git a/doc/Tapset_Reference_Guide/manpager.sh b/doc/Tapset_Reference_Guide/manpager.sh
index 9aede5c4..2b9873b7 100644
--- a/doc/Tapset_Reference_Guide/manpager.sh
+++ b/doc/Tapset_Reference_Guide/manpager.sh
@@ -3,78 +3,79 @@
# generated herein should be in sync with Tapset Reference Guide
# cleanup
-rm -rf manpages
+rm -rf workingdir
# create working directory
-mkdir manpages ;
+mkdir workingdir ;
# create list of man pages to generate; should be in sync with Tapset Reference Guide
cat ../SystemTap_Tapset_Reference/tapsets.tmpl | grep ^\!Itapset > manpageus ;
sed -i -e 's/\!Itapset\///g' manpageus ;
# copy list of man pages into working directory
-for i in `cat manpageus` ; do cp ../../tapset/$i manpages ; done ;
+for i in `cat manpageus` ; do cp ../../tapset/$i workingdir ; done ;
# enter workdir
-# rm manpageus ;
-cd manpages ;
+cd workingdir ;
# copy tapsetdescriptions, then clean
-for i in `ls`; do sed -n '/\/\/ <tapsetdescription>/,/\/\/ <\/tapsetdescription>/ s/.*/&/w temp' < $i ;
+for i in `cat ../manpageus`; do
+sed -n '/\/\/ <tapsetdescription>/,/\/\/ <\/tapsetdescription>/ s/.*/&/w temp' < $i ;
mv temp $i.tapsetdescription ;
sed -i -e 's/\/\/ <tapsetdescription>//g' $i.tapsetdescription ;
sed -i -e 's/\/\/ <\/tapsetdescription>//g' $i.tapsetdescription ;
sed -i -e 's/\/\///g' $i.tapsetdescription ;
done
-# strip all tapset files to just comments; but first, make sure all comments are exactly 1 space before *
-for i in `ls | grep -v tapsetdescription` ; do sed -i -e 's/^ \*/ \*/g' $i; done ;
-for i in `ls | grep -v tapsetdescription` ; do sed -i -e '/^ \*/!d' $i; done ;
+# strip all tapset files to just comments; but all comments must be exactly 1 space before and after "*"
+for i in `cat ../manpageus` ; do sed -i -e 's/^ \*/ \*/g' $i;
+sed -i -e 's/^ \* / \* /g' $i;
+# mark the start of each probe entry (sub "/**")
+perl -p -i -e 's|^/\*\*| *probestart|g' $i;
+sed -i -e '/^ \*/!d' $i;
# rename all tapsets (remove .stp filename suffix), create templates
-for i in `ls | grep -v tapsetdescription` ; do echo $i > tempname ; sed -i -e 's/.stp//g' tempname ; mv $i `cat tempname` ; mv tempname $i ; done ;
+echo $i > tempname ;
+sed -i -e 's/.stp//g' tempname ;
+mv $i `cat tempname` ; mv tempname $i ;
+done ;
# clean all tapsetdescriptions (remove excess spaces)
# for i in `ls | grep tapsetdescription` ; do perl -p -i -e 's|^\n||g' $i ; done ;
-for i in `ls | grep -v .stp | grep -v tapsetdescription` ;
-do echo ".\" -*- nroff -*-" >> $i.template ;
-echo ".TH STAPPROBES.manpagename 5 @DATE@ "IBM"" >> $i.template ;
+# create man page headers
+for i in `ls | grep -v .stp | grep -v tapsetdescription` ; do
+#echo ".\" -*- nroff -*-" >> $i.template ;
+echo ".TH STAPPROBES."$i" 5 @DATE@ "IBM"" >> $i.template ;
echo ".SH NAME" >> $i.template ;
echo "stapprobes."`cat $i.stp`" \- systemtap "`cat $i.stp`" probe points" >> $i.template ;
echo " " >> $i.template ;
-echo ".\" macros" >> $i.template ;
-echo ".de SAMPLE" >> $i.template ;
-echo ".br" >> $i.template ;
-echo ".RS" >> $i.template ;
-echo ".nf" >> $i.template ;
-echo ".nh" >> $i.template ;
-echo ".." >> $i.template ;
-echo ".de ESAMPLE" >> $i.template ;
-echo ".hy" >> $i.template ;
-echo ".fi" >> $i.template ;
-echo ".RE" >> $i.template ;
-echo ".." >> $i.template ;
-echo " " >> $i.template ;
echo ".SH DESCRIPTION" >> $i.template ;
cat $i.stp.tapsetdescription >> $i.template ;
+echo " " >> $i.template ;
+#echo " " >> $i.template ;
+echo ".SH PROBES" >> $i.template ;
+echo ".br" >> $i.template ;
echo ".P" >> $i.template ;
echo ".TP" >> $i.template ;
done
+# MOST IMPORTANT: clean man page body!
for i in `ls | grep -v .stp | grep -v tapsetdescription | grep -v template` ;
-do cp $i $i.manpagebody ;
-perl -p -i -e 's| \* sfunction|.B|g' $i.manpagebody ;
-perl -p -i -e 's| \* probe|.B|g' $i.manpagebody ;
-perl -p -i -e 's| -|\n\t|g' $i.manpagebody ;
-perl -p -i -e 's|(^\t[^\n]*)\n|$1\n\n.B Arguments:|g' $i.manpagebody ;
-perl -p -i -e 's| \* @([^:]*):|.I $1 \n|g' $i.manpagebody ;
-perl -p -i -e 's| \* ([^:]*):|.B $1 \n|g' $i.manpagebody ;
-perl -p -i -e 's| \* ||g' $i.manpagebody ;
-perl -p -i -e 's|.B Arguments: \*|.B No Arguments:\n\n.B Description:|g' $i.manpagebody ;
-perl -p -i -e 's|.B Arguments:.I|.B Arguments:\n.I|g' $i.manpagebody ;
-perl -p -i -e 's|^ \*/|\n.P\n.TP|g' $i.manpagebody ;
-perl -p -i -e 's|\.I|\n\n.I|g' $i.manpagebody ;
-perl -p -i -e 's|.B Context|\n.B Context|g' $i.manpagebody ;
-#perl -p -i -e 's|^[^*]*\*|.P|g' $i.manpagebody ;
+do cp $i $i.tmp ;
+perl -p -i -e 's| \* sfunction|.BR|g' $i.tmp ;
+perl -p -i -e 's| \* probe|.BR|g' $i.tmp ;
+perl -p -i -e 's| -|\ninitlinehere|g' $i.tmp ;
+perl -p -i -e 's|^initlinehere([^\n]*)\n|\n.br\n$1\n\n.B Arguments:|g' $i.tmp ;
+perl -p -i -e 's| \* @([^:]*):|\n.I $1\n.br\n|g' $i.tmp ;
+perl -p -i -e 's| \* ([^:]*):|\n.BR $1:\n.br\n|g' $i.tmp ;
+perl -p -i -e 's|\*probestart|\n.P\n.TP|g' $i.tmp ;
+perl -p -i -e 's|\.I|\n\n.I|g' $i.tmp ;
+# special formatting for Arguments header
+perl -p -i -e 's|.B Arguments: \*\/||g' $i.tmp ;
+perl -p -i -e 's|.B Arguments: \*|.B Description:|g' $i.tmp ;
+
+cat $i.tmp |
+perl -p -e 'undef $/;s|.B Arguments:\n.B|.B|msg' |
+perl -p -e 'undef $/;s|\n\n\n|\n\n|msg' > $i.manpagebody ;
done
# generate footer template
@@ -87,17 +88,44 @@ for i in `cat manpageus`; do echo ".IR stapprobes."$i" (5)," >> footer ; done
# assemble parts
for i in `cat manpageus`; do
-cat $i.template >> stapprobes.$i.5.in ;
-cat $i.manpagebody >> stapprobes.$i.5.in ;
-cat footer >> stapprobes.$i.5.in ;
+cat $i.template >> $i.5 ;
+cat $i.manpagebody >> $i.5 ;
+cat footer >> $i.5 ;
done
# cleanup
for i in `cat manpageus`; do
-perl -p -i -e 's|.B Description:/|\n.P\n.TP|g' stapprobes.$i.5.in ;
+# context.stp
+perl -p -i -e 's|.B Description:/|\n.P\n.TP|g' $i.5 ;
+perl -p -i -e 's|.B Description:|.B Description:\n\n |g' $i.5 ;
+# convert tags
+perl -p -i -e 's|</[^>]*>([^.])|$1\n|g' $i.5 ;
+perl -p -i -e 's|<[^>]*>|\n.B |g' $i.5 ;
+cat $i.5 |
+perl -p -e 'undef $/;s|\.B Arguments:\n\n\.B |.B|msg' |
+# for tagged commands followed by periods
+perl -p -e 'undef $/;s|\n\.B \.|.\n|msg' |
+perl -p -e 'undef $/;s|\n \* | |msg' > stapprobes.$i.5.in ;
+# cleanup all remaining stars, excess initial whitespace, and trailing "/" per line
+perl -p -i -e 's|^ \*||g' stapprobes.$i.5.in;
+perl -p -i -e 's|^[ ]*||g' stapprobes.$i.5.in;
+perl -p -i -e 's|^/||g' stapprobes.$i.5.in;
+# cleanup remaining excess whitespace
+perl -p -i -e 's|\t\t| |g' stapprobes.$i.5.in;
+perl -p -i -e 's|^ ||g' stapprobes.$i.5.in;
+sed -i -e 's/ / /g' stapprobes.$i.5.in;
done
+# file cleanup
+rm `ls | grep -v stapprobes`
+#mv workingdir final_manpages
+# perl -p -i -e 's|||g' stapprobes.$i.5.in ;
# perl -p -i -e 's|||g' $i.manpagebody
# use to move marked strings.
-# sed -n '/\/\/ <tapsetdescription>/,/\/\/ <\/tapsetdescription>/ s/.*/&/w bleh' < ioscheduler \ No newline at end of file
+# sed -n '/\/\/ <tapsetdescription>/,/\/\/ <\/tapsetdescription>/ s/.*/&/w bleh' < ioscheduler
+# remove excess initial whitespace for each line
+# perl -p -i -e 's|^ ||g' stapprobes.$i.5.in;
+# convert tags
+# perl -p -i -e 's|</[^>]*>|\n|g' stapprobes.$i.5.in ;
+# perl -p -i -e 's|<[^>]*>|\n.B |g' stapprobes.$i.5.in ; \ No newline at end of file
diff --git a/tapset/context-symbols.stp b/tapset/context-symbols.stp
index 4a08ec60..a3aae408 100644
--- a/tapset/context-symbols.stp
+++ b/tapset/context-symbols.stp
@@ -18,12 +18,13 @@
%}
// weirdness with print_stack, argument appears in build as undescribed
/**
- * sfunction print_stack - Print out stack from string
+ * sfunction print_stack - Print out stack from string.
* @stk: String with list of hexidecimal addresses. (FIXME)
*
* Perform a symbolic lookup of the addresses in the given string,
- * which is assumed to be the result of a prior call to
+ * which is assumed to be the result of a prior call to
* <command>backtrace()</command>.
+ *
* Print one line per address, including the address, the
* name of the function containing the address, and an estimate of
* its position within that function. Return nothing.
@@ -40,9 +41,7 @@ function print_stack(stk:string) %{
%}
/**
- * sfunction probefunc - Function probed
- *
- * Return the probe point's function name, if known.
+ * sfunction probefunc - Return the probe point's function name, if known.
*/
function probefunc:string () %{ /* pure */
char *ptr, *start;
@@ -76,9 +75,7 @@ function probefunc:string () %{ /* pure */
%}
/**
- * sfunction probemod - Module probed
- *
- * Return the probe point's module name, if known.
+ * sfunction probemod - Return the probe point's module name, if known.
*/
function probemod:string () %{ /* pure */
char *ptr, *start;
diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp
index 5c1253b8..90d4e0f4 100644
--- a/tapset/context-unwind.stp
+++ b/tapset/context-unwind.stp
@@ -23,7 +23,7 @@
/**
* sfunction print_backtrace - Print stack back trace
*
- * Equivalent to <command>print_stack(backtrace())</command>,
+ * Equivalent to <command>print_stack(backtrace())</command>,
* except that deeper stack nesting may be supported. Return nothing.
*/
function print_backtrace () %{
@@ -37,8 +37,8 @@ function print_backtrace () %{
/**
* sfunction backtrace - Hex backtrace of current stack
*
- * Return a string of hex addresses that are a backtrace of the
- * stack. It may be truncated due to maximum string length.
+ * Return a string of hex addresses that are a backtrace of the
+ * stack. Output may be truncated as per maximum string length.
*/
function backtrace:string () %{ /* pure */
if (CONTEXT->regs)
@@ -50,7 +50,7 @@ function backtrace:string () %{ /* pure */
/**
* sfunction caller - Return name and address of calling function
*
- * Return the address and name of the calling function.
+ * Return the address and name of the calling function.
* <emphasis>Works only for return probes at this time.</emphasis>
*/
function caller:string() %{ /* pure */
@@ -64,7 +64,7 @@ function caller:string() %{ /* pure */
/**
* sfunction caller_addr - Return caller address
*
- * Return the address of the calling function.
+ * Return the address of the calling function.
* <emphasis> Works only for return probes at this time.</emphasis>
*/
function caller_addr:long () %{ /* pure */
diff --git a/tapset/context.stp b/tapset/context.stp
index f4b0207a..9f4be0e6 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -21,37 +21,28 @@ function print_regs () %{
%}
/**
- * sfunction execname - Execname of current processes
- *
- * Return the name of the current process.
+ * sfunction execname - Returns the execname of a target process (or group of processes).
*/
function execname:string () %{ /* pure */
strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN);
%}
/**
- * sfunction pid - Process ID of current process
- *
- *
- * Return the id of the current process.
+ * sfunction pid - Returns the ID of a target process.
*/
function pid:long () %{ /* pure */
THIS->__retvalue = current->tgid;
%}
/**
- * sfunction tid - Thread ID of current process
- *
- * Return the id of the current thread.
+ * sfunction tid - Returns the thread ID of a target process.
*/
function tid:long () %{ /* pure */
THIS->__retvalue = current->pid;
%}
/**
- * sfunction ppid - Parent Process ID of current process
- *
- * Return the id of the parent process.
+ * sfunction ppid - Returns the process ID of a target process's parent process.
*/
function ppid:long () %{ /* pure */
#if defined(STAPCONF_REAL_PARENT)
@@ -62,9 +53,7 @@ function ppid:long () %{ /* pure */
%}
/**
- * sfunction pexecname - Execname of the parent process.
- *
- * Return the name of the parent process.
+ * sfunction pexecname - Returns the execname of a target process's parent process.
*/
function pexecname:string () %{ /* pure */
#if defined(STAPCONF_REAL_PARENT)
@@ -75,9 +64,7 @@ function pexecname:string () %{ /* pure */
%}
/**
- * sfunction gid - Group ID of current process
- *
- * Return the gid of the current process.
+ * sfunction gid - Returns the group ID of a target process.
*/
function gid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
@@ -88,9 +75,7 @@ function gid:long () %{ /* pure */
%}
/**
- * sfunction egid - Effective gid of the current process.
- *
- * Return the effective gid of the current process.
+ * sfunction egid - Returns the effective gid of a target process.
*/
function egid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
@@ -101,9 +86,7 @@ function egid:long () %{ /* pure */
%}
/**
- * sfunction uid -User ID of the current process.
- *
- * Return the uid of the current process.
+ * sfunction uid - Returns the user ID of a target process.
*/
function uid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
@@ -114,9 +97,7 @@ function uid:long () %{ /* pure */
%}
/**
- * sfunction euid - Effective User ID of the current process.
- *
- * Return the effective uid of the current process.
+ * sfunction euid - Return the effective uid of a target process.
*/
function euid:long () %{ /* pure */
#ifdef STAPCONF_TASK_UID
@@ -132,26 +113,24 @@ function cpuid:long () %{ /* pure */
%}
/**
- * sfunction cpu - The current cpu number.
- *
- * Return the current cpu number.
+ * sfunction cpu - Returns the current cpu number.
*/
function cpu:long () %{ /* pure */
THIS->__retvalue = smp_processor_id();
%}
/**
- * sfunction pp - Current probe point
- *
- * Return the probe point associated with the currently running
- * probe handler, including alias and wildcard expansion effects.
+ * sfunction pp - Return the probe point associated with the currently running probe handler,
+ * including alias and wildcard expansion effects
+ * Context:
+ * The current probe point.
*/
function pp:string () %{ /* pure */
strlcpy (THIS->__retvalue, CONTEXT->probe_point, MAXSTRINGLEN);
%}
/**
- * sfunction registers_valid - Register information valid
+ * sfunction registers_valid - Determines validity of <command>register()</command> and <command>u_register()</command> in current context.
*
* Return 1 if register() and u_register() can be used
* in the current context, or 0 otherwise.
@@ -163,7 +142,7 @@ function registers_valid:long () %{ /* pure */
%}
/**
- * sfunction user_mode - User Mode
+ * sfunction user_mode - Determines if probe point occurs in user-mode.
*
* Return 1 if the probe point occurred in user-mode.
*/
@@ -180,7 +159,7 @@ function user_mode:long () %{ /* pure */ /* currently a user-mode address? */
%}
/**
- * sfunction is_return - Is return probe
+ * sfunction is_return - Determines if probe point is a return probe.
*
* Return 1 if the probe point is a return probe.
* <emphasis>Deprecated.</emphasis>
@@ -193,9 +172,7 @@ function is_return:long () %{ /* pure */
%}
/**
- * sfunction target - Target pid
- *
- * Return the pid of the target process.
+ * sfunction target - Return the process ID of the target process.
*/
function target:long () %{ /* pure */
THIS->__retvalue = _stp_target;
@@ -224,18 +201,16 @@ function stp_pid:long () %{ /* pure */
%}
/**
- * sfunction stack_size - Size of kernel stack
- *
- * Return the size of the kernel stack.
+ * sfunction stack_size - Return the size of the kernel stack.
*/
function stack_size:long () %{ /* pure */
THIS->__retvalue = THREAD_SIZE;
%}
/**
- * sfunction stack_used - Current amount of kernel stack used
+ * sfunction stack_used - Returns the amount of kernel stack used.
*
- * Return how many bytes are currently used in the kernel stack.
+ * Determines how many bytes are currently used in the kernel stack.
*/
function stack_used:long () %{ /* pure */
char a;
@@ -243,9 +218,9 @@ function stack_used:long () %{ /* pure */
%}
/**
- * sfunction stack_unused - Amount of kernel stack currently available
+ * sfunction stack_unused - Returns the amount of kernel stack currently available.
*
- * Return how many bytes are currently available in the kernel stack.
+ * Determines how many bytes are currently available in the kernel stack.
*/
function stack_unused:long () %{ /* pure */
char a;
diff --git a/tapset/ioscheduler.stp b/tapset/ioscheduler.stp
index 875ccea9..a79ae752 100644
--- a/tapset/ioscheduler.stp
+++ b/tapset/ioscheduler.stp
@@ -60,7 +60,7 @@ probe ioscheduler.elv_next_request.return
}
/**
- * probe ioscheduler.elv_add_request -A request was added to the request queue
+ * probe ioscheduler.elv_add_request - A request was added to the request queue
* @elevator_name: The type of I/O elevator currently enabled
* @req: Address of the request
* @req_flags: Request flags
diff --git a/tapset/memory.stp b/tapset/memory.stp
index 9dbe3fba..83875aa4 100644
--- a/tapset/memory.stp
+++ b/tapset/memory.stp
@@ -56,7 +56,7 @@ function vm_fault_contains:long (value:long, test:long)
/**
* probe vm.pagefault - Records that a page fault occurred.
* @address: The address of the faulting memory access; i.e. the address that caused the page fault.
- * @write_access: Indicates whether this was a write or read access; <command>1</command> indicates a write,
+ * @write_access: Indicates whether this was a write or read access; <command>1</command> indicates a write,
* while <command>0</command> indicates a read.
*
* Context: The process which triggered the fault
@@ -113,8 +113,8 @@ function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */
* Context:
* The context is the process attempting the write.
*
- * Fires when a process attempts to write to a shared page.
- * If a copy is necessary, this will be followed by a
+ * Fires when a process attempts to write to a shared page.
+ * If a copy is necessary, this will be followed by a
* <command>vm.write_shared_copy</command>.
*/
probe vm.write_shared = kernel.function("do_wp_page") {
@@ -122,7 +122,7 @@ probe vm.write_shared = kernel.function("do_wp_page") {
}
/**
- * probe vm.write_shared_copy- Page copy for shared page write.
+ * probe vm.write_shared_copy - Page copy for shared page write.
* @address: The address of the shared write.
* @zero: Boolean indicating whether it is a zero page
* (can do a clear instead of a copy).
diff --git a/tapset/scsi.stp b/tapset/scsi.stp
index 8ff3dcca..f8859be2 100644
--- a/tapset/scsi.stp
+++ b/tapset/scsi.stp
@@ -46,9 +46,9 @@ probe scsi.ioentry
* @lun: The lun number
* @dev_id: The scsi device id
* @device_state: The current state of the device.
- * @data_direction: The data_direction specifies whether this command is from/to
- * the device. 0 (DMA_BIDIRECTIONAL), 1 (DMA_TO_DEVICE),
- * 2 (DMA_FROM_DEVICE), 3 (DMA_NONE)
+ * @data_direction: The data_direction specifies whether this command is from/to the device.
+ * 0 (DMA_BIDIRECTIONAL), 1 (DMA_TO_DEVICE),
+ * 2 (DMA_FROM_DEVICE), 3 (DMA_NONE)
* @request_buffer: The request buffer address
* @req_bufflen: The request buffer length
*/
@@ -81,7 +81,7 @@ probe scsi.iodispatching
* @dev_id: The scsi device id
* @device_state: The current state of the device
* @data_direction: The data_direction specifies whether this command is
- * from/to the device.
+ * from/to the device.
*/
probe scsi.iodone
= module("scsi_mod").function("scsi_done@drivers/scsi/scsi.c")?,
@@ -106,7 +106,7 @@ probe scsi.iodone
* @dev_id: The scsi device id
* @device_state: The current state of the device
* @data_direction: The data_direction specifies whether this command is from/to
- * the device
+ * the device
* @goodbytes: The bytes completed.
*/
// mid-layer processes the completed IO
@@ -142,3 +142,4 @@ function get_devstate_from_req:long(var:long)
sdev = @cast(var, "request_queue", "kernel:scsi_mod")->queuedata
return @cast(sdev, "scsi_device", "kernel:scsi_mod")->sdev_state
}
+g \ No newline at end of file
diff --git a/tapset/socket.stp b/tapset/socket.stp
index 93730f9f..0f01b8d4 100644
--- a/tapset/socket.stp
+++ b/tapset/socket.stp
@@ -67,8 +67,8 @@ probe socket.receive = socket.recvmsg.return,
### FUNCTION SPECIFIC SEND/RECEIVE PROBES ###
-/*
- * probe socket.sendmsg - Message being sent on socket
+/**
+ * probe socket.sendmsg - Message is currently being sent on a socket.
* @name: Name of this probe
* @size: Message size in bytes
* @protocol: Protocol value
@@ -95,7 +95,7 @@ probe socket.sendmsg = kernel.function ("sock_sendmsg")
}
/**
- * probe socket.sendmsg.return - Return from Message being sent on socket
+ * probe socket.sendmsg.return - Return from <command>socket.sendmsg</command>.
* @name: Name of this probe
* @size: Size of message sent (in bytes) or error code if success = 0
* @protocol: Protocol value
@@ -151,7 +151,7 @@ probe socket.recvmsg = kernel.function ("sock_recvmsg")
type = $sock->type
}
-/*
+/**
* probe socket.recvmsg.return - Return from Message being received on socket
* @name: Name of this probe
* @size: Size of message received (in bytes) or error code if success = 0
@@ -198,14 +198,14 @@ probe socket.recvmsg.return = kernel.function ("sock_recvmsg").return
* Fires at the beginning of sending a message on a socket
* via the sock_aio_write() function
*/
-/*
- * 2.6.9~2.6.15:
- * static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t size, loff_t pos);
- * 2.6.16~2.6.18:
- * static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t count, loff_t pos);
- * 2.6.19~2.6.26:
- * static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos);
- */
+//
+// 2.6.9~2.6.15:
+// static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t size, loff_t pos);
+// 2.6.16~2.6.18:
+// static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t count, loff_t pos);
+// 2.6.19~2.6.26:
+// static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos);
+
probe socket.aio_write = kernel.function ("sock_aio_write")
{
name = "socket.aio_write"
@@ -272,14 +272,14 @@ probe socket.aio_write.return = kernel.function ("sock_aio_write").return
* Fires at the beginning of receiving a message on a socket
* via the sock_aio_read() function
*/
-/*
- * 2.6.9~2.6.15:
- * static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t size, loff_t pos);
- * 2.6.16~2.6.18:
- * static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t count, loff_t pos);
- * 2.6.19~2.6.26:
- * static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos);
- */
+//
+// 2.6.9~2.6.15:
+// static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t size, loff_t pos);
+// 2.6.16~2.6.18:
+// static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t count, loff_t pos);
+// 2.6.19~2.6.26:
+// static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos);
+
probe socket.aio_read = kernel.function ("sock_aio_read")
{
name = "socket.aio_read"
@@ -543,18 +543,16 @@ probe socket.close.return = kernel.function ("sock_release").return
####### PROTOCOL HELPER FUNCTIONS ########
-/*
- * sock_prot_num2str
- * Given a protocol number, return a string representation.
+/**
+ * sfunction sock_prot_num2str - Given a protocol number, return a string representation.
*/
function sock_prot_num2str:string (proto:long)
{
return (proto in _prot_num2str ? _prot_num2str[proto] : "UNDEF")
}
-/*
- * sock_prot_str2num
- * Given a protocol name (string), return the corresponding protocol number.
+/**
+ * sfunction sock_prot_str2num - Given a protocol name (string), return the corresponding protocol number.
*/
function sock_prot_str2num:long (proto:string)
{
@@ -563,18 +561,16 @@ function sock_prot_str2num:long (proto:string)
######### PROTOCOL FAMILY HELPER FUNCTIONS ###########
-/*
- * sock_fam_num2str
- * Given a protocol family number, return a string representation.
+/**
+ * sfunction sock_fam_num2str - Given a protocol family number, return a string representation.
*/
function sock_fam_num2str:string (family:long)
{
return (family in _fam_num2str ? _fam_num2str[family] : "UNDEF")
}
-/*
- * sock_fam_str2num
- * Given a protocol family name (string), return the corresponding
+/**
+ * sfunction sock_fam_str2num - Given a protocol family name (string), return the corresponding
* protocol family number.
*/
function sock_fam_str2num:long (family:string)
@@ -584,18 +580,16 @@ function sock_fam_str2num:long (family:string)
######### SOCKET STATE HELPER FUNCTIONS ##########
-/*
- * sock_state_num2str
- * Given a socket state number, return a string representation.
+/**
+ * sfunction sock_state_num2str - Given a socket state number, return a string representation.
*/
function sock_state_num2str:string (state:long)
{
return (state in _state_num2str ? _state_num2str[state] : "UNDEF")
}
-/*
- * sock_state_str2num
- * Given a socket state string, return the corresponding state number.
+/**
+ * sfunction sock_state_str2num - Given a socket state string, return the corresponding state number.
*/
function sock_state_str2num:long (state:string)
{
diff --git a/tapset/udp.stp b/tapset/udp.stp
index f2b19a7f..2255074a 100644
--- a/tapset/udp.stp
+++ b/tapset/udp.stp
@@ -17,12 +17,12 @@
/**
* probe udp.sendmsg - Fires whenever a process sends a UDP message
- * @name: Name of this probe
- * @sock: Network socket
- * @size: Number of bytes to send
+ * @name: The name of this probe
+ * @sock: Network socket used by the process
+ * @size: Number of bytes sent by the process
*
* Context:
- * The process which sends a udp message
+ * The process which sent a UDP message
*/
probe udp.sendmsg = kernel.function("udp_sendmsg") {
name = "udp.sendmsg"
@@ -32,11 +32,11 @@ probe udp.sendmsg = kernel.function("udp_sendmsg") {
/**
* probe udp.sendmsg.return - Fires whenever an attempt to send a UDP message is completed
- * @name: Name of this probe
- * @size: Number of bytes sent
+ * @name: The name of this probe
+ * @size: Number of bytes sent by the process
*
* Context:
- * The process which sends a udp message
+ * The process which sent a UDP message
*/
probe udp.sendmsg.return = kernel.function("udp_sendmsg").return {
name = "udp.sendmsg"
@@ -45,12 +45,12 @@ probe udp.sendmsg.return = kernel.function("udp_sendmsg").return {
/**
* probe udp.recvmsg - Fires whenever a UDP message is received
- * @name: Name of this probe
- * @sock: Network socket
- * @size: Number of bytes received
+ * @name: The name of this probe
+ * @sock: Network socket used by the process
+ * @size: Number of bytes received by the process
*
* Context:
- * The process which receives a udp message
+ * The process which received a UDP message
*/
probe udp.recvmsg = kernel.function("udp_recvmsg") {
name = "udp.recvmsg"
@@ -59,12 +59,12 @@ probe udp.recvmsg = kernel.function("udp_recvmsg") {
}
/**
- * probe udp.recvmsg.return - An attempt to receive a UDP message received has been completed
- * @name: Name of this probe
- * @size: Number of bytes received
+ * probe udp.recvmsg.return - Fires whenever an attempt to receive a UDP message received is completed
+ * @name: The name of this probe
+ * @size: Number of bytes received by the process
*
* Context:
- * The process which receives a udp message
+ * The process which received a UDP message
*/
probe udp.recvmsg.return = kernel.function("udp_recvmsg").return {
name = "udp.recvmsg"
@@ -72,13 +72,13 @@ probe udp.recvmsg.return = kernel.function("udp_recvmsg").return {
}
/**
- * probe udp.disconnect - A process requests for UPD to be UDP disconnected
- * @name: Name of this probe
- * @sock: Network socket
+ * probe udp.disconnect - Fires when a process requests for a UDP disconnection
+ * @name: The name of this probe
+ * @sock: Network socket used by the process
* @flags: Flags (e.g. FIN, etc)
*
* Context:
- * The process which disconnects UDP
+ * The process which requests a UDP disconnection
*/
probe udp.disconnect = kernel.function("udp_disconnect") {
name = "udp.disconnect"
@@ -88,11 +88,11 @@ probe udp.disconnect = kernel.function("udp_disconnect") {
/**
* probe udp.disconnect.return - UDP has been disconnected successfully
- * @name: Name of this probe
+ * @name: The name of this probe
* @ret: Error code (0: no error)
*
* Context:
- * The process which disconnects udp
+ * The process which requested a UDP disconnection
*/
probe udp.disconnect.return = kernel.function("udp_disconnect").return {
name = "udp.disconnect"