]> sourceware.org Git - systemtap.git/log
systemtap.git
12 years agounprivileged_probes.exp remove bare netfilter.hook(string) tests.
Mark Wielaard [Mon, 21 May 2012 20:42:31 +0000 (22:42 +0200)]
unprivileged_probes.exp remove bare netfilter.hook(string) tests.

Bare netfilter.hook(string) is no longer valid, it always needs pf(string).

12 years agounprivileged_probes.exp test both netfilter pf(string)/hook(string) variants.
Mark Wielaard [Mon, 21 May 2012 20:33:29 +0000 (22:33 +0200)]
unprivileged_probes.exp test both netfilter pf(string)/hook(string) variants.

Both netfilter.pf(string).hook(string) and netfilter.hook(string).pf(string)
are valid (plus priority).

12 years agoMore tapset-netfilter.cxx compile fixes.
Mark Wielaard [Mon, 21 May 2012 17:49:42 +0000 (19:49 +0200)]
More tapset-netfilter.cxx compile fixes.

Define NF_IP_PRI_SECURITY and NF_INET_PRE_ROUTING constants for pre 2.6.26
and pre 2.6.24 kernels.

12 years agotapset-netfilter.cxx compile fixes.
Mark Wielaard [Mon, 21 May 2012 17:27:36 +0000 (19:27 +0200)]
tapset-netfilter.cxx compile fixes.

include limits.h for MAX_INT and MIN_INT, define NF_IP6_PRI_RAW if undefined.

12 years agoAdd testcase for PR14107 Bad user unwinding from kernel fatal signal handler.
Mark Wielaard [Mon, 21 May 2012 10:57:41 +0000 (12:57 +0200)]
Add testcase for PR14107 Bad user unwinding from kernel fatal signal handler.

This is really a kernel bug, see bug report, when the CFI for the assembly
code is missing we cannot properly recover the register state for the user
process and might give a bad/missing user backtrace.

12 years agoPR13667: Fixed probe point ordering
Chris Meek [Fri, 18 May 2012 19:28:13 +0000 (15:28 -0400)]
PR13667: Fixed probe point ordering

Now supports:

netfilter.hook().pf()
netfilter.pf().hook()
netfilter.hook().pf().priority()
netfilter.pf().hook().priority()

And .priority() no longer has a default value (i.e. it is
required).

12 years agoPR13667: Fixed guru mode hook-not-defined bug
Chris Meek [Fri, 18 May 2012 18:54:34 +0000 (14:54 -0400)]
PR13667: Fixed guru mode hook-not-defined bug

Before, when in guru mode, it would pass the hook/priority
strings across without checking/converting them to numbers. This
caused a bug where perfectly legal strings (such as NF_IP_PRE_ROUTING)
would be unrecognized in the generated code since their definitions
are not available in kernel space.

Now, it checks/converts all the strings to numbers whether in guru
mode or not, but only complains about mismatches if not in guru mode.
If in guru mode, it will still pass the initial string across if it
doesn't match anything else.

12 years agoPR13667: Tweak verdict-needs-guru error message
Chris Meek [Fri, 18 May 2012 14:23:31 +0000 (10:23 -0400)]
PR13667: Tweak verdict-needs-guru error message

12 years agoPR13667: Added guru mode requirement for $verdict
Chris Meek [Wed, 16 May 2012 21:25:37 +0000 (17:25 -0400)]
PR13667: Added guru mode requirement for $verdict

guru mode is needed to write to $verdict, for obvious reasons

12 years agoPR13667: Range checking for hooks and priorities
Chris Meek [Wed, 16 May 2012 20:52:35 +0000 (16:52 -0400)]
PR13667: Range checking for hooks and priorities

- Added more strict range checking for hook names
- Added support for arp and bridge netfilter hooks
- Added range checking of priority strings for ipv4
  and ipv6 hooks, numerical checking for all

12 years agoREADME: note that kernel-debuginfo is not a real prerequisite
Frank Ch. Eigler [Thu, 17 May 2012 23:48:35 +0000 (19:48 -0400)]
README: note that kernel-debuginfo is not a real prerequisite

12 years agoAUTHORS bump
Frank Ch. Eigler [Thu, 17 May 2012 23:43:49 +0000 (19:43 -0400)]
AUTHORS bump

12 years agoFix loop direction in netfilter_derived_probe_group::emit_module_init.
Serguei Makarov [Thu, 17 May 2012 21:03:31 +0000 (17:03 -0400)]
Fix loop direction in netfilter_derived_probe_group::emit_module_init.

12 years agopass-N messages: print also data+stack consumption from /proc/self/statm
Frank Ch. Eigler [Thu, 17 May 2012 21:00:31 +0000 (17:00 -0400)]
pass-N messages: print also data+stack consumption from /proc/self/statm

* util.cxx (getmemusage): Extract all other fields from /proc/self/statm.
  Toss most of them away.  Print #6 also.

12 years agoHelp onoffprobe.exp pass more consistently.
David Smith [Wed, 16 May 2012 14:40:11 +0000 (09:40 -0500)]
Help onoffprobe.exp pass more consistently.

* testsuite/systemtap.base/onoffprobe.exp (advance): Tweak regexps so that
  the test will pass more consistently.

