From 9cd61407c728ffe78793f2265fd3d250660ec984 Mon Sep 17 00:00:00 2001
From: William Cohen <wcohen@redhat.com>
Date: Mon, 24 Nov 2008 10:51:46 -0500
Subject: [PATCH] Add context, timestamp, memory, and networking tapsets.

---
 doc/ChangeLog                               |    5 +
 doc/SystemTap_Tapset_Reference/tapsets.tmpl |   38 +++
 tapset/ChangeLog                            |    7 +
 tapset/context.stp                          |  351 +++++++++++----------------
 tapset/memory.stp                           |  267 ++++----------------
 tapset/networking.stp                       |   76 ++-----
 tapset/timestamp.stp                        |   72 ++----
 7 files changed, 285 insertions(+), 531 deletions(-)

diff --git a/doc/ChangeLog b/doc/ChangeLog
index ac2d01a..4106091 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,10 @@
 2008-11-24  Will Cohen <wcohen@redhat.com>
 
+	* SystemTap_Tapset_Reference/tapsets.tmpl: Add context, timestamp,
+	memory, and networking tapsets.
+	
+2008-11-24  Will Cohen <wcohen@redhat.com>
+
 	* SystemTap_Tapset_Reference: Add kernel-doc based version.
 	
 2008-11-24  Will Cohen <wcohen@redhat.com>
diff --git a/doc/SystemTap_Tapset_Reference/tapsets.tmpl b/doc/SystemTap_Tapset_Reference/tapsets.tmpl
index 8ae22ed..ccdba8c 100644
--- a/doc/SystemTap_Tapset_Reference/tapsets.tmpl
+++ b/doc/SystemTap_Tapset_Reference/tapsets.tmpl
@@ -112,4 +112,42 @@ This is common among
   
   </chapter>
 
+  <chapter id="context_stp">
+    <title>Context Functions</title>
+    <para>
+      The context functions provide additional information about the where
+      the event occurred.
+      These functions can provide information such as a backtrace
+      where the event occured
+      and the current register values for the processor.
+    </para>
+!Itapset/context.stp
+  </chapter>
+
+  <chapter id="timestamp_stp">
+    <title>Timestamp Functions</title>
+    <para>
+      Each timestamp function returns a value to indicate when
+      the function is executed.
+      Thus, these returned values can be used to indicate
+      when an event occurs, provide an ordering for events, or compute
+      the amount of time elapsed between to time stamps.
+    </para>
+!Itapset/timestamp.stp
+  </chapter>
+
+  <chapter id="memory_stp">
+    <title>Memory Tapset</title>
+!Itapset/memory.stp
+  </chapter>
+
+  <chapter id="networking.stp">
+    <title>Networking Tapset</title>
+    <para>
+      This family of probe points is used to probe the activities of
+      network device. 
+    </para>
+!Itapset/networking.stp
+  </chapter>
+
 </book>
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index b63b1ac..20b564c 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-24  Will Cohen <wcohen@redhat.com>
+
+	* context.stp:
+	* memory.stp:
+	* networking.stp:
+	* timestamp.stp: Change to use kernel-doc notation.
+	
 2008-11-19  Jim Keniston <jkenisto@us.ibm.com>
 
 	* s390x/registers.stp: Fixed typo.
diff --git a/tapset/context.stp b/tapset/context.stp
index 3c87d1b..7505c60 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -7,37 +7,22 @@
 // Public License (GPL); either version 2, or (at your option) any
 // later version.
 
-///<chapter id="context_stp">
-///  <title>Context Functions</title>
-///  <para>
-///    The context functions provide additional information about the where
-///    the event occurred.
-///    These functions can provide information such as a backtrace
-///    where the event occured
-///    and the current register values for the processor.
-///  </para>
 
-///<formalpara id="print_regs">
-///  <title>print_regs()</title>
-///  <indexterm><primary>print_regs</primary></indexterm>
-///  <para>
-///	Print a register dump.
-///  </para>
-///</formalpara>
+/**
+ * sfunction print_regs - Print a register dump.
+ */
 function print_regs () %{
 	if (CONTEXT->regs) {
 		_stp_print_regs (CONTEXT->regs);
 	}
 %}
 
