PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
if BUILD_HTMLDOCS
sed -e '/^!Syscalls/{r $(abs_srcdir)/syscalls.xmlpart' -e 'd}' $(abs_srcdir)/tapsets.tmpl > tapsets.tmpl.new
SRCTREE=$(SRCTREE) $(DOCPROC) doc tapsets.tmpl.new > tapsets.xml.new
- xsltproc $(srcdir)/sort-tapsets.xslt tapsets.xml.new > tapsets.xml.new2
- rm tapsets.xml.new tapsets.tmpl.new
+ python $(srcdir)/overload.py tapsets.xml.new > tapsets.xml.new1
+ xsltproc $(srcdir)/sort-tapsets.xslt tapsets.xml.new1 > tapsets.xml.new2
+ rm tapsets.xml.new tapsets.xml.new1 tapsets.tmpl.new
if test -s tapsets.xml && cmp tapsets.xml.new2 tapsets.xml >/dev/null ; then \
echo tapsets.xml unchanged; \
rm tapsets.xml.new2; \
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
@BUILD_REFDOCS_TRUE@tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp')
@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ sed -e '/^!Syscalls/{r $(abs_srcdir)/syscalls.xmlpart' -e 'd}' $(abs_srcdir)/tapsets.tmpl > tapsets.tmpl.new
@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ SRCTREE=$(SRCTREE) $(DOCPROC) doc tapsets.tmpl.new > tapsets.xml.new
-@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ xsltproc $(srcdir)/sort-tapsets.xslt tapsets.xml.new > tapsets.xml.new2
-@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ rm tapsets.xml.new tapsets.tmpl.new
+@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ python $(srcdir)/overload.py tapsets.xml.new > tapsets.xml.new1
+@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ xsltproc $(srcdir)/sort-tapsets.xslt tapsets.xml.new1 > tapsets.xml.new2
+@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ rm tapsets.xml.new tapsets.xml.new1 tapsets.tmpl.new
@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ if test -s tapsets.xml && cmp tapsets.xml.new2 tapsets.xml >/dev/null ; then \
@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ echo tapsets.xml unchanged; \
@BUILD_HTMLDOCS_TRUE@@BUILD_REFDOCS_TRUE@ rm tapsets.xml.new2; \
--- /dev/null
+#! /usr/bin/python
+# XML tree transformation for systemtap function overloading
+# This script merges all overloaded tapset function entries
+# into one entry.
+
+import sys
+from lxml import etree
+
+DEBUG = 0
+
+def collect_overloads(refentries):
+ """
+ Collect overloads into lists.
+ """
+ functions = {}
+ for entry in refentries:
+ name = entry.xpath("refnamediv/refname")[0].text
+ if name not in functions:
+ functions[name] = []
+ functions[name].append(entry)
+ return {k: v for (k, v) in functions.items() if len(v) > 1}
+
+def get_params(functions):
+ """
+ Return a parameter list containing the parameters for all overloads.
+ """
+ seen = set()
+ params = []
+ for overload in functions:
+ refsect = overload.xpath("refsect1[1]")[0]
+ # add variablelist node for future construction
+ if len(refsect.xpath("variablelist")) == 0:
+ refsect.remove(refsect[1])
+ etree.SubElement(refsect, "variablelist")
+ continue
+ param_list = refsect.xpath("variablelist")[0].getchildren()
+ for param in param_list:
+ name = param.xpath("term/parameter")[0].text
+ if name not in seen:
+ seen.add(name)
+ params.append(param)
+ return params
+
+def annotate(entry):
+ """
+ Numbers all overloaded entries.
+ """
+ num_overloads = len(entry.xpath("refsect1[2]/para"))
+ synopsis = entry.xpath("refsynopsisdiv/programlisting")
+ description = entry.xpath("refsect1[2]/para")
+ for i in range(num_overloads):
+ synopsis[i].text = str(i+1) + ")" + " " + synopsis[i].text.strip()
+ description[i].text = str(i+1) + ")" + " " + description[i].text.strip()
+
+def merge(functions):
+ """
+ Merge matching refentries into one and delete them from their parents.
+ """
+ merged = functions[0]
+
+ # merge params
+ new_params = get_params(functions)
+ param_list = merged.xpath("refsect1[1]/variablelist")[0]
+ for param in param_list:
+ param.getparent().remove(param)
+ for param in new_params:
+ param_list.append(param)
+
+ # merge synopsis and descriptions
+ description = merged.xpath("refsect1[2]")[0]
+ synopsis = merged.xpath("refsynopsisdiv")[0]
+ for overload in functions[1:]:
+ synopsis.append(overload.xpath("refsynopsisdiv/programlisting")[0])
+ description.append(overload.xpath("refsect1[2]/para")[0])
+ overload.getparent().remove(overload)
+
+ annotate(merged)
+
+def merge_overloads(functions_list):
+ for functions in functions_list.values():
+ merge(functions)
+
+def usage():
+ print "Usage: ./overload.py <xml>"
+
+def main():
+ if len(sys.argv) != 2:
+ usage()
+ sys.exit()
+ parser = etree.XMLParser(remove_comments=False)
+ tree = etree.parse(sys.argv[1], parser=parser)
+ root = tree.getroot()
+ refentries = [r for r in root.iter("refentry")]
+ functions = collect_overloads(refentries)
+ merge_overloads(functions)
+ print etree.tostring(root, encoding='UTF-8', xml_declaration=True,
+ doctype=tree.docinfo.doctype)
+
+if __name__ == '__main__':
+ main()
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-@BUILD_DOCS_FALSE@uninstall-local:
@BUILD_DOCS_FALSE@clean-local:
+@BUILD_DOCS_FALSE@uninstall-local:
@BUILD_DOCS_FALSE@install-data-hook:
clean: clean-am
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
gcc -o docproc $DOCS/$STR/docproc.c
sed -e '/^!Syscalls/{r $DOCS/$STR/syscalls.xmlpart' -e 'd}' $DOCS/$STR/tapsets.tmpl > tapsets.tmpl.new
SRCTREE=$BASE/ ./docproc doc tapsets.tmpl.new > tapsets.xml.new
-xsltproc $DOCS/$STR/sort-tapsets.xslt tapsets.xml.new > tapsets.xml.new2
-rm tapsets.xml.new tapsets.tmpl.new
+python $DOCS/$STR/overload.py tapsets.xml.new > tapsets.xml.new1
+xsltproc $DOCS/$STR/sort-tapsets.xslt tapsets.xml.new1 > tapsets.xml.new2
+rm tapsets.xml.new tapsets.xml.new1 tapsets.tmpl.new
if test -s tapsets.xml && cmp tapsets.xml.new2 tapsets.xml >/dev/null ; then
echo tapsets.xml unchanged;
rm tapsets.xml.new2;
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
}
/**
- * sfunction ansi_set_color2 - Set the ansi Select Graphic Rendition mode.
+ * sfunction ansi_set_color - Set the ansi Select Graphic Rendition mode.
* @fg: Foreground color to set.
* @bg: Background color to set.
*
* background color, Black (40), Red (41), Green (42), Yellow (43),
* Blue (44), Magenta (45), Cyan (46), White (47).
*/
-function ansi_set_color2(fg:long, bg:long) {
+function ansi_set_color(fg:long, bg:long) {
printf("\033[%d;%dm", bg, fg)
}
/**
- * sfunction ansi_set_color3 - Set the ansi Select Graphic Rendition mode.
+ * sfunction ansi_set_color - Set the ansi Select Graphic Rendition mode.
* @fg: Foreground color to set.
* @bg: Background color to set.
* @attr: Color attribute to set.
* All attributes off (0), Intensity Bold (1), Underline Single (4),
* Blink Slow (5), Blink Rapid (6), Image Negative (7).
*/
-function ansi_set_color3(fg:long, bg:long, attr:long) {
+function ansi_set_color(fg:long, bg:long, attr:long) {
attr_str = attr ? sprintf(";%dm", attr) : "m"
printf("\033[%d;%d%s", bg, fg, attr_str)
}
* attribute to default values.
*/
function ansi_reset_color() {
- ansi_set_color3(0, 0, 0)
+ ansi_set_color(0, 0, 0)
}
/**
if (env_start != 0 && env_end != 0)
{
len = env_end - env_start;
- cur = user_string2(env_start, "");
+ cur = user_string(env_start, "");
env_name = tokenize(cur, "=");
while (env_name != name && len > 0)
{
len -= env_len + 1;
if (len > 0)
{
- cur = user_string2(env_start, "");
+ cur = user_string(env_start, "");
env_name = tokenize(cur, "=");
}
else
(m<0 || __nr<=m); // caller still interested?
__nr++) {
- __arg = user_string2(__arg_start, ""); // argv[__nr], unquoted
+ __arg = user_string(__arg_start, ""); // argv[__nr], unquoted
__arg_start += strlen(__arg) + 1; // skip over for next iteration
if (__nr == n) // caller starting to get interested?
%}
/**
- * sfunction kernel_string2 - Retrieves string from kernel memory with alternative error string
+ * sfunction kernel_string - Retrieves string from kernel memory with alternative error string
* @addr: The kernel address to retrieve the string from
* @err_msg: The error message to return when data isn't available
*
* from a given kernel memory address. Reports the given error message
* on string copy fault.
*/
-function kernel_string2:string (addr:long, err_msg:string) {
+function kernel_string:string (addr:long, err_msg:string) {
try { return kernel_string(addr) } catch { return err_msg }
}
%}
/**
- * sfunction kernel_string2_utf32 - Retrieves UTF-32 string from kernel memory with alternative error string
+ * sfunction kernel_string_utf32 - Retrieves UTF-32 string from kernel memory with alternative error string
* @addr: The kernel address to retrieve the string from
* @err_msg: The error message to return when data isn't available
*
* from the UTF-32 string at a given kernel memory address. Reports the given
* error message on string copy fault or conversion error.
*/
-function kernel_string2_utf32:string (addr:long, err_msg:string) {
+function kernel_string_utf32:string (addr:long, err_msg:string) {
try { return kernel_string_utf32(addr) } catch { return err_msg }
}
%}
/**
- * sfunction kernel_string2_utf16 - Retrieves UTF-16 string from kernel memory with alternative error string
+ * sfunction kernel_string_utf16 - Retrieves UTF-16 string from kernel memory with alternative error string
* @addr: The kernel address to retrieve the string from
* @err_msg: The error message to return when data isn't available
*
* from the UTF-16 string at a given kernel memory address. Reports the given
* error message on string copy fault or conversion error.
*/
-function kernel_string2_utf16:string (addr:long, err_msg:string) {
+function kernel_string_utf16:string (addr:long, err_msg:string) {
try { return kernel_string_utf16(addr) } catch { return err_msg }
}
kernel.function("elv_next_request")
{
name = "elv_next_request"
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
= kernel.function("elv_completed_request")
{
name = "elv_completed_request"
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
kernel.function("__elv_add_request")
{
name = "elv_add_request"
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
{
name = "elv_add_request"
q = $q
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
= kernel.trace("block_rq_complete") ?
{
name = "elv_completed_request"
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
= kernel.trace("block_rq_issue") ?
{
name = "elv_issue_request"
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
= kernel.trace("block_rq_requeue") ?
{
name = "elv_requeue_request"
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
= kernel.trace("block_rq_abort") ?
{
name = "elv_abort_request"
- elevator_name = kernel_string2(
+ elevator_name = kernel_string(
@choose_defined($q->elevator->type->elevator_name,
@choose_defined($q->elevator->elevator_type->elevator_name,
$q->elevator->elevator_name)), "")
argstr = sprintf("%s, %s, %s, %u, %d",
user_string_quoted(type_uaddr),
user_string_quoted(description_uaddr),
- user_string_n2_quoted(payload_uaddr, plen, syscall_string_trunc),
+ user_string_n_quoted(payload_uaddr, plen, syscall_string_trunc),
plen, ringid)
}
probe nd_syscall.add_key.return = kprobe.function("sys_add_key").return ?
count = ulong_arg(3)
offset = longlong_arg(4)
argstr = sprintf("%d, %s, %u, %d", fd,
- user_string_n2_quoted(buf_uaddr, count, syscall_string_trunc),
+ user_string_n_quoted(buf_uaddr, count, syscall_string_trunc),
count, offset)
}
probe nd_syscall.pwrite.return = kprobe.function("sys_pwrite64").return ?
count = ulong_arg(3)
offset = (u32_arg(4) << 32) + u32_arg(5)
argstr = sprintf("%d, %s, %u, %d", fd,
- user_string_n2_quoted(buf_uaddr, count,
+ user_string_n_quoted(buf_uaddr, count,
syscall_string_trunc),
count, offset)
}
buf_uaddr = pointer_arg(2)
count = ulong_arg(3)
argstr = sprintf("%d, %s, %u", fd,
- user_string_n2_quoted(buf_uaddr, count,
+ user_string_n_quoted(buf_uaddr, count,
syscall_string_trunc),
count)
}
indev = & @cast($in, "struct net_device", "kernel<linux/netdevice.h>")
outdev = & @cast($out, "struct net_device", "kernel<linux/netdevice.h>")
- indev_name = kernel_string2(indev->name, "")
- outdev_name = kernel_string2(outdev->name, "")
+ indev_name = kernel_string(indev->name, "")
+ outdev_name = kernel_string(outdev->name, "")
if (indev) {
indev_mac_len = indev->addr_len
}
/**
- * sfunction proc_mem_size_pid - Total program virtual memory size in pages
+ * sfunction proc_mem_size - Total program virtual memory size in pages
*
* @pid: The pid of process to examine
*
* given process, or zero when that process doesn't exist or the
* number of pages couldn't be retrieved.
*/
-function proc_mem_size_pid:long (pid:long)
+function proc_mem_size:long (pid:long)
{
task = pid2task(pid)
if (_stp_valid_task(task)) {
}
/**
- * sfunction proc_mem_rss_pid - Program resident set size in pages
+ * sfunction proc_mem_rss - Program resident set size in pages
*
* @pid: The pid of process to examine
*
* process, or zero when the process doesn't exist or the number of
* pages couldn't be retrieved.
*/
-function proc_mem_rss_pid:long (pid:long)
+function proc_mem_rss:long (pid:long)
{
task = pid2task(pid)
if (_stp_valid_task(task)) {
}
/**
- * sfunction proc_mem_shr_pid - Program shared pages (from shared mappings)
+ * sfunction proc_mem_shr - Program shared pages (from shared mappings)
*
* @pid: The pid of process to examine
*
* given process, or zero when the process doesn't exist or the
* number of pages couldn't be retrieved.
*/
-function proc_mem_shr_pid:long (pid:long)
+function proc_mem_shr:long (pid:long)
{
task = pid2task(pid)
if (_stp_valid_task(task)) {
}
/**
- * sfunction proc_mem_txt_pid - Program text (code) size in pages
+ * sfunction proc_mem_txt - Program text (code) size in pages
*
* @pid: The pid of process to examine
*
* or zero when the process doesn't exist or the number of pages
* couldn't be retrieved.
*/
-function proc_mem_txt_pid:long (pid:long)
+function proc_mem_txt:long (pid:long)
{
task = pid2task(pid)
if (_stp_valid_task(task)) {
}
/**
- * sfunction proc_mem_data_pid - Program data size (data + stack) in pages
+ * sfunction proc_mem_data - Program data size (data + stack) in pages
*
* @pid: The pid of process to examine
*
* in pages, or zero when the process doesn't exist or the number of
* pages couldn't be retrieved.
*/
-function proc_mem_data_pid:long (pid:long)
+function proc_mem_data:long (pid:long)
{
task = pid2task(pid)
if (_stp_valid_task(task)) {
}
/**
- * sfunction proc_mem_string - Human readable string of current proc memory usage
+ * sfunction proc_mem_string - Human readable string of process memory usage
*
* Description: Returns a human readable string showing the size, rss,
* shr, txt and data of the memory used by the current process.
}
/**
- * sfunction proc_mem_string_pid - Human readable string of process memory usage
+ * sfunction proc_mem_string - Human readable string of process memory usage
*
* @pid: The pid of process to examine
*
* shr, txt and data of the memory used by the given process.
* For example "size: 301m, rss: 11m, shr: 8m, txt: 52k, data: 2248k".
*/
-function proc_mem_string_pid:string (pid:long)
+function proc_mem_string:string (pid:long)
{
return sprintf ("size: %s, rss: %s, shr: %s, txt: %s, data: %s",
- pages_to_string(proc_mem_size_pid(pid)),
- pages_to_string(proc_mem_rss_pid(pid)),
- pages_to_string(proc_mem_shr_pid(pid)),
- pages_to_string(proc_mem_txt_pid(pid)),
- pages_to_string(proc_mem_data_pid(pid)));
+ pages_to_string(proc_mem_size(pid)),
+ pages_to_string(proc_mem_rss(pid)),
+ pages_to_string(proc_mem_shr(pid)),
+ pages_to_string(proc_mem_txt(pid)),
+ pages_to_string(proc_mem_data(pid)));
}
&$clnt->cl_count)) == 0)
proc = proc_from_msg($msg)
- procname = kernel_string2(@choose_defined($msg->rpc_proc->p_name, 0), "NULL")
+ procname = kernel_string(@choose_defined($msg->rpc_proc->p_name, 0), "NULL")
flags = $flags
name = "sunrpc.clnt.call_sync"
&$clnt->cl_count)) == 0)
proc = proc_from_msg($msg)
- procname = kernel_string2(@choose_defined($msg->rpc_proc->p_name, 0), "NULL")
+ procname = kernel_string(@choose_defined($msg->rpc_proc->p_name, 0), "NULL")
flags = $flags
name = "sunrpc.clnt.call_async"
argstr = sprintf("%s, %s, %s, %u, %d",
user_string_quoted($_type),
user_string_quoted($_description),
- user_string_n2_quoted($_payload, $plen, syscall_string_trunc),
+ user_string_n_quoted($_payload, $plen, syscall_string_trunc),
__ulong($plen), __int32($ringid))
}
probe syscall.add_key.return = kernel.function("sys_add_key").return ?
count = __ulong($count)
offset = $pos
argstr = sprintf("%d, %s, %u, %d", __int32($fd),
- user_string_n2_quoted($buf, $count, syscall_string_trunc),
+ user_string_n_quoted($buf, $count, syscall_string_trunc),
__ulong($count), $pos)
}
probe syscall.pwrite.return = kernel.function("sys_pwrite64").return
offset = ($poshi << 32) + $poslo
buf_uaddr = @choose_defined($buf, $ubuf)
argstr = sprintf("%d, %s, %u, %d", __int32($fd),
- user_string_n2_quoted(buf_uaddr, $count,
+ user_string_n_quoted(buf_uaddr, $count,
syscall_string_trunc),
$count, ($poshi << 32) + $poslo)
}
buf_uaddr = $buf
count = __ulong($count)
argstr = sprintf("%d, %s, %u", __int32($fd),
- user_string_n2_quoted($buf, $count, syscall_string_trunc),
+ user_string_n_quoted($buf, $count, syscall_string_trunc),
__ulong($count))
}
probe __syscall.write = kernel.function("sys_write").call
%}
/**
- * sfunction task_utime - User time of the current task
+ * sfunction task_utime - User time of the task
*
* Description: Returns the user time of the current task in cputime.
* Does not include any time used by other tasks in this process, nor
%}
/**
- * sfunction task_utime_tid - User time of the given task
+ * sfunction task_utime - User time of the task
*
* @tid: Thread id of the given task
*
* Does not include any time used by other tasks in this process, nor
* does it include any time of the children of this task.
*/
-function task_utime_tid:long(tid:long)
+function task_utime:long(tid:long)
{
task = pid2task(tid);
if (task != 0)
}
/**
- * sfunction task_stime - System time of the current task
+ * sfunction task_stime - System time of the task
*
* Description: Returns the system time of the current task in cputime.
* Does not include any time used by other tasks in this process, nor
%}
/**
- * sfunction task_stime_tid - System time of the given task
+ * sfunction task_stime - System time of the task
*
* @tid: Thread id of the given task
*
* Does not include any time used by other tasks in this process, nor
* does it include any time of the children of this task.
*/
-function task_stime_tid:long(tid:long)
+function task_stime:long(tid:long)
{
task = pid2task(tid);
if (task != 0)
function task_time_string_tid:string (tid:long)
{
return sprintf ("usr: %s, sys: %s",
- cputime_to_string (task_utime_tid(tid)),
- cputime_to_string (task_stime_tid(tid)));
+ cputime_to_string (task_utime(tid)),
+ cputime_to_string (task_stime(tid)));
}
CONTEXT->last_stmt = NULL;
%}
+/**
+ * sfunction assert - evaluate assertion
+ *
+ * @expression: The expression to evaluate
+ *
+ * Description: This function checks the expression and aborts the
+ * current running probe if expression evaluates to zero. Uses error()
+ * and may be caught by try{} catch{}. A default message will be
+ * displayed.
+ */
+function assert(expression:long) {
+ if (!expression) {
+ error("Assertion failed")
+ }
+}
+
/**
* sfunction assert - evaluate assertion
*
*
* Description: This function checks the expression and aborts the
* current running probe if expression evaluates to zero. Uses error()
- * and may be caught by try{} catch{}.
+ * and may be caught by try{} catch{}. The specified message will be
+ * displayed.
*/
-function assert(expression, msg) {
+function assert(expression:long, msg:string) {
if (!expression) {
error(msg)
}
#define STAP_NEED_CONTEXT_TOKENIZE 1
%}
+/**
+ * sfunction tokenize - Return the next non-empty token in a string
+ *
+ * @delim: set of characters that delimit the tokens
+ *
+ * Description: This function returns the next token in the string
+ * passed in the previous call to tokenize. If no delimiter is found,
+ * the entire remaining input string is * returned. It returns empty
+ * when no more tokens are available.
+ */
+function tokenize:string(delim:string) {
+ return tokenize("", delim)
+}
+
/**
* sfunction tokenize - Return the next non-empty token in a string
*
}
/**
- * sfunction user_string2 - Retrieves string from user space with alternative error string
+ * sfunction user_string - Retrieves string from user space with alternative error string
*
* @addr: the user space address to retrieve the string from
* @err_msg: the error message to return when data isn't available
* memory address. Reports the given error message on the rare cases when
* userspace data is not accessible.
*/
-function user_string2:string (addr:long, err_msg:string) {
- return user_string_n2(addr, @MAXSTRINGLEN, err_msg)
+function user_string:string (addr:long, err_msg:string) {
+ return user_string_n(addr, @MAXSTRINGLEN, err_msg)
}
/**
*/
function user_string_warn:string (addr:long) {
%(systemtap_v < "2.3" %? // PR15044
- return user_string2_warn(addr, "<unknown>")
+ return user_string_warn(addr, "<unknown>")
%:
- return user_string2_warn(addr, "")
+ return user_string_warn(addr, "")
%)
}
/**
- * sfunction user_string2_warn - Retrieves string from user space with alternative warning string
+ * sfunction user_string_warn - Retrieves string from user space with alternative warning string
*
* @addr: the user space address to retrieve the string from
* @warn_msg: the warning message to return when data isn't available
* when userspace data is not accessible and warns (but does not abort)
* about the failure.
*/
-function user_string2_warn:string (addr:long, warn_msg:string) {
- return user_string2_n_warn(addr, @MAXSTRINGLEN, warn_msg)
+function user_string_warn:string (addr:long, warn_msg:string) {
+ return user_string_n_warn(addr, @MAXSTRINGLEN, warn_msg)
}
/**
*/
function user_string_n:string (addr:long, n:long)
%( systemtap_v < "2.3" %? // PR15044
- { return user_string_n2(addr, n, "<unknown>") }
+ { return user_string_n(addr, n, "<unknown>") }
%:
%{ /* pure */ /* myproc-unprivileged */
long rc;
%)
/**
- * sfunction user_string_n2 - Retrieves string of given length from user space
+ * sfunction user_string_n - Retrieves string of given length from user space
*
* @addr: the user space address to retrieve the string from
* @n: the maximum length of the string (if not null terminated)
* the rare cases when userspace data is not accessible at the given
* address.
*/
-function user_string_n2:string (addr:long, n:long, err_msg:string)
+function user_string_n:string (addr:long, n:long, err_msg:string)
%{ /* pure */ /* myproc-unprivileged */ /* unmodified-fnargs */
int64_t len = clamp_t(int64_t, STAP_ARG_n + 1, 1, MAXSTRINGLEN);
if (_stp_strncpy_from_user(STAP_RETVALUE,
*/
function user_string_n_warn:string (addr:long, n:long) {
%(systemtap_v < "2.3" %? // PR15044
- return user_string2_n_warn(addr, n, "<unknown>")
+ return user_string_n_warn(addr, n, "<unknown>")
%:
- return user_string2_n_warn(addr, n, "")
+ return user_string_n_warn(addr, n, "")
%)
}
/**
- * sfunction user_string2_n_warn - Retrieves string from user space with alternative warning string
+ * sfunction user_string_n_warn - Retrieves string from user space with alternative warning string
*
* @addr: the user space address to retrieve the string from
* @n: the maximum length of the string (if not null terminated)
* rare cases when userspace data is not accessible and warns (but does
* not abort) about the failure.
*/
-function user_string2_n_warn:string (addr:long, n:long, warn_msg:string)
+function user_string_n_warn:string (addr:long, n:long, warn_msg:string)
%{ /* pure */ /* myproc-unprivileged */ /* unmodified-fnargs */
int64_t len = clamp_t(int64_t, STAP_ARG_n + 1, 1, MAXSTRINGLEN);
long rc;
function user_string_n_quoted:string (addr:long, n:long) {
%(systemtap_v < "2.4" %?
// We used to count n by output characters
- return user_string_n2_quoted(addr, @MAXSTRINGLEN, n)
+ return user_string_n_quoted(addr, @MAXSTRINGLEN, n)
%:
- return user_string_n2_quoted(addr, n, @MAXSTRINGLEN)
+ return user_string_n_quoted(addr, n, @MAXSTRINGLEN)
%)
}
/**
- * sfunction user_string_n2_quoted - Retrieves and quotes string from user space
+ * sfunction user_string_n_quoted - Retrieves and quotes string from user space
*
* @addr: the user space address to retrieve the string from
* @inlen: the maximum length of the string to read (if not null terminated)
* the given address, the address itself is returned as a string, without
* double quotes.
*/
-function user_string_n2_quoted:string (addr:long, inlen:long, outlen:long)
+function user_string_n_quoted:string (addr:long, inlen:long, outlen:long)
%( systemtap_v >= "3.0" %?
{
try
%}
/**
- * sfunction user_string2_utf32 - Retrieves UTF-32 string from user memory with alternative error string
+ * sfunction user_string_utf32 - Retrieves UTF-32 string from user memory with alternative error string
* @addr: The user address to retrieve the string from
* @err_msg: The error message to return when data isn't available
*
* from the UTF-32 string at a given user memory address. Reports the given
* error message on string copy fault or conversion error.
*/
-function user_string2_utf32:string (addr:long, err_msg:string) {
+function user_string_utf32:string (addr:long, err_msg:string) {
try { return user_string_utf32(addr) } catch { return err_msg }
}
%}
/**
- * sfunction user_string2_utf16 - Retrieves UTF-16 string from user memory with alternative error string
+ * sfunction user_string_utf16 - Retrieves UTF-16 string from user memory with alternative error string
* @addr: The user address to retrieve the string from
* @err_msg: The error message to return when data isn't available
*
* from the UTF-16 string at a given user memory address. Reports the given
* error message on string copy fault or conversion error.
*/
-function user_string2_utf16:string (addr:long, err_msg:string) {
+function user_string_utf16:string (addr:long, err_msg:string) {
try { return user_string_utf16(addr) } catch { return err_msg }
}
print (kernel_pointer(0))
print (user_string(0))
- print (user_string2 (0, ""))
+ print (user_string (0, ""))
print (user_string_warn (0))
print (user_string_quoted (0))
print (user_string_n(0, 5))
- print (user_string_n2(0, 5, "foobar"))
+ print (user_string_n(0, 5, "foobar"))
print (user_string_n_warn(0, 0))
print (user_string_n_quoted(0, 0))
- print (user_string_n2_quoted(0, 0, 0))
+ print (user_string_n_quoted(0, 0, 0))
print (user_string_utf32 (0))
print (user_string_utf16 (0))
print (user_short(0))
print (kernel_pointer(2342))
print (user_string(2342))
- print (user_string2(2342,"foobar"))
+ print (user_string(2342,"foobar"))
print (user_string_warn(2342))
print (user_string_quoted (2342))
print (user_string_n(2342, 5))
- print (user_string_n2(2342, 5, "foobar"))
+ print (user_string_n(2342, 5, "foobar"))
print (user_string_n_warn(2342, 5))
print (user_string_n_quoted(2342, 5))
print (user_string_utf32(2342))
}
probe end {
- printf("%d\n", proc_mem_size_pid(0));
- printf("%d\n", proc_mem_rss_pid(0));
- printf("%d\n", proc_mem_shr_pid(0));
- printf("%d\n", proc_mem_txt_pid(0));
- printf("%d\n", proc_mem_data_pid(0));
- printf("%s\n", proc_mem_string_pid(0));
+ printf("%d\n", proc_mem_size(0));
+ printf("%d\n", proc_mem_rss(0));
+ printf("%d\n", proc_mem_shr(0));
+ printf("%d\n", proc_mem_txt(0));
+ printf("%d\n", proc_mem_data(0));
+ printf("%s\n", proc_mem_string(0));
}
log(sprint(task_start_time(0)))
log(task_time_string_tid(0))
- log(sprint(task_stime_tid(0)))
- log(sprint(task_utime_tid(0)))
+ log(sprint(task_stime(0)))
+ log(sprint(task_utime(0)))
exit()
}
probe begin
{
print(task_utime()
- + task_utime_tid(0)
+ + task_utime(0)
+ task_stime()
- + task_stime_tid(0)
+ + task_stime(0)
+ cputime_to_msecs(0)
+ cputime_to_usecs(0))
print(msecs_to_string(0))
-title: Color Table for ansi_set_color2() and ansi_set_color3()
+title: Color Table for ansi_set_color()
name: ansi_colors.stp
version: 1.0
author: Eugene Teo
exit: fixed
output: graph
scope: system-wide
-description: The script prints a table showing the available color combinations for the ansi_set_color2() and ans_set_color3() functions in the ansi.stp tapset.
+description: The script prints a table showing the available color combinations for the ansi_set_color() function in the ansi.stp tapset.
test_check: stap -p4 ansi_colors.stp
test_installcheck: stap ansi_colors.stp
for (t = 0; t < 2; t++) {
printf(" %2d,%1d |", r, t);
for (c = 40; c < 48; c++) {
- ansi_set_color3(r, c, t)
+ ansi_set_color(r, c, t)
printf(" %s ", !t ? "Normal" : "Bold ")
ansi_reset_color()
}
-title: Show Attribues in Table for ansi_set_color3()
+title: Show Attribues in Table for ansi_set_color()
name: ansi_colors2.stp
version: 1.0
author: Eugene Teo
exit: fixed
output: graph
scope: system-wide
-description: The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color3() function in the ansi.stp tapset.
+description: The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color() function in the ansi.stp tapset.
test_check: stap -p4 ansi_colors2.stp
test_installcheck: stap ansi_colors2.stp
for (t = 0; t < 8; !t ? ++t : t+=3) {
printf(" %2d,%1d |", r, t);
for (c = 40; c < 48; c++) {
- ansi_set_color3(r, c, t)
+ ansi_set_color(r, c, t)
printf(" Colors ")
ansi_reset_color()
}
<li><a name="general/alias_suffixes.stp"></a><a href="#general/alias_suffixes.stp">¶</a> <a href="general/alias_suffixes.stp">general/alias_suffixes.stp</a> - Count I/O Syscalls using Alias Suffixes<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#STATISTICS">STATISTICS</a> <br>
<p>alias_suffixes.stp is a demonstration of how alias suffixes in the systemtap language might be used. The script tracks the wall clock time for each invocation of the system calls open, close, read, and write. When the script exists it prints out the minimum, average, and maximum times in microseconds for each system call, followed by a count of times that each syscall was invoked and a histogram showing the distributions of times.</p><p><font size="-2"><pre># stap alias_suffixes.stp -c "sleep 1"</pre></font></p>
-</li><li><a name="general/ansi_colors.stp"></a><a href="#general/ansi_colors.stp">¶</a> <a href="general/ansi_colors.stp">general/ansi_colors.stp</a> - Color Table for ansi_set_color2() and ansi_set_color3()<br>
+</li><li><a name="general/ansi_colors.stp"></a><a href="#general/ansi_colors.stp">¶</a> <a href="general/ansi_colors.stp">general/ansi_colors.stp</a> - Color Table for ansi_set_color()<br>
keywords: <a href="keyword-index.html#FORMAT">FORMAT</a> <br>
-<p>The script prints a table showing the available color combinations for the ansi_set_color2() and ans_set_color3() functions in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors.stp</pre></font></p>
-</li><li><a name="general/ansi_colors2.stp"></a><a href="#general/ansi_colors2.stp">¶</a> <a href="general/ansi_colors2.stp">general/ansi_colors2.stp</a> - Show Attribues in Table for ansi_set_color3()<br>
+<p>The script prints a table showing the available color combinations for the ansi_set_color() function in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors.stp</pre></font></p>
+</li><li><a name="general/ansi_colors2.stp"></a><a href="#general/ansi_colors2.stp">¶</a> <a href="general/ansi_colors2.stp">general/ansi_colors2.stp</a> - Show Attribues in Table for ansi_set_color()<br>
keywords: <a href="keyword-index.html#FORMAT">FORMAT</a> <br>
-<p>The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color3() function in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors2.stp</pre></font></p>
+<p>The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color() function in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors2.stp</pre></font></p>
</li><li><a name="general/badname.stp"></a><a href="#general/badname.stp">¶</a> <a href="general/badname.stp">general/badname.stp</a> - Bad Filename Filter<br>
keywords: <a href="keyword-index.html#FILESYSTEM">FILESYSTEM</a> <a href="keyword-index.html#GURU">GURU</a> <br>
<p>The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode.</p><p><i><a href="general/badname.txt">sample usage in general/badname.txt</i></font></p>
# stap alias_suffixes.stp -c "sleep 1"
-general/ansi_colors.stp - Color Table for ansi_set_color2() and ansi_set_color3()
+general/ansi_colors.stp - Color Table for ansi_set_color()
keywords: format
The script prints a table showing the available color combinations
- for the ansi_set_color2() and ans_set_color3() functions in the
- ansi.stp tapset.
+ for the ansi_set_color() function in the ansi.stp tapset.
# stap ansi_colors.stp
-general/ansi_colors2.stp - Show Attribues in Table for ansi_set_color3()
+general/ansi_colors2.stp - Show Attribues in Table for ansi_set_color()
keywords: format
The script prints a table showing the available attributes (bold,
underline, and inverse) with color combinations for the
- ans_set_color3() function in the ansi.stp tapset.
+ ans_set_color() function in the ansi.stp tapset.
# stap ansi_colors2.stp
</li></ul>
<h3><a name="FORMAT"><a href="#FORMAT">¶</a> FORMAT</a></h3>
<ul>
-<li><a href="general/ansi_colors.stp">general/ansi_colors.stp</a> - Color Table for ansi_set_color2() and ansi_set_color3()<br>
+<li><a href="general/ansi_colors.stp">general/ansi_colors.stp</a> - Color Table for ansi_set_color()<br>
keywords: <a href="keyword-index.html#FORMAT">FORMAT</a> <br>
-<p>The script prints a table showing the available color combinations for the ansi_set_color2() and ans_set_color3() functions in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors.stp</pre></font></p>
-</li><li><a href="general/ansi_colors2.stp">general/ansi_colors2.stp</a> - Show Attribues in Table for ansi_set_color3()<br>
+<p>The script prints a table showing the available color combinations for the ansi_set_color() function in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors.stp</pre></font></p>
+</li><li><a href="general/ansi_colors2.stp">general/ansi_colors2.stp</a> - Show Attribues in Table for ansi_set_color()<br>
keywords: <a href="keyword-index.html#FORMAT">FORMAT</a> <br>
-<p>The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color3() function in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors2.stp</pre></font></p>
+<p>The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color() function in the ansi.stp tapset.</p><p><font size="-2"><pre># stap ansi_colors2.stp</pre></font></p>
</li></ul>
<h3><a name="FUNCTION"><a href="#FUNCTION">¶</a> FUNCTION</a></h3>
<ul>
= FORMAT =
-general/ansi_colors.stp - Color Table for ansi_set_color2() and ansi_set_color3()
+general/ansi_colors.stp - Color Table for ansi_set_color()
keywords: format
The script prints a table showing the available color combinations
- for the ansi_set_color2() and ans_set_color3() functions in the
- ansi.stp tapset.
+ for the ansi_set_color() function in the ansi.stp tapset.
# stap ansi_colors.stp
-general/ansi_colors2.stp - Show Attribues in Table for ansi_set_color3()
+general/ansi_colors2.stp - Show Attribues in Table for ansi_set_color()
keywords: format
The script prints a table showing the available attributes (bold,
underline, and inverse) with color combinations for the
- ans_set_color3() function in the ansi.stp tapset.
+ ans_set_color() function in the ansi.stp tapset.
# stap ansi_colors2.stp
{
/* trace on return to ensure the pathname has faulted in */
printf("%6d %6d %16s %4d %s\n", uid(), pid(), execname(),
- returnval(), user_string2(@entry(pointer_arg(1)), "-"));
+ returnval(), user_string(@entry(pointer_arg(1)), "-"));
}
if (task_stime() > stime[prev_pid]){
stime[prev_pid] = task_stime()
utime[prev_pid] = task_utime()
- virtmem[prev_pid] = proc_mem_size_pid(prev_pid)
- rssmem[prev_pid] = proc_mem_rss_pid(prev_pid)
- shrmem[prev_pid] = proc_mem_shr_pid(prev_pid)
+ virtmem[prev_pid] = proc_mem_size(prev_pid)
+ rssmem[prev_pid] = proc_mem_rss(prev_pid)
+ shrmem[prev_pid] = proc_mem_shr(prev_pid)
}
// update the state if we've encountered the process before
probe begin { printf ("%M", $1) }
probe begin { str = sprintf("%M", $1); printf ("%s", str) }
probe begin { print (user_string ($1)) }
-probe begin { print (user_string2 ($1,"<only suspected, not known>")) }
+probe begin { print (user_string ($1,"<only suspected, not known>")) }
probe begin { print (user_string_warn ($1)) }
-probe begin { print (user_string2_warn ($1, "<only suspected, not known>")) }
+probe begin { print (user_string_warn ($1, "<only suspected, not known>")) }
probe begin { print (user_string_quoted ($1)) }
probe begin { print (user_string_n ($1, 5)) }
-probe begin { print (user_string_n2 ($1, 5, "<only suspected, not known>")) }
+probe begin { print (user_string_n ($1, 5, "<only suspected, not known>")) }
probe begin { print (user_string_n_warn ($1, 5)) }
-probe begin { print (user_string2_n_warn ($1, 5, "<only suspected, not known>")) }
+probe begin { print (user_string_n_warn ($1, 5, "<only suspected, not known>")) }
probe begin { print (user_string_n_quoted ($1, 5)) }
probe begin { print (user_short ($1)) }
probe begin { print (user_short_warn ($1)) }
probe perf.sw.cpu_clock {
if (hits[11] == 0) {
hits[11] = 1
- print (user_string2 ($1,"<only suspected, not known>"))
+ print (user_string ($1,"<only suspected, not known>"))
}
}
probe perf.sw.cpu_clock {
probe perf.sw.cpu_clock {
if (hits[13] == 0) {
hits[13] = 1
- print (user_string2_warn ($1, "<only suspected, not known>"))
+ print (user_string_warn ($1, "<only suspected, not known>"))
}
}
probe perf.sw.cpu_clock {
probe perf.sw.cpu_clock {
if (hits[16] == 0) {
hits[16] = 1
- print (user_string_n2 ($1, 5, "<only suspected, not known>"))
+ print (user_string_n ($1, 5, "<only suspected, not known>"))
}
}
probe perf.sw.cpu_clock {
probe perf.sw.cpu_clock {
if (hits[18] == 0) {
hits[18] = 1
- print (user_string2_n_warn ($1, 5, "<only suspected, not known>"))
+ print (user_string_n_warn ($1, 5, "<only suspected, not known>"))
}
}
probe perf.sw.cpu_clock {
probe timer.profile {
if (hits[11] == 0) {
hits[11] = 1
- print (user_string2 ($1,"<only suspected, not known>"))
+ print (user_string ($1,"<only suspected, not known>"))
}
}
probe timer.profile {
probe timer.profile {
if (hits[13] == 0) {
hits[13] = 1
- print (user_string2_warn ($1, "<only suspected, not known>"))
+ print (user_string_warn ($1, "<only suspected, not known>"))
}
}
probe timer.profile {
probe timer.profile {
if (hits[16] == 0) {
hits[16] = 1
- print (user_string_n2 ($1, 5, "<only suspected, not known>"))
+ print (user_string_n ($1, 5, "<only suspected, not known>"))
}
}
probe timer.profile {
probe timer.profile {
if (hits[18] == 0) {
hits[18] = 1
- print (user_string2_n_warn ($1, 5, "<only suspected, not known>"))
+ print (user_string_n_warn ($1, 5, "<only suspected, not known>"))
}
}
probe timer.profile {
probe kernel.trace("sched_switch") {
if (hits[11] == 0) {
hits[11] = 1
- print (user_string2 ($1,"<only suspected, not known>"))
+ print (user_string ($1,"<only suspected, not known>"))
}
}
probe kernel.trace("sched_switch") {
probe kernel.trace("sched_switch") {
if (hits[13] == 0) {
hits[13] = 1
- print (user_string2_warn ($1, "<only suspected, not known>"))
+ print (user_string_warn ($1, "<only suspected, not known>"))
}
}
probe kernel.trace("sched_switch") {
probe kernel.trace("sched_switch") {
if (hits[16] == 0) {
hits[16] = 1
- print (user_string_n2 ($1, 5, "<only suspected, not known>"))
+ print (user_string_n ($1, 5, "<only suspected, not known>"))
}
}
probe kernel.trace("sched_switch") {
probe kernel.trace("sched_switch") {
if (hits[18] == 0) {
hits[18] = 1
- print (user_string2_n_warn ($1, 5, "<only suspected, not known>"))
+ print (user_string_n_warn ($1, 5, "<only suspected, not known>"))
}
}
probe kernel.trace("sched_switch") {
# Ensure that user_string_n_quoted truncates properly by input length and
# there's no off-by-one error (see PR15617). Also ensures that
-# user_string_n2_quoted properly truncates by output length.
+# user_string_n_quoted properly truncates by output length.
# We avoid using @MAXSTRINGLEN to not have to require -g
probe syscall.write {
printf("%s\n", user_string_n_quoted(buf_uaddr, 15))
printf("%s\n", user_string_n_quoted(buf_uaddr, 14))
printf("%s\n", user_string_n_quoted(buf_uaddr, 13))
- printf("%s\n", user_string_n2_quoted(buf_uaddr, 99, 20))
- printf("%s\n", user_string_n2_quoted(buf_uaddr, 99, 19))
- printf("%s\n", user_string_n2_quoted(buf_uaddr, 99, 18))
- printf("%s\n", user_string_n2_quoted(buf_uaddr, 99, 17))
- printf("%s\n", user_string_n2_quoted(buf_uaddr, 99, 16))
+ printf("%s\n", user_string_n_quoted(buf_uaddr, 99, 20))
+ printf("%s\n", user_string_n_quoted(buf_uaddr, 99, 19))
+ printf("%s\n", user_string_n_quoted(buf_uaddr, 99, 18))
+ printf("%s\n", user_string_n_quoted(buf_uaddr, 99, 17))
+ printf("%s\n", user_string_n_quoted(buf_uaddr, 99, 16))
exit()
}
}