12 years agoRHBZ 820487 - Disable client.exp tests when avahi-daemon is not working.
Dave Brolley [Mon, 14 May 2012 14:56:55 +0000 (10:56 -0400)]
RHBZ 820487 - Disable client.exp tests when avahi-daemon is not working.

12 years agoplt.exp: Don't count unreliable plt invocations.
Mark Wielaard [Mon, 14 May 2012 10:39:10 +0000 (12:39 +0200)]
plt.exp: Don't count unreliable plt invocations.

Depending on gcc version and glibc used plt calls to malloc, free and
__cxa_finalize differ too much (or are just optimized away completely)
to rely on them in the test. Just take them out.

12 years agoadd dbug_task_vma debug macro
Negreanu Marius Adrian [Sat, 12 May 2012 14:31:58 +0000 (17:31 +0300)]
add dbug_task_vma debug macro

replace DEBUG_TASK_FINDER_VMA
with a dbug_unwind-like macro: dbug_task_vma

12 years ago(BZ820457 partial fix) Update the list of systemtap-testsuite requires.
David Smith [Fri, 11 May 2012 19:28:40 +0000 (14:28 -0500)]
(BZ820457 partial fix) Update the list of systemtap-testsuite requires.

* systemtap.spec: Add more systemtap-testsuite requires (systemtap-server,
  avahi, and crash).

12 years ago(BZ820457 partial fix) Update systemtap.printf/sharedbuf.exp for ppc64.
David Smith [Fri, 11 May 2012 18:19:21 +0000 (13:19 -0500)]
(BZ820457 partial fix) Update systemtap.printf/sharedbuf.exp for ppc64.

* testsuite/systemtap.printf/sharedbuf.exp: For ppc64, expect a leading
  '.' on the symbol name we're looking for.

12 years agovarwatch example: make var-changed report lines less verbose
Frank Ch. Eigler [Thu, 10 May 2012 20:34:13 +0000 (16:34 -0400)]
varwatch example: make var-changed report lines less verbose

12 years agoUpdate bz6503.exp testcase.
David Smith [Thu, 10 May 2012 20:04:17 +0000 (15:04 -0500)]
Update bz6503.exp testcase.

* testsuite/systemtap.base/bz6503.exp: Make the test work by non-root
  users.  Also add fat/vfat modules as suggested in BZ820487.
* testsuite/systemtap.base/bz6503.stp: Add fat/vfat modules as
  alternatives as suggested in BZ820487.

12 years agoSet the proper ip address family in resolved addresses rahter than asserting it.
Dave Brolley [Thu, 10 May 2012 18:51:00 +0000 (14:51 -0400)]
Set the proper ip address family in resolved addresses rahter than asserting it.

12 years agoparser: add comment re. undesirability of changes to keywords set
Frank Ch. Eigler [Wed, 9 May 2012 15:49:18 +0000 (11:49 -0400)]
parser: add comment re. undesirability of changes to keywords set

12 years agobump AUTHORS
Frank Ch. Eigler [Wed, 9 May 2012 15:32:26 +0000 (11:32 -0400)]
bump AUTHORS

12 years agostap-report: simplify avahi-browse invocation
Frank Ch. Eigler [Wed, 9 May 2012 15:30:36 +0000 (11:30 -0400)]
stap-report: simplify avahi-browse invocation

12 years agostap-report: add avahi-browse & ifconfig outputs to help diagnose network issues
Frank Ch. Eigler [Wed, 9 May 2012 15:22:01 +0000 (11:22 -0400)]
stap-report: add avahi-browse & ifconfig outputs to help diagnose network issues

12 years agoparsing: when complaining about tok_junk, hex-dump the character in question
Frank Ch. Eigler [Tue, 8 May 2012 21:36:03 +0000 (17:36 -0400)]
parsing: when complaining about tok_junk, hex-dump the character in question

12 years agoGive good error messages for inodes uprobes registration errors.
David Smith [Tue, 8 May 2012 21:07:08 +0000 (16:07 -0500)]
Give good error messages for inodes uprobes registration errors.

* translate.cxx (c_unparser::emit_module_init): Only print an error if
  'probe_point' isn't NULL.
* tapsets.cxx (uprobe_derived_probe_group::emit_module_inode_init): Let
  stapiu_init() handle reporting errors by setting 'probe_point' to NULL.
* runtime/uprobes-inode.c (stapiu_get): Print errors when needed.
  (stapiu_reg): Ditto.

12 years agoconfigury: automake 1.12 as deprecated automatic de-ANSI-fication support
Nitin A Kamble [Tue, 8 May 2012 18:13:49 +0000 (14:13 -0400)]
configury: automake 1.12 as deprecated automatic de-ANSI-fication support

Fix this issue with automake 1.12:

| configure.ac:23: error: automatic de-ANSI-fication support has been removed

[fche:] Note that the systemtap git repository and source releases include
autoconf- and automake-generated files, so this is only an issue for those
who have an unusual reason to regenerate them.

Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
12 years agoImprove the labels.exp testcase output handling.
David Smith [Tue, 8 May 2012 18:03:40 +0000 (13:03 -0500)]
Improve the labels.exp testcase output handling.