-///<formalpara id="print_backtrace">
-///  <title>print_backtrace()</title>
-///  <indexterm><primary>print_backtrace</primary></indexterm>
-///  <para>
-///     Equivalent to <command>print_stack(backtrace())</command>,
-///     except that deeper stack nesting may be supported.  Return nothing.
-///  </para>
-///</formalpara>
+/**
+ * sfunction print_backtrace - Print stack back trace
+ *
+ *  Equivalent to <command>print_stack(backtrace())</command>,
+ *  except that deeper stack nesting may be supported.  Return nothing.
+ */
 function print_backtrace () %{
 	if (CONTEXT->regs) {
 		_stp_stack_print(CONTEXT->regs, 1, CONTEXT->pi, MAXTRACE);
@@ -46,14 +31,12 @@ function print_backtrace () %{
 	}
 %}
 
-///<formalpara id="backtrace">
-///  <title>backtrace:string()</title>
-///  <indexterm><primary>backtrace</primary></indexterm>
-///  <para>
-///	Return a string of hex addresses that are a backtrace of the
-///     stack.  It may be truncated due to maximum string length.
-///  </para>
-///</formalpara>
+/**
+ * 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.
+ */
 function backtrace:string () %{ /* pure */
 	if (CONTEXT->regs)
 		_stp_stack_snprint (THIS->__retvalue, MAXSTRINGLEN, CONTEXT->regs, 0, CONTEXT->pi, MAXTRACE);
@@ -61,46 +44,39 @@ function backtrace:string () %{ /* pure */
 		strlcpy (THIS->__retvalue, "", MAXSTRINGLEN);
 %}
 
-///<formalpara id="execname">
-///  <title>execname:string()</title>
-///  <indexterm><primary>execname</primary></indexterm>
-///  <para>
-///     Return the name of the current process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction execname - Execname of current processes
+ *
+ *  Return the name of the current process.
+ */
 function execname:string () %{ /* pure */
 	strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN);
 %}
 
-///<formalpara id="pid">
-///  <title>pid:long ()</title>
-///  <indexterm><primary>pid</primary></indexterm>
-///  <para>
-///	Return the id of the current process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction pid - Process ID of current process
+ *
+ *
+ *  Return the id of the current process.
+ */
 function pid:long () %{ /* pure */
 	THIS->__retvalue = current->tgid;
 %}
 
-///<formalpara id="tid">
-///  <title>tid:long()</title>
-///  <indexterm><primary>tid</primary></indexterm>
-///  <para>
-///	Return the id of the current thread.
-///  </para>
-///</formalpara>
+/**
+ * sfunction tid - Thread ID of current process
+ *
+ *  Return the id of the current thread.
+ */
 function tid:long () %{ /* pure */
 	THIS->__retvalue = current->pid;
 %}
 
-///<formalpara id="ppid">
-///  <title>ppid:long()</title>
-///  <indexterm><primary>ppid</primary></indexterm>
-///  <para>
-///	Return the id of the parent process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction ppid - Parent Process ID of current process
+ *
+ *  Return the id of the parent process.
+ */
 function ppid:long () %{ /* pure */
 #if defined(STAPCONF_REAL_PARENT)
 	THIS->__retvalue = current->real_parent->tgid;
@@ -109,13 +85,11 @@ function ppid:long () %{ /* pure */
 #endif
 %}
 
-///<formalpara id="pexecname">
-///  <title>pexecname:string()</title>
-///  <indexterm><primary>pexecname</primary></indexterm>
-///  <para>
-///	Return the name of the parent process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction pexecname - Execname of the parent process.
+ *
+ *  Return the name of the parent process.
+ */
 function pexecname:string () %{ /* pure */
 #if defined(STAPCONF_REAL_PARENT)
 	strlcpy (THIS->__retvalue, current->real_parent->comm, MAXSTRINGLEN);
@@ -124,46 +98,38 @@ function pexecname:string () %{ /* pure */
 #endif
 %}
 
-///<formalpara id="gid">
-///  <title>gid:long()</title>
-///  <indexterm><primary>gid</primary></indexterm>
-///  <para>
-///	Return the gid of the current process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction gid - Group ID of current process
+ *
+ *  Return the gid of the current process.
+ */
 function gid:long () %{ /* pure */
 	THIS->__retvalue = current->gid;		
 %}
 
-///<formalpara id="egid">
-///  <title>egid:long()</title>
-///  <indexterm><primary>egid</primary></indexterm>
-///  <para>
-///    Return the effective gid of the current process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction egid - Effective gid of the current process.
+ *
+ *  Return the effective gid of the current process.
+ */
 function egid:long () %{ /* pure */
 	THIS->__retvalue = current->egid;		
 %}
 
-///<formalpara id="uid">
-///  <title>uid:long()</title>
-///  <indexterm><primary>uid</primary></indexterm>
-///  <para>
-///	Return the uid of the current process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction uid -User ID of the current process.
+ *
+ *  Return the uid of the current process.
+ */
 function uid:long () %{ /* pure */
 	THIS->__retvalue = current->uid;		
 %}
 
-///<formalpara id="euid">
-///  <title>euid:long()</title>
-///  <indexterm><primary>euid</primary></indexterm>
-///  <para>
-///	Return the effective uid of the current process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction euid - Effective User ID of the current process.
+ *
+ *  Return the effective uid of the current process.
+ */
 function euid:long () %{ /* pure */
 	THIS->__retvalue = current->euid;		
 %}
@@ -173,29 +139,26 @@ function cpuid:long () %{ /* pure */
 	THIS->__retvalue = smp_processor_id();
 %}
 
-///<formalpara id="cpu">
-///  <title>cpu:long()</title>
-///  <indexterm><primary>cpu</primary></indexterm>
-///  <para>
-///     Return the current cpu number.
-///  </para>
-///</formalpara>
+/**
+ * sfunction cpu - The current cpu number.
+ * 
+ *  Return the current cpu number.
+ */
 function cpu:long () %{ /* pure */
 	THIS->__retvalue = smp_processor_id();
 %}
 
-///<formalpara id="print_stack">
-///  <title>print_stack(stk:string)</title>
-///  <indexterm><primary>print_stack</primary></indexterm>
-///  <para>
-///     Perform a symbolic lookup of the addresses in the given  string,
-///     which  is  assumed  to  be  the  result of a prior call to 
-///	<xref linkend="backtrace"/>.
-///     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.
-///  </para>
-///</formalpara>
+/**
+ * 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 
+ *  backtrace().
+ *  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.
+ */
 function print_stack(stk:string) %{
 	char *ptr = THIS->stk;
 	char *tok = strsep(&ptr, " ");
@@ -207,25 +170,21 @@ function print_stack(stk:string) %{
 	}
 %}
 
-///<formalpara id="pp">
-///  <title>pp:string()</title>
-///  <indexterm><primary>pp</primary></indexterm>
-///  <para>
-///     Return the probe point associated with the currently running
-///     probe handler, including alias and wildcard expansion effects.
-///  </para>
-///</formalpara>
+/**
+ * sfunction pp - Current probe point
+ *
+ *  Return the probe point associated with the currently running
+ *  probe handler, including alias and wildcard expansion effects.
+ */
 function pp:string () %{ /* pure */
 	strlcpy (THIS->__retvalue, CONTEXT->probe_point, MAXSTRINGLEN);
 %}
 
-///<formalpara id="probefunc">
-///  <title>probefunc:string()</title>
-///  <indexterm><primary>probefunc</primary></indexterm>
-///  <para>
-///	Return the probe point's function name, if known.
-///  </para>
-///</formalpara>
+/**
+ * sfunction probefunc - Function probed
+ *
+ * Return the probe point's function name, if known.
+ */
 function probefunc:string () %{ /* pure */
 	char *ptr, *start;
 
@@ -257,13 +216,11 @@ function probefunc:string () %{ /* pure */
 	}
 %}
 
-///<formalpara id="probemod">
-///  <title>probemod:string()</title>
-///  <indexterm><primary>probemod</primary></indexterm>
-///  <para>
-///	Return the probe point's module name, if known.
-///  </para>
-///</formalpara>
+/**
+ * sfunction probemod - Module probed
+ *
+ *  Return the probe point's module name, if known.
+ */
 function probemod:string () %{ /* pure */
 	char *ptr, *start;
 
@@ -282,27 +239,23 @@ function probemod:string () %{ /* pure */
 	}
 %}
 
-///<formalpara id="registers_valid">
-///  <title>registers_valid:long()</title>
-///  <indexterm><primary>registers_valid</primary></indexterm>
-///  <para>
-///	Return 1 if register() and u_register() can be used
-///     in the current context, or 0 otherwise.
-///     For example, <command>registers_valid()</command> returns 0
-///     when called from a begin or end probe.
-///  </para>
-///</formalpara>
+/**
+ * sfunction registers_valid - Register information valid
+ *
+ *  Return 1 if register() and u_register() can be used
+ *  in the current context, or 0 otherwise.
+ *  For example, <command>registers_valid()</command> returns 0
+ *  when called from a begin or end probe.
+ */
 function registers_valid:long () %{ /* pure */
 	THIS->__retvalue = (CONTEXT->regs != NULL);
 %}
 
-///<formalpara id="user_mode">
-///  <title>user_mode:long()</title>
-///  <indexterm><primary>user_mode</primary></indexterm>
-///  <para>
-///	Return 1 if the probe point occurred in user-mode.
-///  </para>
-///</formalpara>
+/**
+ * sfunction user_mode - User Mode
+ *
+ * Return 1 if the probe point occurred in user-mode.
+ */
 function user_mode:long () %{ /* pure */ /* currently a user-mode address? */
   if (CONTEXT->regs) {
 #if defined(__i386__) || defined(__x86_64__)
@@ -315,14 +268,12 @@ function user_mode:long () %{ /* pure */ /* currently a user-mode address? */
   }
 %}
 
-///<formalpara id="is_return">
-///  <title>is_return:long()</title>
-///  <indexterm><primary>is_return</primary></indexterm>
-///  <para>
-///	Return 1 if the probe point is a return probe.
-///     <emphasis>Deprecated.</emphasis>
-///  </para>
-///</formalpara>
+/**
+ * sfunction is_return - Is return probe
+ *
+ *  Return 1 if the probe point is a return probe.
+ *  <emphasis>Deprecated.</emphasis>
+ */
 function is_return:long () %{ /* pure */
 	if (CONTEXT->pi)
 		THIS->__retvalue = 1;
@@ -330,13 +281,11 @@ function is_return:long () %{ /* pure */
 		THIS->__retvalue = 0;	
 %}
 
-///<formalpara id="target">
-///  <title>target:long()</title>
-///  <indexterm><primary>target</primary></indexterm>
-///  <para>
-///	Return the pid of the target process.
-///  </para>
-///</formalpara>
+/**
+ * sfunction target - Target pid
+ *
+ *  Return the pid of the target process.
+ */
 function target:long () %{ /* pure */
         THIS->__retvalue = _stp_target;
 %}
@@ -363,50 +312,41 @@ function stp_pid:long () %{ /* pure */
         THIS->__retvalue = _stp_pid;
 %}
 
-///<formalpara id="stack_size">
-///  <title>stack_size:long()</title>
-///  <indexterm><primary>stack_size</primary></indexterm>
-///  <para>
-///	Return the size of the kernel stack.
-///  </para>
-///</formalpara>
+/**
+ * sfunction stack_size - Size of kernel stack
+ *
+ *  Return the size of the kernel stack.
+ */
 function stack_size:long () %{ /* pure */
         THIS->__retvalue = THREAD_SIZE;
 %}
 
-///<formalpara id="stack_used">
-///  <title>stack_used:long ()</title>
-///  <indexterm><primary>stack_used</primary></indexterm>
-///  <para>
-///	Return how many bytes are currently used in the kernel stack.
-///  </para>
-///</formalpara>
+/**
+ * sfunction stack_used - Current amount of kernel stack used
+ *
+ *  Return how many bytes are currently used in the kernel stack.
+ */
 function stack_used:long () %{ /* pure */
 	char a;
         THIS->__retvalue = THREAD_SIZE - ((long)&a & (THREAD_SIZE-1));
 %}
 
-///<formalpara id="stack_unused">
-///  <title>stack_unused:long()</title>
-///  <indexterm><primary>stack_unused</primary></indexterm>
-///  <para>
-///	Return how many bytes are currently available in the kernel stack.
-///  </para>
-///</formalpara>
+/**
+ * sfunction stack_unused - Amount of kernel stack currently available
+ *
+ *  Return how many bytes are currently available in the kernel stack.
+ */
 function stack_unused:long () %{ /* pure */
 	char a;
         THIS->__retvalue = (long)&a & (THREAD_SIZE-1);
 %}
 
-///<formalpara id="caller_addr">
-///  <title>caller_addr:long()</title>
-///  <indexterm><primary>caller_addr</primary></indexterm>
-///  <para>
-///    Return the address of the calling function.
-///    <emphasis> Works only for return probes at this time.</emphasis>
-///	
-///  </para>
-///</formalpara>
+/**
+ * sfunction caller_addr -  Return caller address
+ *
+ *  Return the address of the calling function.
+ *  <emphasis> Works only for return probes at this time.</emphasis>
+ */
 function caller_addr:long () %{ /* pure */
         if (CONTEXT->pi)
 		THIS->__retvalue = (int64_t)(long)_stp_ret_addr_r(CONTEXT->pi);
@@ -414,14 +354,12 @@ function caller_addr:long () %{ /* pure */
 		THIS->__retvalue = 0;
 %}
 
-///<formalpara id="caller">
-///  <title>caller:string()</title>
-///  <indexterm><primary>caller</primary></indexterm>
-///  <para>
-///     Return the address and name of the calling function.
-///	<emphasis>Works only for return probes at this time.</emphasis>
-///  </para>
-///</formalpara>
+/**
+ * sfunction caller - Return name and address of 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 */
         if (CONTEXT->pi) 
 		_stp_symbol_snprint( THIS->__retvalue, MAXSTRINGLEN, 
@@ -430,4 +368,3 @@ function caller:string() %{ /* pure */
 		strlcpy(THIS->__retvalue,"unknown",MAXSTRINGLEN);
 %}
 
-///</chapter>
diff --git a/tapset/memory.stp b/tapset/memory.stp
index 03568ad..9370073 100644
--- a/tapset/memory.stp
+++ b/tapset/memory.stp
@@ -7,34 +7,14 @@
 // Public License (GPL); either version 2, or (at your option) any
 // later version.
 
-///<chapter id="memory_stp">
-///  <title>Memory Tapset</title>
-///  <para>
-///	This family of probe  points is used to probe page fault events.
-///     It contains the following probe points:
-///  </para>
-
-///<formalpara id="vm.pagefault">
-///  <title>vm.pagefault</title>
-///  <indexterm><primary>vm.pagefault</primary></indexterm>
-///  <para>
-///    Records that a page fault occurred.
-///    The context is the process which triggered the fault.</para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>address</term>
-///       <listitem><para>
-///         The address of the faulting memory access.
-///       </para></listitem>
-///    </varlistentry>
-///    <varlistentry><term>write_access</term>
-///       <listitem><para>
-///          Indicates whether this was a write.
-///       </para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
+/**
+ * probe vm.pagefault - Records that a page fault occurred.
+ * @address: The address of the faulting memory access.
+ * @write_access: Indicates whether this was a write.
+ *
+ * Context: The process which triggered the fault
+ *
+ */
 probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
                      kernel.function("handle_mm_fault@mm/memory.c") ?
 {
@@ -42,61 +22,22 @@ probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
 	address =  $address
 }
 
-///<formalpara id="vm.pagefault.return">
-///  <title>vm.pagefault.return</title>
-///  <indexterm><primary>vm.pagefault.return</primary></indexterm>
-///  <para>
-///    Records type of fault that occurred.
-///    The context is the process which triggered the fault.
-///  </para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>fault_type</term>
-///      <listitem><para>The possible values of fault_type are:
-///        <table frame='all'><title>Fault values</title>
-///        <tgroup cols='3' align='left' colsep='1' rowsep='1'>
-///        <colspec colname='Define'/>
-///        <colspec colname='Value'/>
-///        <colspec colname='Reason'/>
-///	   <thead>
-///   	   <row><entry>Define</entry><entry>Value</entry><entry>Reason</entry></row>
-///	   </thead>
-///	   <tbody>
-///	   <row>
-///	     <entry>VM_FAULT_OOM</entry>
-///	     <entry>0</entry>
-///	     <entry>out of memory</entry>
-///	   </row>
-///	   <row>
-///		<entry>VM_FAULT_SIGBUS</entry>
-///		<entry>1</entry>
-///		<entry>if not oom, minor, or major fault, this val</entry>
-///	   </row>
-///	   <row>
-///		<entry>VM_FAULT_MINOR</entry>
-///		<entry>2</entry>
-///		<entry>no blocking operation to handle fault</entry>
-///	   </row>
-///	   <row>
-///		<entry>VM_FAULT_MAJOR</entry>
-///		<entry>3</entry>
-///		<entry>required blocking operation to handle fault</entry>
-///	   </row>
-///	 </tbody>
-///	 </tgroup>
-///	 </table>
-///      </para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
+/**
+ * probe vm.pagefault.return - Records type of fault that occurred.
+ * @fault_type: 0 (VM_FAULT_OOM), 1 (VM_FAULT_SIGBUS),
+ * 		2 (VM_FAULT_MINOR), and 3 (VM_FAULT_MAJOR)
+ */
 probe vm.pagefault.return = kernel.function("__handle_mm_fault@mm/memory.c").return ?,
                             kernel.function("handle_mm_fault@mm/memory.c").return ?
 {
 	fault_type = $return
 }
 
-/* Return which node the given address belongs to in a NUMA system */
+/**
+ * sfunction addr_to_node - Returns which NUMA node has the given address.
+ * @addr: The address of the faulting memory access.
+ *
+ */
 function addr_to_node:long(addr:long) %{ /* pure */ 
 	int nid;
 	int pfn = __pa(THIS->addr) >> PAGE_SHIFT;
@@ -116,64 +57,32 @@ function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */
 %}
 
 
-///<formalpara id="vm.write_shared">
-///  <title>vm.write_shared</title>
-///  <indexterm><primary>vm.write_shared</primary></indexterm>
-///  <para>
-///    Fires when a process attempts to write to a shared page.
-///    If a copy is necessary, this will be followed by a
-///    <xref linkend="vm.write_shared_copy"/>.
-///    The context is the process attempting the write.
-///  </para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>address</term>
-///       <listitem><para>The address of the shared write.</para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
+/**
+ * probe vm.write_shared - Write to shared page.
+ * @address: The address of the shared write.
+ *
+ * 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
+ *  vm.write_shared_copy.
+ */
 probe vm.write_shared = kernel.function("do_wp_page") {
     address = $address
 }
 
-
-///<formalpara id="vm.write_shared_copy">
-///  <title>vm.write_shared_copy</title>
-///  <indexterm><primary>vm.write_shared_copy</primary></indexterm>
-///  <para>
-///    Fires when a write to a shared page requires a page copy.
-///    This is always preceded by a <xref linkend="vm.write_shared"/>.
-///    The context is the process attempting the write.
-///</para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>address</term>
-///       <listitem><para>
-///	    The address of the shared write.
-///       </para></listitem>
-///    </varlistentry>
-///    <varlistentry><term>zero</term>
-///       <listitem><para>
-///	  Boolean indicating whether it is a zero page
-///       (can do a clear instead of a copy).
-///       </para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
-/* probe vm.write_shared_copy
- *
- *  Fires when a write to a shared page requires a page copy.  This is
- *  always preceded by a vm.shared_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).
  *
  * Context:
  *  The process attempting the write.
  *
- * Arguments:
- *  address - the address of the shared write.
- *  zero - boolean indicating whether it is a zero page
- *         (can do a clear instead of a copy).
+ *  Fires when a write to a shared page requires a page copy.  This is
+ *  always preceded by a vm.shared_write.
  */
 probe vm.write_shared_copy = kernel.function("copy_cow_page")? {
     address = $address
@@ -181,34 +90,13 @@ probe vm.write_shared_copy = kernel.function("copy_cow_page")? {
 }
 
 
-///<formalpara id="vm.mmap">
-///  <title>vm.mmap</title>
-///  <indexterm><primary>vm.mmap</primary></indexterm>
-///  <para>
-///    Fires when an mmap is requested. 
-///    The context is the process calling mmap.
-///  </para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>address</term>
-///      <listitem><para>The requested address.</para></listitem>
-///    </varlistentry>
-///    <varlistentry><term>length</term>
-///      <listitem><para>The length of the memory segment.</para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
-/* probe vm.mmap
- *
- *  Fires when an mmap is requested.
+/**
+ * probe vm.mmap - Fires when an mmap is requested.
+ * @address: the requested address
+ * @length: the length of the memory segment 
  *
  * Context:
  *  The process calling mmap.
- *
- * Arguments:
- *  address - the requested address
- *  length - the length of the memory segment 
  */
 probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? {
     address = $addr
@@ -216,93 +104,40 @@ probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? {
 }
 
 
-///<formalpara id="vm.munmap">
-///  <title>vm.munmap</title>
-///  <indexterm><primary>vm.munmap</primary></indexterm>
-///  <para>Fires when an munmap is requested.</para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>address</term>
-///       <listitem><para>The requested address.</para></listitem>
-///    </varlistentry>
-///    <varlistentry><term>length</term>
-///       <listitem><para>The length of the memory segment.</para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
-/* probe vm.munmap
- *
- *  Fires when an munmap is requested.
+/**
+ * probe vm.munmap - Fires when an munmap is requested.
+ * @address: the requested address
+ * @length: the length of the memory segment 
  *
  * Context:
  *  The process calling munmap.
- *
- * Arguments:
- *  address - the requested address
- *  length - the length of the memory segment 
  */
 probe vm.munmap = kernel.function("do_munmap") {
     address = $start
     length = $len
 }
 
-///<formalpara id="vm.brk">
-///  <title>vm.brk</title>
-///  <indexterm><primary>vm.brk</primary></indexterm>
-///  <para>Fires when a brk is requested (resizing a heap).</para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>address</term>
-///       <listitem><para>The requested address.</para></listitem>
-///    </varlistentry>
-///    <varlistentry><term>length</term>
-///       <listitem><para>The length of the memory segment.</para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
-/* probe vm.brk
- *
- *  Fires when a brk is requested (resizing a heap).
+/**
+ * probe vm.brk -Fires when a brk is requested (resizing a heap).
+ * @address - the requested address
+ * @length - the length of the memory segment 
  *
  * Context:
  *  The process calling brk.
- *
- * Arguments:
- *  address - the requested address
- *  length - the length of the memory segment 
  */
 probe vm.brk = kernel.function("do_brk") {
     address = $addr
     length = $len
 }
 
-///<formalpara id="vm.oom_kill">
-///  <title>vm.oom_kill</title>
-///  <indexterm><primary>vm.oom_kill</primary></indexterm>
-///  <para>Fires when a thread is targetted by the OOM killer.</para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>task</term>
-///       <listitem><para>The task being killed.</para></listitem>
-///    </varlistentry>
-///  </variablelist>
-///</para>
-/* probe vm.oom_kill
- *
- *  Fires when a thread is targetted by the OOM killer.
+/**
+ * probe vm.oom_kill - Fires when a thread is targetted by the OOM killer.
+ * @task: the task being killed
  *
  * Context:
  *  The process that tried to consume more memory, and thus
  *  triggered the OOM. (correct?)
- *
- * Arguments:
- *  task - the task being killed
  */
 probe vm.oom_kill = kernel.function("__oom_kill_task") {
     task = $p
 }
-
-///</chapter>
diff --git a/tapset/networking.stp b/tapset/networking.stp
index decd62a..d6e9025 100644
--- a/tapset/networking.stp
+++ b/tapset/networking.stp
@@ -6,36 +6,17 @@
 // Public License (GPL); either version 2, or (at your option) any
 // later version.
 
-///<chapter id="networking.stp">
-///  <title>Networking Tapset</title>
-///  <para>
-///	This family of probe points is used to probe the activities of
-///     network device. 
-///  </para>
-
 %{
 #include <linux/netdevice.h>
 %}
 
-///<formalpara id="netdev.receive">
-///  <title>netdev.receive</title>
-///  <indexterm><primary>netdev.receive</primary></indexterm>
-///  <para>Fires when data arrives on network device.</para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>dev_name</term>
-///       <listitem><para>
-///          The name of the device. e.g: eth0, ath1
-///       </para></listitem>
-///    </varlistentry>
-///
-///    <varlistentry><term>length</term>
-///       <listitem><para>
-///           The length of the receiving buffer
-///       </para></listitem>
-///    </varlistentry>
-///
+/**
+ * probe netdev.receive - Data recieved from network device.
+ * @dev_name: The name of the device. e.g: eth0, ath1.
+ * @length: The length of the receiving buffer.
+ * @protocol: Protocol of recieved packet.
+ *
+ */
 ///    <varlistentry><term>protocol</term>
 ///       <listitem><para>The possible values of protocol could be:
 ///         <table frame='all'><title>Protocol Values</title>
@@ -82,39 +63,14 @@ probe netdev.receive
 	truesize = $skb->truesize
 }
 
-///<formalpara id="netdev.transmit">
-///  <title>netdev.transmit</title>
-///  <indexterm><primary>netdev.transmit</primary></indexterm>
-///  <para> Fires when the network device wants to transmit a buffer.</para>
-///</formalpara>
-///<para>
-///  <variablelist><title>Arguments:</title>
-///    <varlistentry><term>dev_name</term>
-///       <listitem><para>
-///          The name of the device. e.g: eth0, ath1
-///       </para></listitem>
-///    </varlistentry>
-///
-///    <varlistentry><term>length</term>
-///       <listitem><para>
-///         The length of the transmit buffer
-///       </para></listitem>
-///    </varlistentry>
-///
-///    <varlistentry><term>protocol</term>
-///       <listitem><para>
-///         The protocol of this packet.
-///       </para></listitem>
-///    </varlistentry>
-///
-///    <varlistentry><term>truesize</term>
-///       <listitem><para>
-///         The size of the the data to be transmitted.
-///       </para></listitem>
-///    </varlistentry>
-///
-///  </variablelist>
-///</para>
+/**
+ * probe netdev.transmit - Network device transmitting buffer
+ * @dev_name: The name of the device. e.g: eth0, ath1.
+ * @length: The length of the transmit buffer.
+ * @protocol: The protocol of this packet.
+ * @truesize: The size of the the data to be transmitted.
+ *
+ */
 /* Queue a buffer for transmission to a network device */
 probe netdev.transmit
 	=  kernel.function("dev_queue_xmit")
@@ -124,5 +80,3 @@ probe netdev.transmit
 	protocol = $skb->protocol
 	truesize = $skb->truesize
 }
-
-///</chapter>
diff --git a/tapset/timestamp.stp b/tapset/timestamp.stp
index 4c8592a..29763cb 100644
--- a/tapset/timestamp.stp
+++ b/tapset/timestamp.stp
@@ -7,79 +7,57 @@
 // Public License (GPL); either version 2, or (at your option) any
 // later version.
 
-///<chapter id="timestamp_stp">
-///  <title>Timestamp Functions</title>
-///  <para>
-///	Each timestamp function returns a value to indicate when
-///     the function is executed.
-///     Thus, these returned values can be used to indicate
-///     when an event occurs, provide an ordering for events, or compute
-///	the amount of time elapsed between to time stamps.
-///  </para>
-
 %{
 #include <linux/time.h>
 %}
 
-///<formalpara id="get_cycles">
-///  <title>get_cycles:long()</title>
-///  <indexterm><primary>get_cycles</primary></indexterm>
-///  <para>
-///	Return the processor cycle counter value, or 0 if unavailable.
-///  </para>
-///</formalpara>
+/**
+ * sfunction get_cycles - Processor cycle count.
+ *
+ *  Return the processor cycle counter value, or 0 if unavailable.
+ */
 function get_cycles:long () %{ /* pure */
   cycles_t c = get_cycles();
   THIS->__retvalue = (int64_t) c;
 %}
 
 
-///<formalpara id="gettimeofday_ns">
-///  <title>gettimeofday_ns:long ()</title>
-///  <indexterm><primary>gettimeofday_ns</primary></indexterm>
-///  <para>
-///	Return the number of nanoseconds since the UNIX epoch.
-///  </para>
-///</formalpara>
+/**
+ * sfunction gettimeofday_ns - Number of nanoseconds since UNIX epoch.
+ *
+ *  Return the number of nanoseconds since the UNIX epoch.
+ */
 function gettimeofday_ns:long () %{ /* pure */
   /* NOTE: we can't use do_gettimeofday because we could be called from a
    * context where xtime_lock is already held.  See bug #2525. */
   THIS->__retvalue = _stp_gettimeofday_ns();
 %}
 
-///<formalpara id="gettimeofday_us">
-///  <title>gettimeofday_us:long ()</title>
-///  <indexterm><primary>gettimeofday_us</primary></indexterm>
-///  <para>
-///	Return the number of microseconds since the UNIX epoch.
-///  </para>
-///</formalpara>
+/**
+ * sfunction gettimeofday_us - Number of microseconds since UNIX epoch.
+ *
+ *  Return the number of microseconds since the UNIX epoch.
+ */
 function gettimeofday_us:long () {
   return gettimeofday_ns() / 1000;
 }
 
-///<formalpara id="gettimeofday_ms">
-///  <title>gettimeofday_ms:long ()</title>
-///  <indexterm><primary>gettimeofday_ms</primary></indexterm>
-///  <para>
-///	Return the number of milliseconds since the UNIX epoch.
-///  </para>
-///</formalpara>
+/**
+ * sfunction gettimeofday_ms - Number of milliseconds since UNIX epoch.
+ *
+ *  Return the number of milliseconds since the UNIX epoch.
+ */
 function gettimeofday_ms:long () {
   return gettimeofday_ns() / 1000000;
 }
 
-///<formalpara id="gettimeofday_s">
-///  <title>gettimeofday_s:long ()</title>
-///  <indexterm><primary>gettimeofday_s</primary></indexterm>
-///  <para>
-///	Return the number of seconds since the UNIX epoch.
-///  </para>
-///</formalpara>
+/**
+ * sfunction gettimeofday_s - Number of seconds since UNIX epoch.
+ *
+ * Return the number of seconds since the UNIX epoch.
+ */
 function gettimeofday_s:long () {
   return gettimeofday_ns() / 1000000000;
 }
 
 // likewise jiffies, monotonic_clock ...
-
-///</chapter>
-- 
1.5.6.5

