summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog52
-rw-r--r--NEWS5
-rw-r--r--buildrun.cxx6
-rw-r--r--config.in3
-rwxr-xr-xconfigure23
-rw-r--r--configure.ac4
-rw-r--r--runtime/ChangeLog13
-rw-r--r--runtime/syscall.h22
-rw-r--r--runtime/task_finder.c15
-rw-r--r--stapprobes.5.in27
-rw-r--r--tapsets.cxx197
-rw-r--r--testsuite/ChangeLog5
-rwxr-xr-xtestsuite/semok/thirtytwo.stp5
-rw-r--r--testsuite/systemtap.base/utrace_p4.exp4
-rw-r--r--testsuite/systemtap.examples/ChangeLog5
-rw-r--r--testsuite/systemtap.examples/general/para-callgraph.meta16
-rwxr-xr-xtestsuite/systemtap.examples/general/para-callgraph.stp26
-rw-r--r--testsuite/systemtap.examples/index.html6
-rw-r--r--testsuite/systemtap.examples/index.txt17
-rw-r--r--testsuite/systemtap.examples/keyword-index.html12
-rw-r--r--testsuite/systemtap.examples/keyword-index.txt30
-rw-r--r--testsuite/systemtap.examples/subsystem-index.html11
-rw-r--r--testsuite/systemtap.examples/subsystem-index.txt23
23 files changed, 355 insertions, 172 deletions
diff --git a/ChangeLog b/ChangeLog
index f6886301..6b4ffe32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,55 @@
+2008-08-19 David Smith <dsmith@redhat.com>
+
+ PR 6841
+ * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
+ Workaround utrace bug by quiescing threads before attaching a
+ utrace syscall engine to them.
+ (utrace_derived_probe_group::emit_module_decls): Emit quiesce
+ handler.
+
+2008-08-18 David Smith <dsmith@redhat.com>
+
+ * tapsets.cxx (register_standard_tapsets): Add missing
+ 'process.syscall' and 'process.syscall.return' bindings.
+
+2008-08-16 Mark Wielaard <mjw@redhat.com>
+
+ * configure.ac (build_elfutils): Mention possible distro
+ specific elfutils development sub-packages needed when not found.
+
+2008-08-15 David Smith <dsmith@redhat.com>
+
+ * tapsets.cxx (utrace_builder::build): Change system-wide probes
+ from 'process("*").begin' to 'process.begin'.
+ (register_standard_tapsets): Add new 'process' binding.
+ * stapprobes.5.in: Change system-wide probes
+ from 'process("*").begin' to 'process.begin'.
+
+2008-08-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6836
+ * tapsets.cxx (dwarf_var...visit_target_symbol): Emit
+ "return=0xf00" instead of "$return=0xf00" for $$return,
+ for consistency with other variables.
+ * NEWS, stapprobes.5.in: Update.
+
+2008-08-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6836.
+ * tapsets.cxx (dwarf_var...visit_target_symbol): Show
+ "var=?" for unlocatable variables. Support $$return.
+ Make sure $$parms/etc. work in .return probes too.
+ * testsuite/semok/thirtytwo.stp: New test.
+ * NEWS, stapprobes.5.in: Document them.
+
+2008-08-15 Michael Meeks <michael.meeks@novell.com>
+
+ * configure.ac: suggest (SUSE) package name for dwfl.
+
+ * buildrun.cxx (compile_pass): if extremely verbose, pass through
+ output from stap checks - helps to debug generic test compile
+ problems.
+
2008-08-14 Dave Brolley <brolley@redhat.com>
PR 6834
diff --git a/NEWS b/NEWS
index 0cdc2aa3..ce3954cf 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,10 @@
- A formatted string representation of the variables, parameters, or local
variables at a probe point is now supported via the special $$vars,
- $$parms, and $$locals context variables.
+ $$parms, and $$locals context variables, which expand to a string
+ containing a list "var1=0xdead var2=0xbeef var3=?". (Here, var3 exists
+ but is for some reason unavailable.) In return probes only, $$return
+ expands to an empty string for a void function, or "return=0xf00".
* What's new in version 0.7
diff --git a/buildrun.cxx b/buildrun.cxx
index 159e1c6e..a265e4db 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -78,8 +78,12 @@ compile_pass (systemtap_session& s)
if (s.verbose > 3)
superverbose = "set -x;";
+ string redirecterrors = "> /dev/null 2>&1";
+ if (s.verbose > 6)
+ redirecterrors = "";
+
o << "stap_check_gcc = $(shell " << superverbose << " if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo \"$(1)\"; else echo \"$(2)\"; fi)" << endl;
- o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) > /dev/null 2>&1 ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl;
+ o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl;
o << "SYSTEMTAP_RUNTIME = \"" << s.runtime_path << "\"" << endl;
diff --git a/config.in b/config.in
index 11232f02..5c1a3894 100644
--- a/config.in
+++ b/config.in
@@ -18,9 +18,6 @@
/* Define to 1 if you have the `dw' library (-ldw). */
#undef HAVE_LIBDW
-/* Define to 1 if you have the `ebl' library (-lebl). */
-#undef HAVE_LIBEBL
-
/* Define to 1 if you have the `pfm' library (-lpfm). */
#undef HAVE_LIBPFM
diff --git a/configure b/configure
index be952838..ecf080bf 100755
--- a/configure
+++ b/configure
@@ -6605,7 +6605,7 @@ fi
if test $build_elfutils = no; then
- # Need libdwfl-capable recent elfutils from Fedora
+ # Need libdwfl-capable recent elfutils http://elfutils.fedorahosted.org/
save_LIBS="$LIBS"
{ echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5
@@ -6678,8 +6678,8 @@ _ACEOF
else
- { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (dw 0.123+)" >&5
-echo "$as_me: error: missing elfutils development headers/libraries (dw 0.123+)" >&2;}
+ { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&5
+echo "$as_me: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -8455,21 +8455,22 @@ echo "$as_me: $ac_file is unchanged" >&6;}
fi
rm -f "$tmp/out12"
# Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $ac_file | $ac_file:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8506,7 +8507,7 @@ echo "$as_me: executing $ac_file commands" >&6;}
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
diff --git a/configure.ac b/configure.ac
index 6728ace7..084e457c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,10 +181,10 @@ AC_SUBST(elfutils_abs_srcdir, `AS_IF([test $build_elfutils = yes],
[cd $with_elfutils && pwd])`)
if test $build_elfutils = no; then
- # Need libdwfl-capable recent elfutils from Fedora
+ # Need libdwfl-capable recent elfutils http://elfutils.fedorahosted.org/
save_LIBS="$LIBS"
AC_CHECK_LIB(dw, dwfl_module_getsym,[],[
- AC_MSG_ERROR([missing elfutils development headers/libraries (dw 0.123+)])],
+ AC_MSG_ERROR([missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)])],
[-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf])
stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf"
LIBS="$save_LIBS"
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 58678de5..6dfd2ea2 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,16 @@
+2008-08-20 David Smith <dsmith@redhat.com>
+
+ * task_finder.c (__stp_utrace_task_finder_target_syscall_entry):
+ Handles mmap2 (as well as mmap).
+ (__stp_utrace_task_finder_target_syscall_exit): Ditto.
+ * syscall.h: Added defines for mmap and mmap2.
+
+2008-08-19 David Smith <dsmith@redhat.com>
+
+ PR 6841
+ * task_finder.c (__stp_utrace_task_finder_target_quiesce):
+ Quiesces thread before turning on syscall tracing.
+
2008-08-14 Frank Ch. Eigler <fche@elastic.org>
PR 6842.
diff --git a/runtime/syscall.h b/runtime/syscall.h
index 3d1034e6..24e93463 100644
--- a/runtime/syscall.h
+++ b/runtime/syscall.h
@@ -11,12 +11,14 @@
#define _SYSCALL_H_
#if defined(__i386__) || defined(CONFIG_IA32_EMULATION)
-#define __MMAP_SYSCALL_NO_IA32 192 /* mmap2 */
+#define __MMAP_SYSCALL_NO_IA32 90
+#define __MMAP2_SYSCALL_NO_IA32 192
#define __MPROTECT_SYSCALL_NO_IA32 125
#define __MUNMAP_SYSCALL_NO_IA32 91
#define __MREMAP_SYSCALL_NO_IA32 163
# if !defined(CONFIG_IA32_EMULATION)
#define MMAP_SYSCALL_NO(tsk) __MMAP_SYSCALL_NO_IA32
+#define MMAP2_SYSCALL_NO(tsk) __MMAP2_SYSCALL_NO_IA32
#define MPROTECT_SYSCALL_NO(tsk) __MPROTECT_SYSCALL_NO_IA32
#define MUNMAP_SYSCALL_NO(tsk) __MUNMAP_SYSCALL_NO_IA32
#define MREMAP_SYSCALL_NO(tsk) __MREMAP_SYSCALL_NO_IA32
@@ -25,13 +27,19 @@
#if defined(__x86_64__)
#define __MMAP_SYSCALL_NO_X86_64 9
+/* x86_64 doesn't have a mmap2 system call. So, we'll use a number
+ * that doesn't map to a real system call. */
+#define __MMAP2_SYSCALL_NO_X86_64 ((unsigned long)-1)
#define __MPROTECT_SYSCALL_NO_X86_64 10
#define __MUNMAP_SYSCALL_NO_X86_64 11
#define __MREMAP_SYSCALL_NO_X86_64 25
# if defined(CONFIG_IA32_EMULATION)
-#define MMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \
- ? __MMAP_SYSCALL_NO_IA32 \
+#define MMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \
+ ? __MMAP_SYSCALL_NO_IA32 \
: __MMAP_SYSCALL_NO_X86_64)
+#define MMAP2_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \
+ ? __MMAP2_SYSCALL_NO_IA32 \
+ : __MMAP2_SYSCALL_NO_X86_64)
#define MPROTECT_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \
? __MPROTECT_SYSCALL_NO_IA32 \
: __MPROTECT_SYSCALL_NO_X86_64)
@@ -51,13 +59,17 @@
#if defined(__powerpc__)
#define MMAP_SYSCALL_NO(tsk) 90
+/* MMAP2 only exists on a 32-bit kernel. On a 64-bit kernel, we'll
+ * never see mmap2 (but that's OK). */
+#define MMAP2_SYSCALL_NO(tsk) 192
#define MPROTECT_SYSCALL_NO(tsk) 125
#define MUNMAP_SYSCALL_NO(tsk) 91
#define MREMAP_SYSCALL_NO(tsk) 163
#endif
-#if !defined(MMAP_SYSCALL_NO) || !defined(MPROTECT_SYSCALL_NO) \
- || !defined(MUNMAP_SYSCALL_NO) || !defined(MREMAP_SYSCALL_NO)
+#if !defined(MMAP_SYSCALL_NO) || !defined(MMAP2_SYSCALL_NO) \
+ || !defined(MPROTECT_SYSCALL_NO) || !defined(MUNMAP_SYSCALL_NO) \
+ || !defined(MREMAP_SYSCALL_NO)
#error "Unimplemented architecture"
#endif
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index 928b7087..b483cf23 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -317,7 +317,7 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen)
| UTRACE_EVENT(SYSCALL_ENTRY) \
| UTRACE_EVENT(SYSCALL_EXIT))
-#define __STP_ATTACHED_TASK_VM_EVENTS (__STP_ATTACHED_TASK_VM_BASE_EVENTS \
+#define __STP_ATTACHED_TASK_VM_EVENTS (__STP_ATTACHED_TASK_BASE_EVENTS \
| UTRACE_ACTION_QUIESCE \
| UTRACE_EVENT(QUIESCE))
@@ -608,7 +608,7 @@ __stp_utrace_task_finder_target_quiesce(struct utrace_attached_engine *engine,
{
struct stap_task_finder_target *tgt = engine->data;
- // Turn off quiesce handling.
+ // Turn off quiesce handling (and turn on syscall handling).
utrace_set_flags(tsk, engine, __STP_ATTACHED_TASK_VM_BASE_EVENTS);
if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) {
@@ -717,6 +717,7 @@ __stp_utrace_task_finder_target_syscall_entry(struct utrace_attached_engine *eng
// FIXME: do we need to handle mremap()?
syscall_no = __stp_user_syscall_nr(regs);
if (syscall_no != MMAP_SYSCALL_NO(tsk)
+ && syscall_no != MMAP2_SYSCALL_NO(tsk)
&& syscall_no != MPROTECT_SYSCALL_NO(tsk)
&& syscall_no != MUNMAP_SYSCALL_NO(tsk))
return UTRACE_ACTION_RESUME;
@@ -815,6 +816,7 @@ __stp_utrace_task_finder_target_syscall_exit(struct utrace_attached_engine *engi
// FIXME: do we need to handle mremap()?
syscall_no = __stp_user_syscall_nr(regs);
if (syscall_no != MMAP_SYSCALL_NO(tsk)
+ && syscall_no != MMAP2_SYSCALL_NO(tsk)
&& syscall_no != MPROTECT_SYSCALL_NO(tsk)
&& syscall_no != MUNMAP_SYSCALL_NO(tsk))
return UTRACE_ACTION_RESUME;
@@ -841,10 +843,11 @@ __stp_utrace_task_finder_target_syscall_exit(struct utrace_attached_engine *engi
"tsk %d found %s(0x%lx), returned 0x%lx\n",
tsk->pid,
((syscall_no == MMAP_SYSCALL_NO(tsk)) ? "mmap"
- : ((syscall_no == MPROTECT_SYSCALL_NO(tsk)) ? "mprotect"
- : ((syscall_no == MUNMAP_SYSCALL_NO(tsk)) ? "munmap"
- : "UNKNOWN"))),
- arg0, rv);
+ : ((syscall_no == MMAP2_SYSCALL_NO(tsk)) ? "mmap2"
+ : ((syscall_no == MPROTECT_SYSCALL_NO(tsk)) ? "mprotect"
+ : ((syscall_no == MUNMAP_SYSCALL_NO(tsk)) ? "munmap"
+ : "UNKNOWN"))),
+ arg0, rv);
#endif
// Try to find the vma info we might have saved.
diff --git a/stapprobes.5.in b/stapprobes.5.in
index c71f79d3..5281c40e 100644
--- a/stapprobes.5.in
+++ b/stapprobes.5.in
@@ -334,6 +334,11 @@ $var\->field
traversal to a structure's field. The indirection operator
may be repeated to follow more levels of pointers.
.TP
+$return
+is available in return probes only for functions that are declared
+with a return value.
+.TP
+.TP
$var[N]
indexes into an array. The index is given with a
literal number.
@@ -344,12 +349,15 @@ sprintf("parm1=%x ... parmN=%x var1=%x ... varN=%x", parm1, ..., parmN,
var1, ..., varN)
.TP
$$locals
-expands to a character string that is equivalent to
-sprintf("var1=%x ... varN=%x", var1, ..., varN)
+expands to a subset of $$vars for only local variables.
.TP
$$parms
-expands to a character string that is equivalent to
-sprintf("parm1=%x ... parmN=%x", parm1, ..., parmN)
+expands to a subset of $$vars for only function parameters.
+.TP
+$$return
+is available in return probes only. It expands to a string that
+is equivalent to sprintf("return=%x", $return)
+if the probed function has a return value, or else an empty string.
.PP
For ".return" probes, context variables other than the "$return"
value itself are only available for the function call parameters.
@@ -378,16 +386,22 @@ Additional user-space probing is available in the following forms:
.SAMPLE
process(PID).begin
process("PATH").begin
+process.begin
process(PID).thread.begin
process("PATH").thread.begin
+process.thread.begin
process(PID).end
process("PATH").end
+process.end
process(PID).thread.end
process("PATH").thread.end
+process.thread.end
process(PID).syscall
process("PATH").syscall
+process.syscall
process(PID).syscall.return
process("PATH").syscall.return
+process.syscall.return
process(PID).itrace
process("PATH").itrace
.ESAMPLE
@@ -423,9 +437,8 @@ Note that
names refer to executables that are searched the same way shells do: relative
to the working directory if they contain a "/" character, otherwise in
.BR $PATH .
-A
-.I PATH
-of "*" means to probe all threads.
+If a process probe is specified without a PID or PATH, all user
+threads are probed.
.SS PROCFS
diff --git a/tapsets.cxx b/tapsets.cxx
index 664dfb1f..36601b01 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -4002,7 +4002,11 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
if (lvalue && !q.sess.guru_mode)
throw semantic_error("write to target variable not permitted", e->tok);
- if (q.has_return && e->base_name != "$return")
+ // See if we need to generate a new probe to save/access function
+ // parameters from a return probe. PR 1382.
+ if (q.has_return
+ && e->base_name != "$return" // not the special return-value variable handled below
+ && e->base_name != "$$return") // nor the other special variable handled below
{
if (lvalue)
throw semantic_error("write to target variable not permitted in .return probes", e->tok);
@@ -4287,7 +4291,8 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
if (e->base_name == "$$vars"
|| e->base_name == "$$parms"
- || e->base_name == "$$locals")
+ || e->base_name == "$$locals"
+ || (q.has_return && (e->base_name == "$$return")))
{
Dwarf_Die *scopes;
if (dwarf_getscopes_die (scope_die, &scopes) == 0)
@@ -4298,55 +4303,85 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
// Convert $$parms to sprintf of a list of parms and active local vars
// which we recursively evaluate
- token* tmp_tok = new token;
- tmp_tok->type = tok_identifier;
- tmp_tok->content = "sprintf";
- pf->tok = tmp_tok;
+
+ // NB: we synthesize a new token here rather than reusing
+ // e->tok, because print_format::print likes to use
+ // its tok->content.
+ token* pf_tok = new token;
+ pf_tok->location = e->tok->location;
+ pf_tok->type = tok_identifier;
+ pf_tok->content = "sprint";
+
+ pf->tok = pf_tok;
pf->print_to_stream = false;
pf->print_with_format = true;
pf->print_with_delim = false;
pf->print_with_newline = false;
pf->print_char = false;
- Dwarf_Die result;
- if (dwarf_child (&scopes[0], &result) == 0)
- do
- {
- switch (dwarf_tag (&result))
- {
- case DW_TAG_variable:
- if (e->base_name == "$$parms")
- continue;
- break;
- case DW_TAG_formal_parameter:
- if (e->base_name == "$$locals")
- continue;
- break;
-
- default:
- continue;
- }
+ if (q.has_return && (e->base_name == "$$return"))
+ {
+ tsym->tok = e->tok;
+ tsym->base_name = "$return";
+
+ // Ignore any variable that isn't accessible.
+ tsym->saved_conversion_error = 0;
+ this->visit_target_symbol(tsym); // NB: throws nothing ...
+ if (tsym->saved_conversion_error) // ... but this is how we know it happened.
+ {
- const char *diename = dwarf_diename (&result);
- token* sym_tok = new token;
- sym_tok->location = e->get_tok()->location;
- sym_tok->type = tok_identifier;
- sym_tok->content = diename;
- tsym->tok = sym_tok;
- tsym->base_name = "$";
- tsym->base_name += diename;
-
- // Ignore any variable that isn't accessible.
- tsym->saved_conversion_error = 0;
- this->visit_target_symbol(tsym); // NB: throws nothing ...
- if (! tsym->saved_conversion_error) // ... but this is how we know it happened.
+ }
+ else
+ {
+ pf->raw_components += "return";
+ pf->raw_components += "=%#x ";
+ pf->args.push_back(*(expression**)this->targets.top());
+ }
+ }
+ else
+ {
+ // non-.return probe: support $$parms, $$vars, $$locals
+ Dwarf_Die result;
+ if (dwarf_child (&scopes[0], &result) == 0)
+ do
{
- pf->raw_components += diename;
- pf->raw_components += "=%#x ";
- pf->args.push_back(*(expression**)this->targets.top());
+ switch (dwarf_tag (&result))
+ {
+ case DW_TAG_variable:
+ if (e->base_name == "$$parms")
+ continue;
+ break;
+ case DW_TAG_formal_parameter:
+ if (e->base_name == "$$locals")
+ continue;
+ break;
+
+ default:
+ continue;
+ }
+
+ const char *diename = dwarf_diename (&result);
+ tsym->tok = e->tok;
+ tsym->base_name = "$";
+ tsym->base_name += diename;
+
+ // Ignore any variable that isn't accessible.
+ tsym->saved_conversion_error = 0;
+ this->visit_target_symbol(tsym); // NB: throws nothing ...
+ if (tsym->saved_conversion_error) // ... but this is how we know it happened.
+ {
+ pf->raw_components += diename;
+ pf->raw_components += "=? ";
+ }
+ else
+ {
+ pf->raw_components += diename;
+ pf->raw_components += "=%#x ";
+ pf->args.push_back(*(expression**)this->targets.top());
+ }
}
- }
- while (dwarf_siblingof (&result, &result) == 0);
+ while (dwarf_siblingof (&result, &result) == 0);
+ }
pf->components = print_format::string_to_components(pf->raw_components);
provide <print_format*> (this, pf);
@@ -4366,7 +4401,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
try
{
- if (q.has_return && e->base_name == "$return")
+ if (q.has_return && (e->base_name == "$return"))
{
ec->code = q.dw.literal_stmt_for_return (scope_die,
addr,
@@ -5910,7 +5945,6 @@ struct utrace_builder: public derived_probe_builder
bool has_path = get_param (parameters, TOK_PROCESS, path);
bool has_pid = get_param (parameters, TOK_PROCESS, pid);
enum utrace_derived_probe_flags flags = UDPF_NONE;
- assert (has_path || has_pid);
if (has_null_param (parameters, TOK_THREAD))
{
@@ -5931,23 +5965,23 @@ struct utrace_builder: public derived_probe_builder
else if (has_null_param (parameters, TOK_END))
flags = UDPF_END;
+ // If we didn't get a path or pid, this means to probe everything.
+ // Convert this to a pid-based probe.
+ if (! has_path && ! has_pid)
+ {
+ has_path = false;
+ path.clear();
+ has_pid = true;
+ pid = 0;
+ }
// Validate pid.
- if (has_pid)
+ else if (has_pid)
{
// We can't probe 'init' (pid 1).
if (pid < 2)
throw semantic_error ("process pid must be greater than 1",
location->tok);
}
- // If we have a path whose value is "*", this means to probe
- // everything. Convert this to a pid-based probe.
- else if (has_path && path == "*")
- {
- has_path = false;
- path.clear();
- has_pid = true;
- pid = 0;
- }
// If we have a regular path, we need to validate it.
else if (has_path)
{
@@ -6062,17 +6096,19 @@ utrace_derived_probe_group::emit_probe_decl (systemtap_session& s,
// For UDPF_SYSCALL/UDPF_SYSCALL_RETURN probes, the .report_death
// handler isn't strictly necessary. However, it helps to keep
- // our attaches/detaches symmetrical.
+ // our attaches/detaches symmetrical. Notice we're using quiesce
+ // as a workaround for bug 6841.
case UDPF_SYSCALL:
s.op->line() << " .flags=(UDPF_SYSCALL),";
- s.op->line() << " .ops={ .report_syscall_entry=stap_utrace_probe_syscall, .report_death=stap_utrace_task_finder_report_death },";
- s.op->line() << " .events=(UTRACE_EVENT(SYSCALL_ENTRY)|UTRACE_EVENT(DEATH)),";
+ s.op->line() << " .ops={ .report_syscall_entry=stap_utrace_probe_syscall, .report_death=stap_utrace_task_finder_report_death, .report_quiesce=stap_utrace_probe_syscall_quiesce },";
+ s.op->line() << " .events=(UTRACE_ACTION_QUIESCE|UTRACE_EVENT(QUIESCE)|UTRACE_EVENT(DEATH)),";
break;
case UDPF_SYSCALL_RETURN:
s.op->line() << " .flags=(UDPF_SYSCALL_RETURN),";
- s.op->line() << " .ops={ .report_syscall_exit=stap_utrace_probe_syscall, .report_death=stap_utrace_task_finder_report_death },";
- s.op->line() << " .events=(UTRACE_EVENT(SYSCALL_EXIT)|UTRACE_EVENT(DEATH)),";
+ s.op->line() << " .ops={ .report_syscall_exit=stap_utrace_probe_syscall, .report_death=stap_utrace_task_finder_report_death, .report_quiesce=stap_utrace_probe_syscall_quiesce },";
+ s.op->line() << " .events=(UTRACE_ACTION_QUIESCE|UTRACE_EVENT(QUIESCE)|UTRACE_EVENT(DEATH)),";
break;
+
case UDPF_NONE:
s.op->line() << " .flags=(UDPF_NONE),";
s.op->line() << " .ops={ },";
@@ -6194,6 +6230,24 @@ utrace_derived_probe_group::emit_module_decls (systemtap_session& s)
// Output handler function for SYSCALL_ENTRY and SYSCALL_EXIT events
if (flags_seen[UDPF_SYSCALL] || flags_seen[UDPF_SYSCALL_RETURN])
{
+ s.op->newline() << "static u32 stap_utrace_probe_syscall_quiesce(struct utrace_attached_engine *engine, struct task_struct *tsk) {";
+ s.op->indent(1);
+ s.op->newline() << "struct stap_utrace_probe *p = (struct stap_utrace_probe *)engine->data;";
+
+ // Turn off quiesce handling and turn on either syscall entry
+ // or exit events.
+ s.op->newline() << "if (p->flags == UDPF_SYSCALL)";
+ s.op->indent(1);
+ s.op->newline() << "utrace_set_flags(tsk, engine, UTRACE_EVENT(SYSCALL_ENTRY)|UTRACE_EVENT(DEATH));";
+ s.op->indent(-1);
+ s.op->newline() << "else if (p->flags == UDPF_SYSCALL_RETURN)";
+ s.op->indent(1);
+ s.op->newline() << "utrace_set_flags(tsk, engine, UTRACE_EVENT(SYSCALL_EXIT)|UTRACE_EVENT(DEATH));";
+ s.op->indent(-1);
+
+ s.op->newline() << "return (UTRACE_ACTION_NEWSTATE | UTRACE_ACTION_RESUME);";
+ s.op->newline(-1) << "}";
+
s.op->newline() << "static u32 stap_utrace_probe_syscall(struct utrace_attached_engine *engine, struct task_struct *tsk, struct pt_regs *regs) {";
s.op->indent(1);
s.op->newline() << "struct stap_utrace_probe *p = (struct stap_utrace_probe *)engine->data;";
@@ -8862,33 +8916,44 @@ register_standard_tapsets(systemtap_session & s)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_BEGIN)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_BEGIN)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_END)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_END)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_END)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_BEGIN)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_BEGIN)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_BEGIN)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_END)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_END)
->bind(new utrace_builder ());
-
- // itrace user-space probes
- s.pattern_root->bind_str(TOK_PROCESS)->bind("itrace")
- ->bind(new itrace_builder ());
- s.pattern_root->bind_num(TOK_PROCESS)->bind("itrace")
- ->bind(new itrace_builder ());
-
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_END)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_SYSCALL)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_SYSCALL)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_SYSCALL)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_SYSCALL)->bind(TOK_RETURN)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_SYSCALL)->bind(TOK_RETURN)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_SYSCALL)->bind(TOK_RETURN)
+ ->bind(new utrace_builder ());
+
+ // itrace user-space probes
+ s.pattern_root->bind_str(TOK_PROCESS)->bind("itrace")
+ ->bind(new itrace_builder ());
+ s.pattern_root->bind_num(TOK_PROCESS)->bind("itrace")
+ ->bind(new itrace_builder ());
// marker-based parts
s.pattern_root->bind(TOK_KERNEL)->bind_str(TOK_MARK)
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index c6d86142..9c7f8fec 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-15 David Smith <dsmith@redhat.com>
+
+ * systemtap.base/utrace_p4.exp: Change system-wide probes from
+ 'process("*").begin' to 'process.begin'.
+
2008-08-13 Dave Brolley <brolley@redhat.com>
* lib/systemtap.exp (setup_systemtap_environment): client_path is now
diff --git a/testsuite/semok/thirtytwo.stp b/testsuite/semok/thirtytwo.stp
new file mode 100755
index 00000000..2a69b8cd
--- /dev/null
+++ b/testsuite/semok/thirtytwo.stp
@@ -0,0 +1,5 @@
+#! stap -p2
+
+# PR 6836
+
+probe kernel.function("sys_open").return { log($$return . $$parms) }
diff --git a/testsuite/systemtap.base/utrace_p4.exp b/testsuite/systemtap.base/utrace_p4.exp
index 081fee95..1467d9c8 100644
--- a/testsuite/systemtap.base/utrace_p4.exp
+++ b/testsuite/systemtap.base/utrace_p4.exp
@@ -15,7 +15,7 @@ set syscall_script {"probe process(\"/bin/ls\").syscall { printf(\"|%d\", \$sysc
set syscall_return_script {"probe process(\"/bin/ls\").syscall.return { printf(\"|%d\", \$syscall) }"}
set thread_begin_script {"probe process(\"/bin/ls\").thread.begin { print(\"ls thread.begin\") }"}
set thread_end_script {"probe process(\"/bin/ls\").thread.end { print(\"ls thread.end\") }"}
-set all_begin_script {"probe process(\"*\").begin { print(\"begin\") }"}
+set all_begin_script {"probe process.begin { print(\"begin\") }"}
set pid_begin_script {"probe process(123).begin { print(\"123 begin\") }"}
set pid_end_script {"probe process(123).end { print(\"123 end\") }"}
@@ -134,6 +134,6 @@ set TEST_NAME "UTRACE_P4_07"
if {$utrace_support_found == 0} {
untested "$TEST_NAME : no kernel utrace support found"
} else {
- # Try compiling an begin script using a path of "*"
+ # Try compiling an system-wide begin script
stap_compile $TEST_NAME 1 $all_begin_script
}
diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog
index 682e44e5..af641ba7 100644
--- a/testsuite/systemtap.examples/ChangeLog
+++ b/testsuite/systemtap.examples/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-15 Frank Ch. Eigler <fche@elastic.org>
+
+ * general/para-callgraph*: Extend.
+ * indexes: Regenerated.
+
2008-08-11 Mark Wielaard <mwielaard@redhat.com>
* check.exp: Make sure that stderr gets redircted so warnings don't
diff --git a/testsuite/systemtap.examples/general/para-callgraph.meta b/testsuite/systemtap.examples/general/para-callgraph.meta
index 3ce4b648..740ed5ce 100644
--- a/testsuite/systemtap.examples/general/para-callgraph.meta
+++ b/testsuite/systemtap.examples/general/para-callgraph.meta
@@ -1,13 +1,7 @@
-title: Tracing Calls for Sections of Code
+title: Callgraph tracing with arguments
name: para-callgraph.stp
-version: 1.0
-author: anonymous
keywords: trace callgraph
-subsystem: kernel
-status: production
-exit: user-controlled
-output: trace
-scope: system-wide
-description: The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.
-test_check: stap -p4 para-callgraph.stp sys_read "*@fs/*.c"
-test_installcheck: stap para-callgraph.stp sys_read "*@fs/*.c" -c "sleep 1"
+subsystem: general
+description: Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.
+test_check: stap -p4 para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")'
+test_installcheck: stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")' -c 'cat /proc/sys/vm/*'
diff --git a/testsuite/systemtap.examples/general/para-callgraph.stp b/testsuite/systemtap.examples/general/para-callgraph.stp
index e28f5d6b..9abb00c2 100755
--- a/testsuite/systemtap.examples/general/para-callgraph.stp
+++ b/testsuite/systemtap.examples/general/para-callgraph.stp
@@ -1,22 +1,24 @@
#! /usr/bin/env stap
-function trace(entry_p) {
- if(tid() in trace)
- printf("%s%s%s\n",thread_indent(entry_p),
- (entry_p>0?"->":"<-"),
- probefunc())
+function trace(entry_p, extra) {
+ %( $# > 1 %? if (tid() in trace) %)
+ printf("%s%s%s %s\n",
+ thread_indent (entry_p),
+ (entry_p>0?"->":"<-"),
+ probefunc (),
+ extra)
}
+
+%( $# > 1 %?
global trace
-probe kernel.function(@1).call {
- if (execname() == "stapio") next # skip our own helper process
+probe $2.call {
trace[tid()] = 1
- trace(1)
}
-probe kernel.function(@1).return {
- trace(-1)
+probe $2.return {
delete trace[tid()]
}
+%)
-probe kernel.function(@2).call { trace(1) }
-probe kernel.function(@2).return { trace(-1) }
+probe $1.call { trace(1, $$parms) }
+probe $1.return { trace(-1, $$return) }
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
index 327e9ef9..d6b1c99b 100644
--- a/testsuite/systemtap.examples/index.html
+++ b/testsuite/systemtap.examples/index.html
@@ -47,9 +47,9 @@ subsystems: disk cpu, keywords: disk cpu use graph<br>
<li><a href="general/helloworld.stp">general/helloworld.stp</a> - SystemTap "Hello World" Program<br>
subsystems: none, keywords: simple<br>
<p>A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.</p></li>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
<li><a href="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br>
subsystems: disk, keywords: disk<br>
<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt
index aed6f457..1372afb0 100644
--- a/testsuite/systemtap.examples/index.txt
+++ b/testsuite/systemtap.examples/index.txt
@@ -16,14 +16,15 @@ subsystems: none, keywords: simple
prints out "hello world" message and then immediately exits.
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
-
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
+
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
io/disktop.stp - Summarize Disk Read/Write Traffic
diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html
index 5d1c79e0..2825bc2e 100644
--- a/testsuite/systemtap.examples/keyword-index.html
+++ b/testsuite/systemtap.examples/keyword-index.html
@@ -49,9 +49,9 @@ subsystems: io, keywords: io backtrace<br>
</ul>
<h3><a name="CALLGRAPH">CALLGRAPH</a></h3>
<ul>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
</ul>
<h3><a name="CPU">CPU</a></h3>
<ul>
@@ -214,9 +214,9 @@ subsystems: syscall, keywords: syscall read write time io<br>
</ul>
<h3><a name="TRACE">TRACE</a></h3>
<ul>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
</ul>
<h3><a name="TRAFFIC">TRAFFIC</a></h3>
<ul>
diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt
index d2e20148..22065e76 100644
--- a/testsuite/systemtap.examples/keyword-index.txt
+++ b/testsuite/systemtap.examples/keyword-index.txt
@@ -13,14 +13,15 @@ subsystems: io, keywords: io backtrace
= CALLGRAPH =
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
= CPU =
@@ -395,14 +396,15 @@ subsystems: syscall, keywords: syscall read write time io
= TRACE =
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
= TRAFFIC =
diff --git a/testsuite/systemtap.examples/subsystem-index.html b/testsuite/systemtap.examples/subsystem-index.html
index 9bdec0c8..0f2517ce 100644
--- a/testsuite/systemtap.examples/subsystem-index.html
+++ b/testsuite/systemtap.examples/subsystem-index.html
@@ -40,7 +40,7 @@
</ul>
<h2>Examples by Subsystem</h2>
-<p><tt><a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#IO">IO</a> <a href="#KERNEL">KERNEL</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#NONE">NONE</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SYSCALL">SYSCALL</a> </tt></p>
+<p><tt><a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#GENERAL">GENERAL</a> <a href="#IO">IO</a> <a href="#KERNEL">KERNEL</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#NONE">NONE</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SYSCALL">SYSCALL</a> </tt></p>
<h3><a name="CPU">CPU</a></h3>
<ul>
<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
@@ -56,6 +56,12 @@ subsystems: disk cpu, keywords: disk cpu use graph<br>
subsystems: disk, keywords: disk<br>
<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
</ul>
+<h3><a name="GENERAL">GENERAL</a></h3>
+<ul>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
+</ul>
<h3><a name="IO">IO</a></h3>
<ul>
<li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br>
@@ -73,9 +79,6 @@ subsystems: io, keywords: io<br>
</ul>
<h3><a name="KERNEL">KERNEL</a></h3>
<ul>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
<li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br>
subsystems: kernel, keywords: profiling<br>
<p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li>
diff --git a/testsuite/systemtap.examples/subsystem-index.txt b/testsuite/systemtap.examples/subsystem-index.txt
index 98e75e98..d34ac64c 100644
--- a/testsuite/systemtap.examples/subsystem-index.txt
+++ b/testsuite/systemtap.examples/subsystem-index.txt
@@ -28,6 +28,19 @@ subsystems: disk, keywords: disk
ten entries during that period.
+= GENERAL =
+
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
+
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
+
+
= IO =
io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
@@ -61,16 +74,6 @@ subsystems: io, keywords: io
= KERNEL =
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
-
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
-
-
process/pf2.stp - Profile kernel functions
subsystems: kernel, keywords: profiling