* testsuite/systemtap.base/labels.exp: Handle probe output in either
  order, which is OK when the probes are probing the same address.

12 years agoPR14079 - caller() pass-4 error if no uretprobes in script
Mark Wielaard [Tue, 8 May 2012 17:59:07 +0000 (19:59 +0200)]
PR14079 - caller() pass-4 error if no uretprobes in script

caller() is odd in that it tries to do both kernel and user caller.
There is no ucaller(). Move it into its own tapset and include the
right uprobes related structures.

* runtime/uprobes-inc.h: New include file to be included in ...
* runtime/stack.c: here and ...
* tapset/context-caller.stp: here. New tapset, with just the caller context
  function, removed from ...
* tapset/context-unwind.stp: here.
* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Also include context-caller.stp.

12 years agoImprove gtod.exp testcase.
David Smith [Tue, 8 May 2012 16:43:06 +0000 (11:43 -0500)]
Improve gtod.exp testcase.

* testsuite/systemtap.base/gtod.exp: Make more robust by using a state
  machine to match output.

12 years agoPR14078: work around rpmio's bad glob
Frank Ch. Eigler [Tue, 8 May 2012 14:23:50 +0000 (10:23 -0400)]
PR14078: work around rpmio's bad glob

Work around ancient rpm packaging misfeature.
https://bugzilla.redhat.com/show_bug.cgi?id=819680

* configure.ac (rpm*): Force -lc before -lrpm*.

12 years agoRegenerate examples index.
Mark Wielaard [Mon, 7 May 2012 23:53:30 +0000 (01:53 +0200)]
Regenerate examples index.

12 years agoImprove the case-scope testcase output handling.
David Smith [Mon, 7 May 2012 21:40:38 +0000 (16:40 -0500)]
Improve the case-scope testcase output handling.

* testsuite/systemtap.base/cast-scope.stp: Print the probe strings in a
  defined order (since the process.function and process.mark probes can
  end up at the same address).

12 years agoMinor bz5274.exp fixes.
David Smith [Mon, 7 May 2012 21:36:24 +0000 (16:36 -0500)]
Minor bz5274.exp fixes.

* testsuite/systemtap.base/bz5274.exp: Make sure test output is saved in
  the log file.  Make sure to clean up.

12 years agoPR13667: update privileged* tests for netfilter-hook probe point name tweaks
Frank Ch. Eigler [Mon, 7 May 2012 13:45:23 +0000 (09:45 -0400)]
PR13667: update privileged* tests for netfilter-hook probe point name tweaks

12 years agofix the small compile issues in the Cleanups DWARF patch
Negreanu Marius Adrian [Mon, 7 May 2012 11:57:16 +0000 (14:57 +0300)]
fix the small compile issues in the Cleanups DWARF patch

Signed-off-by: Negreanu Marius Adrian <adrian.m.negreanu@intel.com>
12 years agoCleanups and fixes for DWARF unwinder.
Mark Wielaard [Mon, 7 May 2012 08:20:21 +0000 (10:20 +0200)]
Cleanups and fixes for DWARF unwinder.

Add explict comments and set_*_rule functions for different states.
Do data alignment in processCFI, not afterwards in unwind_frame.
Remove unnecessary UNW_DEFAULT_RA. Make unwind_item state union
explicit about (unsigned) reg versus (signed) offset. Same for
unwind_reg_state cfa.

12 years agotoolshed name change: vardecl::skip_init->synthetic
Frank Ch. Eigler [Mon, 7 May 2012 02:10:52 +0000 (22:10 -0400)]
toolshed name change: vardecl::skip_init->synthetic

* staptree.h (vardecl::skip_init): Rename field to "synthetic".
  Update all users.

12 years agoPR13667: beginning of a netfilter-hook tapset
Frank Ch. Eigler [Mon, 7 May 2012 01:11:30 +0000 (21:11 -0400)]
PR13667: beginning of a netfilter-hook tapset

12 years agoPR13667: rework netfilter hook $context variable processing
Frank Ch. Eigler [Mon, 7 May 2012 01:01:17 +0000 (21:01 -0400)]
PR13667: rework netfilter hook $context variable processing

We now use tapset-mark.cxx style script/probe locals for incoming and
outgoing parameters.  These are written/read during the probe prologue
function, and specially marked to prevent optimization/elision.

12 years agoelaboration: don't elide assignments to skip_init vardecls
Frank Ch. Eigler [Mon, 7 May 2012 00:59:09 +0000 (20:59 -0400)]
elaboration: don't elide assignments to skip_init vardecls

Such vardecl objects may also used for output parameters, for which
we don't want to suppress assignments to.

* elaborate.cxx (dead_assignment_remover::visit_assignment): Don't kill
  lvalue skip_init vardecls.

12 years agorespond to pending_interrupts during sub-make sequence
Frank Ch. Eigler [Mon, 7 May 2012 00:57:51 +0000 (20:57 -0400)]
respond to pending_interrupts during sub-make sequence

* buildrun.cxx (run_make_cmd): If we already received a ^C as per
  pending_interrupts, but some naive caller has tried to run yet
  another inferior make, abort without even trying.

12 years agoauditbt example: sudo doesn't take -c.
Mark Wielaard [Sun, 6 May 2012 21:54:23 +0000 (23:54 +0200)]
auditbt example: sudo doesn't take -c.

