]> sourceware.org Git - systemtap.git/commitdiff
docs: clean up stapfuncs/stapprobes man pages, deprecate probefunc()
authorFrank Ch. Eigler <fche@elastic.org>
Thu, 6 May 2010 18:53:32 +0000 (14:53 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Thu, 6 May 2010 18:53:32 +0000 (14:53 -0400)
* probefuncs.3stap.in: Remove most sections that are redundant with
  automatically extracted documentation in individual function::*(stap)
  man pages.
* probeprobes.3stap.in: Ditto for probes::*(stap).
* tapset/context-symbols.stp (probefunc): Describe as deprecated.

stapfuncs.3stap.in
stapprobes.3stap.in
tapset/context-symbols.stp

index 48018b417b5afe9f5a37cbffaa44b7bfc0b4e6f3..0dc35ae01e20d3a30b818b32b7c16bcd0a32b32a 100644 (file)
@@ -4,9 +4,15 @@
 stapfuncs \- systemtap functions
 
 .SH DESCRIPTION
-The following sections enumerate the public functions provided by
-standard tapsets installed under @prefix@/share/systemtap/tapset.  Each
-function is described with a signature, and its behavior/restrictions.
+The following sections enumerate a few of public functions provided by
+standard tapsets installed under @prefix@/share/systemtap/tapset.   Most
+are individually documented in the 
+.IR 3stap
+manual section, with the
+.IR function::
+prefix.
+.PP
+Each function is described with a signature, and its behavior/restrictions.
 The signature line includes the name of the function, the type of
 its return value (if any), and the names and types of all parameters.
 The syntax is the same as printed with the 
@@ -24,219 +30,6 @@ In function "example2", do something.  There is no explicit return value
 and take no parameters.
 
 
-.SS CONVERSIONS
-.PP
-These functions access kernel or user-space data.  They try to validate the
-supplied addresses, and can thus result in errors if the pointers are invalid,
-or if a user-space access would cause a fault.
-.TP
-kernel_string:string (addr:long)
-Copy a 0-terminated string from kernel space at given address.
-.TP
-kernel_string_n:string (addr:long, n:long)
-Similar with kernel_string, except that not more than n bytes are copied.
-Thus, if there are null bytes among the first n bytes, it is same as
-kernel_string(addr). If not, n bytes will be copied and a null byte will
-be padded to the end.
-.TP
-kernel_long:long (addr:long)
-Copy a long from kernel space at given address.
-.TP
-kernel_int:long (addr:long)
-Copy an int from kernel space at given address.
-.TP
-kernel_short:long (addr:long)
-Copy a short from kernel space at given address.
-.TP
-kernel_char:long (addr:long)
-Copy a char from kernel space at given address.
-.TP
-user_string:string (addr:long)
-Copy a string from user space at given address.  If the access would
-fault, return "<unknown>" and signal no errors.
-.TP
-user_string2:string (addr:long, err_msg:string)
-Copy a string from user space at given address.  If the access would
-fault, return instead the err_msg value.
-.TP
-user_string_warn:string (addr:long)
-Copy a string from user space at given address.  If the access would
-fault, signal a warning and return "<unknown>".
-.TP
-user_string_quoted:string (addr:long)
-Copy a string from user space at given address. Any ASCII characters
-that are not printable are replaced by the corresponding escape
-sequence in the returned string.
-.TP
-user_string_n:string (addr:long, n:long)
-Copy a string of n bytes from user space at given address. If the access
-would fault, return "<unknown>".
-.TP
-user_string_n2:string (addr:long, n:long, err_msg:string)
-Copy a string of n bytes from user space at given address. If the access
-would fault, return the err_msg value.
-.TP
-user_string_n_warn:string (addr:long, n:long)
-Copy a string of n bytes from user space at given address. If the access
-would fault, signal a warning and return "<unknown>".
-.TP
-user_string_n_quoted:string (addr:long, n:long)
-Copy a string of n bytes from user space at given address. Any ASCII
-characters that are not printable are replaced by the corresponding escape
-sequence in the returned string. If the access would fault, return "<unknown>".
-.TP
-user_short:long (addr:long)
-Copy a short from user space at given address. If the access would fault,
-return 0.
-.TP
-user_short_warn:long (addr:long)
-Copy a short from user space at given address. If the access would fault,
-signal a warning and return 0.
-.TP
-user_int:long (addr:long)
-Copy an int from user space at given address. If the access would fault,
-return 0.
-.TP
-user_int_warn:long (addr:long)
-Copy an int from user space at given address. If the access would fault,
-signal a warning and return 0.
-.TP
-user_long:long (addr:long)
-Copy a long from user space at given address. If the access would fault,
-return 0.
-.TP
-user_long_warn:long (addr:long)
-Copy a long from user space at given address. If the access would fault,
-signal a warning and return 0.
-.TP
-user_char:long (addr:long)
-Copy a char from user space at given address. If the access would fault,
-return 0.
-.TP
-user_char_warn:long (addr:long)
-Copy a char from user space at given address. If the access would fault,
-signal a warning and return 0.
-.SS STRING
-.TP
-strlen:long (str:string)
-Return the number of characters in str.
-.TP
-substr:string (str:string,start:long, stop:long)
-Return the substring of str starting from character start and ending at character stop.
-.TP
-stringat:string (str:string,pos:long)
-Return the character in given position of string.
-.TP
-isinstr:long (s1:string, s2:string)
-Return 1 if string s1 contains string s2, returns 0 otherwise.
-.TP
-strtol:long (str:string, base:long)
-Convert the string representation of a number to a long using the numbering system
-specified by base.  For example, strtol("1000", 16) returns 4096.  Returns 0 if the
-string cannot be converted.
-.TP
-tokenize:string (str:string, delim:string)
-Return the next non-empty token in the given str string, where the tokens are
-delimited by characters in the delim string.  If the str string is not blank,
-it returns the first token.  If the str string is blank, it returns the next
-token in the string passed in the previous call to tokenize. If no delimiter
-is found, the entire remaining str string is returned.  Returns blank when
-no more tokens are left.
-
-.SS TIMESTAMP
-.TP
-get_cycles:long ()
-Return the processor cycle counter value, or 0 if unavailable.
-.TP
-gettimeofday_ns:long ()
-Return the number of nanoseconds since the UNIX epoch.
-.TP
-gettimeofday_us:long ()
-Return the number of microseconds since the UNIX epoch.
-.TP
-gettimeofday_ms:long ()
-Return the number of milliseconds since the UNIX epoch.
-.TP
-gettimeofday_s:long ()
-Return the number of seconds since the UNIX epoch.
-
-.SS CONTEXT INFO
-.TP
-cpu:long ()
-Return the current cpu number.
-.TP
-execname:string ()
-Return the name of the current process.
-.TP
-pexecname:string()
-Return the name of the parent process.
-.TP
-tid:long ()
-Return the id of the current thread.
-.TP
-pid:long ()
-Return the id of the current process.
-.TP
-ppid:long ()
-Return the id of the parent process.
-.TP
-pgrp:long ()
-Return the pgrp of the current process.
-.TP
-sid:long ()
-Return the sid of the current process.
-.TP
-uid:long ()
-Return the uid of the current process.
-.TP
-euid:long ()
-Return the effective uid of the current process.
-.TP
-gid:long ()
-Return the gid of the current process.
-.TP
-egid:long ()
-Return the effective gid of the current process.
-.TP
-print_regs:unknown ()
-Print a register dump.
-.TP
-backtrace:string ()
-Return a string of hex addresses that are a backtrace of the stack.
-It may be truncated due to maximum string length.
-.TP
-print_stack:unknown (bt:string)
-Perform a symbolic lookup of the addresses in the given string,
-which is assumed to be the result of a prior call to
-.IR 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.
-.TP
-print_backtrace:unknown ()
-Equivalent to
-.IR print_stack(backtrace()) ,
-except that deeper stack nesting may be supported.  Return nothing.
-.TP
-pp:string ()
-Return the probe point associated with the currently running probe handler,
-including alias and wildcard expansion effects.
-.TP
-probefunc:string ()
-Return the probe point's function name, if known.
-.TP
-probemod:string ()
-Return the probe point's module name, if known.
-.TP
-target:long ()
-Return the pid of the target process.
-.TP
-user_mode:long ()
-Return 1 if the probe point occurred in user-mode.
-.TP
-is_return:long ()
-Return 1 if the probe point is a return probe.  Deprecated.
-
 .SS TARGET_SET
 .TP
 target_set_pid:long (tid:long)
@@ -252,93 +45,7 @@ errno_str:string (e:long)
 Return the symbolic string associated with the given error code, like
 "ENOENT" for the number 2, or "E#3333" for an out-of-range value like 3333.
 
-.SS TASK
-.PP
-These functions return data about a task.  They all require
-a task handle as input, such as the value return by task_current() or the variables
-prev_task and next_task in the scheduler.ctxswitch probe alias.
-
-.TP
-task_current:long()
-Return the task_struct of the current process.
-
-.TP
-task_parent:long(task:long)
-Return the parent task_struct of the given task.
-.TP
-task_state:long(task:long)
-Return the state of the given task, which can be one of the following:
-
-   TASK_RUNNING           0
-   TASK_INTERRUPTIBLE     1
-   TASK_UNINTERRUPTIBLE   2
-   TASK_STOPPED           4
-   TASK_TRACED            8
-   EXIT_ZOMBIE           16
-   EXIT_DEAD             32
-
-.TP
-task_execname:string(task:long)
-Return the name of the given task.
-
-.TP
-task_pid:long(task:long)
-Return the process id of the given task.
-
-.TP
-task_tid:long(task:long)
-Return the thread id of the given task.
-
-.TP
-task_gid:long(task:long)
-Return the group id of the given task.
-
-.TP
-task_egid:long(task:long)
-Return the effective group id of the given task.
-
-.TP
-task_uid:long(task:long)
-Return the user id of the given task.
-
-.TP
-task_euid:long(task:long)
-Return the effective user id of the given task.
-
-.TP
-task_prio:long(task:long)
-Return the priority of the given task.
-
-.TP
-task_nice:long(task:long)
-Return the nice value of the given task.
-
-.TP
-task_cpu:long(task:long)
-Return the scheduled cpu for the given task.
-
-.TP
-task_open_file_handles:long(task:long)
-Return the number of open file handles for the given task.
-
-.TP
-task_max_file_handles:long(task:long)
-Return the maximum number of file handles for the given task.
-
-.TP
-pid2task:long(pid:long)
-Return the task of the given process id.
-
-.TP
-pid2execname:string(pid:long)
-Return the name of the given process id.
-
-.SS CPU REGISTERS
-.TP
-registers_valid:long ()
-Return 1 if register() and u_register() can be used
-in the current context, or 0 otherwise.
-For example, registers_valid() returns 0 when called from a begin or end probe.
+.SS REGISTERS
 .TP
 register:long (name:string)
 Return the value of the named CPU register,
@@ -529,62 +236,6 @@ system (cmd:string)
 Runs a command on the system. The command will run in the background
 when the current probe completes.
 
-.SS NUMA
-.TP
-addr_to_node:long (addr:long)
-Return which node the given address belongs to in a NUMA system.
-
-.SS CTIME
-.TP
-ctime:string (seconds:long)
-Return a simple textual rendering (e.g., "Wed\ Jun\ 30\ 21:49:008\ 1993")
-of the given number of seconds since the epoch, as perhaps returned by
-.IR gettimeofday_s() .
-
-.SS PERFMON
-.TP
-read_counter:long (handle:long)
-Returns the value for the processor's performance counter for the associated
-handle. The body of the a perfmon probe should set record
-the handle being used for that event.
-
-.SS SOCKETS
-These functions convert arguments in the socket tapset back and
-forth between their numeric and string representations.
-See 
-.IR stapprobes.socket (3stap)
-for details.
-
-.TP
-sock_prot_num2str:string (proto:long)
-Returns the string representation of the given protocol value.
-.TP
-sock_prot_str2num:long (proto:string)
-Returns the numeric value associated with the given protocol string.
-.TP
-sock_fam_num2str:string (family:long)
-Returns the string representation of the given protocol family value.
-.TP
-sock_fam_str2num:long (family:string)
-Returns the numeric value associated with the given protocol family string.
-.TP
-sock_state_num2str:string (state:long)
-Returns the string representation of the given socket state value.
-.TP
-sock_state_str2num:long (state:string)
-Returns the numeric value associated with the given socket state string.
-.TP
-sock_type_num2str:string (type:long)
-Returns the string representation of the given socket type value.
-.TP
-sock_type_str2num:long (type:string)
-Returns the numeric value associated with the given socket type string.
-.TP
-sock_flags_num2str:string (flags:long)
-Returns the string representation of the given socket flags value.
-.TP
-msg_flags_num2str:string (flags:long)
-Returns the string representation of the given message flags bit map.
 
 .SS INET
 These functions convert between network (big-endian) and host byte order, like their
@@ -652,4 +303,6 @@ Converts a user-space device number into the format used in the kernel.
 .hy
 
 .SH SEE ALSO
-.IR stap (1)
+.IR stap (1),
+.IR function::* (3stap),
+.IR tapset::* (3stap)
index 14591acbf642d4e2b422f27a607ffd3c818a3666..c33b65b7f5e434e0c31da01033e3ae1397b4a0b4 100644 (file)
@@ -18,8 +18,12 @@ stapprobes \- systemtap probe points
 
 .SH DESCRIPTION
 The following sections enumerate the variety of probe points supported
-by the systemtap translator, and additional aliases defined by
-standard tapset scripts.
+by the systemtap translator, and some of the additional aliases defined by
+standard tapset scripts.  Many are individually documented in the
+.IR 3stap
+manual section, with the
+.IR probe::
+prefix.
 .PP
 The general probe point syntax is a dotted-symbol sequence.  This
 allows a breakdown of the event namespace into parts, somewhat like
@@ -816,16 +820,5 @@ the kernel for error- and safety-checking.
 
 .SH SEE ALSO
 .IR stap (1),
-.IR tapset::iosched (3stap),
-.IR tapset::netdev (3stap),
-.IR tapset::nfs (3stap),
-.IR tapset::nfsd (3stap),
-.IR tapset::pagefault (3stap),
-.IR tapset::process (3stap),
-.IR tapset::rpc (3stap),
-.IR tapset::scsi (3stap),
-.IR tapset::signal (3stap),
-.IR tapset::socket (3stap),
-.IR tapset::tcp (3stap),
-.IR tapset::udp (3stap),
-.IR proc (3stap)
+.IR probe::* (3stap),
+.IR tapset::* (3stap)
index f38c9ec187932739bb129d11758cf87c25d3b4c8..764a79d3011fa712190f63a96bf7b23d8197f272 100644 (file)
@@ -42,6 +42,7 @@ function print_stack(stk:string) %{
 
 /**
  * sfunction probefunc - Return the probe point's function name, if known.
+ * Deprecated.  Use symname() and/or usymname().
  */
 function probefunc:string () %{ /* pure */
        char *ptr, *start;
This page took 0.036287 seconds and 5 git commands to generate.