12 years agoPR14057 - ERROR: Your privilege credentials (stapsys) are insufficient...
Mark Wielaard [Thu, 3 May 2012 19:49:11 +0000 (21:49 +0200)]
PR14057 - ERROR: Your privilege credentials (stapsys) are insufficient...

Initialize user_credentials to pr_unknown in init_staprun and set them
to pr_all when getuid() == 0 in assert_stap_module_permissions or
assert_uprobes_module_permissions.

12 years agoImproved task_finder2 mmap tracking and better task_work cleanup.
David Smith [Thu, 3 May 2012 19:20:34 +0000 (14:20 -0500)]
Improved task_finder2 mmap tracking and better task_work cleanup.

* runtime/task_finder2.c (__stp_tf_alloc_task_work): New function.
  (__stp_tf_free_task_work): Ditto.
  (__stp_tf_cancel_task_work): Ditto.
  (__stp_tf_quiesce_worker): Renamed from __stp_task_worker(). Uses
  __stp_tf_free_task_work() to free the task_work structure.
  (__stp_utrace_task_finder_target_quiesce): Uses
  __stp_tf_alloc_task_work() to allocate a task_work structure.
  (__stp_tf_mmap_worker): New task_work worker function.
  (__stp_utrace_task_finder_target_syscall_exit): If we're in an atomic
  context, use task_work_add() to call __stp_tf_mmap_worker().
  (stap_stop_task_finder): Call __stp_tf_cancel_task_work() to cancel all
  outstanding task work requests.

12 years agoPR13667 (in progress): Added initial context varaible code
Chris Meek [Thu, 3 May 2012 13:29:49 +0000 (09:29 -0400)]
PR13667 (in progress): Added initial context varaible code

Added some initial code to handle context variables such as
$verdict. It is not functioning properly yet, but it is still
in progress.

12 years agoRemove more unused semaphore code from dwarf_derived_probe class.
David Smith [Thu, 3 May 2012 14:36:28 +0000 (09:36 -0500)]
Remove more unused semaphore code from dwarf_derived_probe class.

* tapsets.cxx (dwarf_derived_probe::join_group): Remove semaphore code.
  (dwarf_derived_probe::emit_probe_local_init): Ditto.
  (dwarf_derived_probe_group::emit_module_decls): Ditto.

12 years agoFix PR13992 cont. Do iterate_over_modules, just not over libraries.
Mark Wielaard [Wed, 2 May 2012 19:13:30 +0000 (21:13 +0200)]
Fix PR13992 cont. Do iterate_over_modules, just not over libraries.

The original fix for PR13992 (commit 0ce08aa) failed to iterate of any
modules when no executable path was found, which made the exelib.exp
testcase fail. Refixed by iterating of modules, just not over libraries.

12 years agoRemoved unused kprobe1 sdt support.
David Smith [Wed, 2 May 2012 19:31:58 +0000 (14:31 -0500)]
Removed unused kprobe1 sdt support.

* sdt_types.h: Remove KPROBE1_TYPE define and kprobe1_type enum value.
* testsuite/sys/sdt.h: Ditto.
* tapsets.cxx (sdt_kprobe_var_expanding_visitor): Removed struct and its
  functions.
  (sdt_query::have_kprobe): Removed function.
  (sdt_query::handle_probe_entry): Removed kprobe1_type support.
  (sdt_query::iterate_over_probe_entries): Removed have_kprobe() code.
  (sdt_query::convert_probe): Ditto.
  (sdt_query::convert_location): Ditto.

12 years agoUpdate AUTHORS, with a few canonicalized in .mailmap
Josh Stone [Wed, 2 May 2012 18:24:56 +0000 (11:24 -0700)]
Update AUTHORS, with a few canonicalized in .mailmap

12 years agoRemoved EXPERIMENTAL_KPROBE_SDT support.
David Smith [Wed, 2 May 2012 17:51:13 +0000 (12:51 -0500)]
Removed EXPERIMENTAL_KPROBE_SDT support.

* tapsets.cxx (dwarf_derived_probe_group): Removed 'has_semaphores' member
  variable.
  (dwarf_derived_probe_group::enroll): Throw an error if we have a
  semaphore.
  (dwarf_derived_probe_group::emit_module_decls): No longer emit semaphore
  support in struct stap_dwarf_probe or include kprobes-common.c.
  (dwarf_derived_probe_group::emit_module_init): No longer initialize
  semaphore info in struct stap_dwarf_probe.
  (dwarf_derived_probe_group::emit_module_exit): No longer decrement
  semaphores on module exit.
  (sdt_query::have_kprobe): Remove kprobe2_type support.
  (sdt_query::handle_probe_entry): Ditto.
  (sdt_query::iterate_over_probe_entries): Ditto.
  (sdt_query::convert_location): Ditto.
* sdt_types.h: Remove KPROBE2_TYPE define and kprobe2_type enum value.
* runtime/kprobes-common.c: Deleted.
* runtime/kprobes-common.h: Removed deleted function declarations.
* scripts/probe_perf/bench.sh: Remove EXPERIMENTAL_KPROBE_SDT test.
* testsuite/sys/sdt.h: Removed EXPERIMENTAL_KPROBE_SDT support.
* testsuite/systemtap.base/sdt.exp: Ditto.
* testsuite/systemtap.base/sdt_misc.exp: Ditto.

12 years agosamples: eventcount: add a bunch of configuration options
Frank Ch. Eigler [Fri, 27 Apr 2012 22:53:46 +0000 (18:53 -0400)]
samples: eventcount: add a bunch of configuration options

12 years agoUse new task_work kernel feature to truly stop tasks.
David Smith [Fri, 27 Apr 2012 20:43:16 +0000 (15:43 -0500)]
Use new task_work kernel feature to truly stop tasks.

* buildrun.cxx (compile_pass): Add STAPCONF_TASK_WORK_ADD_EXPORTED autoconf.
* runtime/autoconf-utrace-via-ftrace.c (__autoconf_func): Makes sure
  <linux/task_work.h> is present and works.
* runtime/autoconf-utrace-via-tracepoints.c (__autoconf_func): Ditto.
* runtime/runtime.h: Added export kludge variables for task_work_add() and
  task_work_cancel().
* runtime/stp_utrace.c (utrace_init): If the task_work_* functions aren't
  exported, use kallsyms_lookup_name() to find them.
  (utrace_cleanup): Cancel work function if necessary.
  (utrace_task_alloc): Initialize task work structure.
  (utrace_free): Cancel work function if necessary.
  (utrace_do_stop): Use task_work_add() functionality to replace
  set_notify_resume().
  (utrace_stop): Ditto.
  (utrace_control): Ditto.
  (finish_report): Ditto.
  (utrace_resume): Updated to work as task worker function.
* runtime/task_finder2.c (__stp_task_worker): New function.
  (__stp_utrace_task_finder_target_quiesce): If we can't sleep, use
  task_work_add() to truly stop the task.
* runtime/uprobes-inode.c (stapiu_change_plus): Check build-ids.

12 years agoPR13667 cont'd: Fixed test case
Chris Meek [Thu, 26 Apr 2012 14:37:34 +0000 (10:37 -0400)]
PR13667 cont'd: Fixed test case

Added netfilter probes to the restricted_probe_types list.

12 years agoPR13667 cont'd: Added compile code
Chris Meek [Thu, 26 Apr 2012 14:35:39 +0000 (10:35 -0400)]
PR13667 cont'd: Added compile code

12 years agoPR13667 cont'd: Added parameters
Chris Meek [Thu, 26 Apr 2012 13:59:01 +0000 (09:59 -0400)]
PR13667 cont'd: Added parameters

Now has parameters for hook, protocol family and priority

12 years agobloat: lament about symbol-name literal strings in stap-symbols.h
Frank Ch. Eigler [Wed, 25 Apr 2012 03:04:51 +0000 (23:04 -0400)]
bloat: lament about symbol-name literal strings in stap-symbols.h

12 years agotranslate symbol/unwind extraction: shrink eh_frame output
Frank Ch. Eigler [Tue, 24 Apr 2012 21:00:36 +0000 (17:00 -0400)]
translate symbol/unwind extraction: shrink eh_frame output

commit ebc08b5 forgot the eh_header[] dump case.

* translate.cxx (dump_unwindsym_cxt): Decimify eh_frame[] contents too.

12 years agoPR14000: remove sysroot prefix from a few more strings
Negreanu Adrian [Tue, 24 Apr 2012 20:47:00 +0000 (16:47 -0400)]
PR14000: remove sysroot prefix from a few more strings

* tapsets.cxx (sdt_query::handle_probe_entry): Here, ...
* translate.cxx (dump_unwindsym_cxt): ... and here.

12 years agoSmall comment clarification in tapset/ia64/registers.stp.
David Smith [Tue, 24 Apr 2012 16:28:29 +0000 (11:28 -0500)]
Small comment clarification in tapset/ia64/registers.stp.

12 years agoUpdated and added syscall testsuite debug scripts.
David Smith [Tue, 24 Apr 2012 16:04:35 +0000 (11:04 -0500)]
Updated and added syscall testsuite debug scripts.

* testsuite/systemtap.syscall/test-debug.tcl: Updated regexp that looks
  for specially formatted comments in the test executable source.
* testsuite/systemtap.syscall/test-debug-cmd.tcl: New script, similar to
  test-debug.tcl, but displays the output on the command line (instead of
  in its own window).
* testsuite/systemtap.syscall/test-debug-cmd-nd.tcl: New script, similar to
  test-debug-cmd.tcl, but used the nd_sycall tapset.

12 years agoAdded ia64/registers.stp.
David Smith [Mon, 23 Apr 2012 21:29:00 +0000 (16:29 -0500)]
Added ia64/registers.stp.

* tapset/ia64/registers.stp: New file. Add note that using
  syscall_get_arguments() doesn't work for ia64.

12 years agostaprun: conditionalize use of pthread_mutex*
Frank Ch. Eigler [Mon, 23 Apr 2012 20:27:00 +0000 (16:27 -0400)]
staprun: conditionalize use of pthread_mutex*

staprun is compiled single-threaded, but recent improvements to
util.cxx made it implicitly pthreads-dependent.  Conditionalize
pthread_* calls with #ifndef SINGLE_THREADED throughout.

Reported-By: "Turgis, Frederic" <f-turgis@ti.com>
12 years agoFixed PR11763 by supporting getting arg 6 for nd_syscall probes.
David Smith [Mon, 23 Apr 2012 19:28:14 +0000 (14:28 -0500)]
Fixed PR11763 by supporting getting arg 6 for nd_syscall probes.

* tapset/s390/registers.stp: Convert _stp_arg() to an embedded-C function
  that uses syscall_get_arguments() to find argument values.

12 years agostaprun: fix missing \n on reloc-related dbug messages
Frank Ch. Eigler [Fri, 20 Apr 2012 18:42:01 +0000 (14:42 -0400)]
staprun: fix missing \n on reloc-related dbug messages

12 years agoPR14005: tolerate rudely long kernel module/section names
Frank Ch. Eigler [Fri, 20 Apr 2012 18:37:48 +0000 (14:37 -0400)]
PR14005: tolerate rudely long kernel module/section names

* staprun.c (send_relocation_modules): Ignore return value from
  send_a_relocation(), as failures there are entirely tolerable.

12 years agocontext tapsets: remove EXPERIMENTAL word from the various functions
Frank Ch. Eigler [Fri, 20 Apr 2012 14:12:26 +0000 (10:12 -0400)]
context tapsets: remove EXPERIMENTAL word from the various functions

Two years of EXPERIMENTAL status is plenty.

12 years agoPR13999: Use %#c to escape pretty-printed characters
Josh Stone [Fri, 20 Apr 2012 00:19:53 +0000 (17:19 -0700)]
PR13999: Use %#c to escape pretty-printed characters

We especially need escaping to combat \0 characters, which would
truncate the rest of the pretty-printed string.

* tapsets.cxx (dwarf_pretty_print::recurse_base): Use %#c for chars.
* testsuite/systemtap.printf/pretty-char.*: Test char escaping.

12 years agoPR13999: Let "%#c" add escapes for nonprintables
Josh Stone [Fri, 20 Apr 2012 00:11:14 +0000 (17:11 -0700)]
PR13999: Let "%#c" add escapes for nonprintables

The special '#' flag previously didn't do anything for characters.  Now
it signals that non-printable characters should be escaped in the output
string, either using C shortcuts or octal values.

* runtime/vsprintf.c (_stp_vsprint_char_size, _stp_vsprint_char): New
  functions to size and fill the buffer, accounting for escape chars.
  (_stp_vsnprintf): Use the new char functions.
* translate.cxx (c_unparser::emit_compiled_printfs): Ditto.
* testsuite/systemtap.printf/char2.*: Test %#c
* NEWS, stap.1: Document it.

12 years agoPR13998: pretty-print bit fields numerically
Josh Stone [Thu, 19 Apr 2012 21:11:00 +0000 (14:11 -0700)]
PR13998: pretty-print bit fields numerically

When a struct member has bit attributes, we should always pretty-print
it as a number, even if the underlying type is a character.  Since these
attributes only show up in DWARF on the member, not the type die, we
need to treat it as a special case from the struct member iteration.

* tapsets.cxx (dwarf_pretty_print::recurse_bitfield): Print the incoming
  type numerically, regardless of whether it's a char.
  (dwarf_pretty_print::recurse_struct_members): If a member has a
  bit_offset attribute, use recurse_bitfield instead of normal recurse.
* testsuite/systemtap.printf/pretty-bits.*: Test how bitfields are
  pretty-printed, both for ints and chars underneath.

12 years agoBZ814248: staplog crash/defs.h support for arm
Frank Ch. Eigler [Thu, 19 Apr 2012 13:59:43 +0000 (09:59 -0400)]
BZ814248: staplog crash/defs.h support for arm

* staplog.c: #define ARM if __arm__ to get hold of NR_CPUS in crash/defs.h.

12 years agoPR13992: let stap tolerate -d /foo/bad/path --ldd argument
Frank Ch. Eigler [Thu, 19 Apr 2012 01:48:20 +0000 (21:48 -0400)]
PR13992: let stap tolerate -d /foo/bad/path --ldd argument

* translate.cxx (add_unwindsym_ldd): Skip unresolvable path that
  results in skeleton dwflpp.  We'll get a warning later.
* testsuite/transok/eleven.stp: New test case.

12 years agosamples regen index
Frank Ch. Eigler [Wed, 18 Apr 2012 19:03:30 +0000 (15:03 -0400)]
samples regen index

12 years agoauditbt example: use sudo as sample
Frank Ch. Eigler [Wed, 18 Apr 2012 18:59:39 +0000 (14:59 -0400)]
auditbt example: use sudo as sample

12 years agoregen sample indexes
Frank Ch. Eigler [Wed, 18 Apr 2012 18:58:39 +0000 (14:58 -0400)]
regen sample indexes

12 years agonew sample: auditbt (audit backtracing)
Frank Ch. Eigler [Wed, 18 Apr 2012 18:19:44 +0000 (14:19 -0400)]
new sample: auditbt (audit backtracing)

12 years agoBZ 813323: stapusr-only users no longer able to run unsigned modules in /lib/modules...
Dave Brolley [Tue, 17 Apr 2012 19:16:47 +0000 (15:16 -0400)]
BZ 813323: stapusr-only users no longer able to run unsigned modules in /lib/modules/`uname -r`/systemtap

- Elevate the user's privilege level to stapdev when the module is loaded from
  /lib/modules/`uname -r`/systemtap.
- Suppress error messages about failure to verify the module's signature
  when a signature is not required.

12 years agodwflpp --ldd: add another ld.so alias for arm
Frank Ch. Eigler [Fri, 13 Apr 2012 16:15:16 +0000 (12:15 -0400)]
dwflpp --ldd: add another ld.so alias for arm

* dwflpp.cxx (dwflpp::iterate_over_libraries): Add another alias
  for ARM.

12 years agoSynchronize class/struct declarations
Josh Stone [Thu, 12 Apr 2012 19:59:50 +0000 (12:59 -0700)]
Synchronize class/struct declarations

We are not very consistent about choosing struct vs class types, and in
some cases we have a mismatch between declaration and definition of a
given type.  Gcc doesn't care, but clang -Wall complains:

  CXX    stap-main.o
In file included from ../main.cxx:12:
../staptree.h:489:1: error: struct 'vardecl' was previously declared
        as a class [-Werror,-Wmismatched-tags]
struct vardecl: public symboldecl
^~~~~~
class
../staptree.h:218:7: note: previous use is here
class vardecl;
      ^

In all cases, I left the definition alone, and adjusted the declaration
to match, so it should be semantically unchanged.

12 years agosdt_query: initialize probe_type/loc as unknown.
Josh Stone [Thu, 12 Apr 2012 19:51:24 +0000 (12:51 -0700)]
sdt_query: initialize probe_type/loc as unknown.

The fields, probe_type and probe_loc, are meaningless to start, and are
later set as the queried module is examined.  Commit 74fe61bc tried to
make sure that all POD types in this class are initialized, but these
two were essentially self-assigned.  Gcc misses this uninitialized use,
but clang caught it:

  CXX    stap-tapsets.o
../tapsets.cxx:6058:38: error: field is uninitialized when used here [-Werror,-Wuninitialized]
  base_query(dw, params), probe_type(probe_type), probe_loc(probe_loc), base_probe(base_probe),
                                     ^
../tapsets.cxx:6058:61: error: field is uninitialized when used here [-Werror,-Wuninitialized]
  base_query(dw, params), probe_type(probe_type), probe_loc(probe_loc), base_probe(base_probe),
                                                            ^

Values for "unknown" are now added to these enum types to initialize
with, and dealt with where needed.

12 years agostapsh: convert dbug macros to void statements
Josh Stone [Thu, 12 Apr 2012 19:46:00 +0000 (12:46 -0700)]
stapsh: convert dbug macros to void statements

This is to get around a clang warning:

   CC     stapsh-stapsh.o
 ../../../runtime/staprun/stapsh.c:241:3: error: expression result
     unused [-Werror,-Wunused-value]
   vdbug (1, format, dbug_args);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../../../runtime/staprun/stapsh.c:100:58: note: instantiated from:
 #define vdbug(level, format, args) ( (verbose < level) ? 0 : \
                                                          ^

None of the dbug/vdbug callers care about the fprintf return values,
so just squash them and move on.

12 years agodwflpp: Mark loc2c_error as noreturn
Josh Stone [Thu, 12 Apr 2012 19:35:25 +0000 (12:35 -0700)]
dwflpp: Mark loc2c_error as noreturn

Clang complains thusly:

../dwflpp.cxx:2281:15: error: no matching function for call to
      'c_translate_constant'
      *tail = c_translate_constant (pool, &loc2c_error, this,
              ^~~~~~~~~~~~~~~~~~~~
In file included from ../dwflpp.cxx:54:
../loc2c.h:46:18: note: candidate function not viable: no known
      conversion from 'void (*)(void *, const char *, ...)' to
      'void (*)(void *, const char *, ...) __attribute__((noreturn))'
      for 2nd argument
struct location *c_translate_constant (struct obstack *,
                 ^

The declaration for loc2c_error just needs the matching attribute.

12 years agocsclient: check directly for negative IPv4 pieces
Josh Stone [Thu, 12 Apr 2012 19:26:41 +0000 (12:26 -0700)]
csclient: check directly for negative IPv4 pieces

As noted by clang, the code was looking for negative values of an
unsigned variable (which was read by strtoul).

  CXX    stap-csclient.o
../csclient.cxx:2638:44: error: comparison of unsigned expression < 0
      is always false [-Werror,-Wtautological-compare]
      if (errno != 0 || *estr != '\0' || p < 0 || p > 255)
                                         ~ ^ ~

This can never be negative, but strtoul will implicitly case negative-
looking strings to unsigned, which will make them fail p > 255 anyway.
But to be more direct, switch to [signed] long and use strtol.

12 years agoPR13667: rework/simplify rough draft for netfilter.hook probes
Frank Ch. Eigler [Thu, 12 Apr 2012 20:19:36 +0000 (16:19 -0400)]
PR13667: rework/simplify rough draft for netfilter.hook probes

12 years agoPR13667 (In Progress) - Expose Netfilter Hooks
Chris Meek [Thu, 12 Apr 2012 18:46:10 +0000 (14:46 -0400)]
PR13667 (In Progress) - Expose Netfilter Hooks

Preliminary work setting up new probe points.

12 years agoFixed PR13745 by updating memory tracepoint examples.
David Smith [Thu, 12 Apr 2012 18:05:25 +0000 (13:05 -0500)]
Fixed PR13745 by updating memory tracepoint examples.

* testsuite/systemtap.examples/memory/mmanonpage.stp: Updated tracepoints
  for RHEL6 and upstream kernels.
* testsuite/systemtap.examples/memory/mmanonpage.stp: Ditto.
* testsuite/systemtap.examples/memory/mmfilepage.stp: Ditto.
* testsuite/systemtap.examples/memory/mmwriteback.stp: Ditto.
* testsuite/systemtap.examples/memory/mmanonpage.meta: Updated script
  tracepoint dependencies in 'test_support' section.
* testsuite/systemtap.examples/memory/mmfilepage.meta: Ditto.
* testsuite/systemtap.examples/memory/mmwriteback.meta: Ditto.

12 years agotest at_var_mark.exp requires uprobes
Josh Stone [Thu, 12 Apr 2012 00:25:30 +0000 (17:25 -0700)]
test at_var_mark.exp requires uprobes

12 years agoFix compile problem by changing 'stp_for_each_cpu' to 'for_each_possible_cpu'.
David Smith [Wed, 11 Apr 2012 20:01:02 +0000 (15:01 -0500)]
Fix compile problem by changing 'stp_for_each_cpu' to 'for_each_possible_cpu'.

* runtime/runtime.h: Removed stp_for_each_cpu() macro definition, since no
  longer needed (and 'cpu_possible_map' has been removed from the upstream
  kernel).
* runtime/map-stat.c: Replaced 'stp_for_each_cpu()' with
  'for_each_possible_cpu()'.
* runtime/map.c: Ditto.
* runtime/perf.c: Ditto.
* runtime/pmap-gen.c: Ditto.
* runtime/stat.c: Ditto.
* runtime/transport/procfs.c: Ditto.
* translate.cxx: Ditto.

12 years agoClarify that resource limits are imposed on stap-server requests and not on stap...
Dave Brolley [Tue, 10 Apr 2012 18:32:24 +0000 (14:32 -0400)]
Clarify that resource limits are imposed on stap-server requests and not on stap-server itself.

12 years agoDon't compile csclient.cxx and cscommon.cxx when HAVE_NSS is false.
Dave Brolley [Tue, 10 Apr 2012 18:14:24 +0000 (14:14 -0400)]
Don't compile csclient.cxx and cscommon.cxx when HAVE_NSS is false.

- Don't compile the files at all (Makefile.am)
- #if HAVE_NSS added to the files in case another distro compiles
  them anyway.
- Don't call functions in these files from elsewhere.

12 years agoruntime/autoconf: compensate for missing <linux/wait.h> in some inode-uprobes versions
Negreanu Marius [Tue, 10 Apr 2012 15:07:29 +0000 (11:07 -0400)]
runtime/autoconf: compensate for missing <linux/wait.h> in some inode-uprobes versions

12 years agoImproved nfsdtop.stp by using aggregates.
David Smith [Thu, 5 Apr 2012 19:35:08 +0000 (14:35 -0500)]
Improved nfsdtop.stp by using aggregates.

* testsuite/systemtap.examples/network/nfsdtop.stp: Use aggregates to
  optimize a bit and reduce the number of global variables.

12 years agoAdded meta file for nfsdtop.stp and regenerated example index files.
David Smith [Thu, 5 Apr 2012 19:27:51 +0000 (14:27 -0500)]
Added meta file for nfsdtop.stp and regenerated example index files.

* testsuite/systemtap.examples/network/nfsdtop.meta: New file.
* testsuite/systemtap.examples/network/nfsdtop.stp: Made executable and
  added '#! /usr/bin/env stap' line at the top.
* testsuite/systemtap.examples/index.html: Regenerated.
* testsuite/systemtap.examples/index.txt: Ditto.
* testsuite/systemtap.examples/keyword-index.html: Ditto.
* testsuite/systemtap.examples/keyword-index.txt: Ditto.

12 years agoAdded new NFS server example script.
Bryn M. Reeves [Thu, 5 Apr 2012 18:49:11 +0000 (13:49 -0500)]
Added new NFS server example script.

12 years agopf3.stp sample: and regenerate the examples index
Frank Ch. Eigler [Thu, 5 Apr 2012 18:35:02 +0000 (14:35 -0400)]
pf3.stp sample: and regenerate the examples index

Next up, one thousand commits to add then subtract
whitespace.

12 years agopf3.stp sample: fix index title
Frank Ch. Eigler [Thu, 5 Apr 2012 18:34:31 +0000 (14:34 -0400)]
pf3.stp sample: fix index title

12 years agoexamples: add pf3.stp
Frank Ch. Eigler [Thu, 5 Apr 2012 18:21:38 +0000 (14:21 -0400)]
examples: add pf3.stp

* profiling/pf3.*: New example for combined kernel/user-space
  gross function profiling.

This page took 0.064253 seconds and 5 git commands to generate.