]> sourceware.org Git - systemtap.git/log
systemtap.git
10 years agoAdd loadavg tapset
Aaron Tomlin [Tue, 26 Nov 2013 17:00:40 +0000 (17:00 +0000)]
Add loadavg tapset

Provide a tapset to obtain the load average.

Sample usage via a timer probe:

probe timer.s(1) {
printf("%s: Load average: %s",
ctime(gettimeofday_s()),
sprint_loadavg())
}

$ sudo stap ./show_loadavg.stp
Tue Nov 26 16:54:04 2013: Load average: 0.12 0.33 0.30
Tue Nov 26 16:54:05 2013: Load average: 0.11 0.33 0.30
Tue Nov 26 16:54:06 2013: Load average: 0.11 0.33 0.30
Tue Nov 26 16:54:07 2013: Load average: 0.11 0.33 0.30
Tue Nov 26 16:54:08 2013: Load average: 0.11 0.33 0.30
Tue Nov 26 16:54:09 2013: Load average: 0.11 0.33 0.30
Tue Nov 26 16:54:10 2013: Load average: 0.18 0.34 0.30
Tue Nov 26 16:54:11 2013: Load average: 0.18 0.34 0.30

Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
10 years agoexamples: Print header once in interrupts-by-dev.stp
Aaron Tomlin [Wed, 13 Nov 2013 20:26:59 +0000 (20:26 +0000)]
examples: Print header once in interrupts-by-dev.stp

Trivial change. Avoid printing the header multiple times.
For instance:

  DEVICE   NUMBER OF INTERRUPTS
        virtio0-input :      2
        virtio0-input :      1
        virtio0-input :      1
        virtio0-input :      2
     virtio3-requests :      4

Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
10 years agoPR16207 partial fix: Fix the 'pipe' [nd_]syscall.exp tests on rawhide.
David Smith [Tue, 26 Nov 2013 16:58:22 +0000 (10:58 -0600)]
PR16207 partial fix: Fix the 'pipe' [nd_]syscall.exp tests on rawhide.

* tapset/linux/syscalls.stp: Handle syscall nesting in syscall.pipe.
* tapset/linux/nd_syscalls.stp: Handle syscall nesting in
  nd_syscall.pipe.
* runtime/linux/compat_unistd.h: Add __NR_compat_pipe2.
* tapset/linux/aux_syscalls.stp (_sys_pipe2_flag_str): Handle a flags
  value of 0.
* testsuite/systemtap.syscall/pipe.c: Add a new test.

10 years agoMinor fix.
David Smith [Mon, 25 Nov 2013 22:11:33 +0000 (16:11 -0600)]
Minor fix.

10 years agoPR16207 partial fix: Fix the 'net1' [nd_]syscall.exp tests on rawhide.
David Smith [Mon, 25 Nov 2013 22:10:40 +0000 (16:10 -0600)]
PR16207 partial fix: Fix the 'net1' [nd_]syscall.exp tests on rawhide.

* tapset/linux/syscalls.stp: On rawhide, all sys_accept calls don't go
  through sys_accept4.
* tapset/linux/nd_syscalls.stp: Similar changes.

10 years agofutexes2.meta: mark UNTESTED if not supported
Jonathan Lebon [Mon, 25 Nov 2013 21:09:54 +0000 (16:09 -0500)]
futexes2.meta: mark UNTESTED if not supported

10 years agoPR16207 partial fix: Fix the 'inotify' [nd_]syscall.exp tests on rawhide.
David Smith [Mon, 25 Nov 2013 21:08:27 +0000 (15:08 -0600)]
PR16207 partial fix: Fix the 'inotify' [nd_]syscall.exp tests on rawhide.

* tapset/linux/syscalls.stp: Handle syscall nesting in syscall.inotify_init.
* tapset/linux/nd_syscalls.stp: Handle syscall nesting in
  nd_syscall.inotify_init.
* runtime/linux/compat_unistd.h: Added the __NR_compat_inotify_init1 define.

10 years agoPR16207 partial fix: Fix the 'dup' [nd_]syscall.exp tests on rawhide.
David Smith [Mon, 25 Nov 2013 20:00:51 +0000 (14:00 -0600)]
PR16207 partial fix: Fix the 'dup' [nd_]syscall.exp tests on rawhide.

* tapset/linux/syscalls.stp: Split the syscall.dup2 probe into
  syscall.dup2 and syscall.dup3.
* tapset/linux/nd_syscalls.stp: Split the nd_syscall.dup2 probe into
  nd_syscall.dup2 and nd_syscall.dup3.
* runtime/linux/compat_unistd.h: Added the __NR_compat_dup3 define.
* testsuite/buildok/syscalls-detailed.stp: Added dup3 test.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.

10 years agoPR16207 partial fix: Fix the link [nd_]syscall.exp tests on rawhide.
David Smith [Mon, 25 Nov 2013 17:03:24 +0000 (11:03 -0600)]
PR16207 partial fix: Fix the link [nd_]syscall.exp tests on rawhide.

* tapset/linux/syscalls.stp: Add @__syscall_compat_gate() macro call to
  syscall.linkat probe.
* tapset/linux/syscalls2.stp: Add @__syscall_compat_gate() macro call to
  syscall.readlinkat and syscall.symlinkat probes.
* tapset/linux/nd_syscalls.stp: Add @__syscall_compat_gate() macro call to
  nd_syscall.linkat probe.
* tapset/linux/nd_syscalls2.stp: Add @__syscall_compat_gate() macro call
  to nd_syscall.readlinkat and nd_syscall.symlinkat probes.
* runtime/linux/compat_unistd.h: Added the __NR_compat_linkat,
  __NR_compat_readlinkat, and __NR_compat_symlinkat defines.
* testsuite/systemtap.syscall/link.c: Updated testcase to handle syscall
  probes no longer being a wrapper around other syscall probes.

10 years agoelaborate.cxx: remove extra space
Jonathan Lebon [Mon, 25 Nov 2013 13:57:33 +0000 (08:57 -0500)]
elaborate.cxx: remove extra space

10 years agofix various issues coverity unearthed
Jonathan Lebon [Fri, 22 Nov 2013 22:04:03 +0000 (17:04 -0500)]
fix various issues coverity unearthed

Most of these were 'CHECKED_RETURN' type errors.

10 years agoPR16207 partial fix: Fix the chmod [nd_]syscall.exp tests on rawhide.
David Smith [Mon, 25 Nov 2013 15:30:49 +0000 (09:30 -0600)]
PR16207 partial fix: Fix the chmod [nd_]syscall.exp tests on rawhide.

* tapset/linux/syscalls.stp: Add @__syscall_compat_gate() macro call to
  syscall.fchmodat, syscall.fchmodat.return, syscall.fchownat, and
  syscall.fchownat.return probes.
* tapset/linux/syscalls.stp: Add @__syscall_compat_gate() macro call to
  nd_syscall.fchmodat, nd_syscall.fchmodat.return, nd_syscall.fchownat,
  and nd_syscall.fchownat.return probes.
* runtime/linux/compat_unistd.h: Added __NR_compat_fchmodat and
  __NR_compat_fchownat defines.
* testsuite/systemtap.syscall/chmod.c: Updated testcase to handle
  syscall probes no longer being a wrapper around other syscall probes.

10 years agoPR16207 partial fix: Fix the access [nd_]syscall.exp tests on rawhide.
David Smith [Fri, 22 Nov 2013 22:41:54 +0000 (16:41 -0600)]
PR16207 partial fix: Fix the access [nd_]syscall.exp tests on rawhide.

* tapset/linux/syscalls.stpm: Add @__syscall_compat_gate() macro.
* tapset/linux/syscalls.stp: Add @__syscall_compat_gate() macro call to
  syscall.faccessat and syscall.faccess.return.
* tapset/linux/nd_syscalls.stp: Add @__syscall_compat_gate() macro call to
  nd_syscall.faccessat and nd_syscall.faccess.return.
* testsuite/systemtap.syscall/access.c: Updated testcase to handle
  access() no longer being a wrapper around faccessat().
* runtime/linux/compat_unistd.h: New file.
* tapset/linux/aux_syscalls.stp: Include compat_unistd.h.

10 years agoPR15219 partial fix. The [nd_]syscall.timer_settime probes no longer nest.
David Smith [Fri, 22 Nov 2013 20:51:50 +0000 (14:51 -0600)]
PR15219 partial fix. The [nd_]syscall.timer_settime probes no longer nest.

* tapset/linux/syscalls2.stp: Add compat function support to
  'syscall.timer_settime' and 'syscall.timer_settime.return' probes.
* tapset/linux/nd_syscalls2.stp: Add compat function support to
  'nd_syscall.timer_settime' and 'nd_syscall.timer_settime.return'
  probes.
* tapset/linux/aux_syscalls.stp (_struct_compat_itimerspec_u): New
  function.

10 years agoAdd STAP_ERROR macro
Aaron Tomlin [Fri, 22 Nov 2013 15:03:02 +0000 (15:03 +0000)]
Add STAP_ERROR macro

Instead of CONTEXT->last_error = "foo"; goto out; in an embedded-C
function, a newly defined macro STAP_ERROR(str) should be used.
The script can catch the exception with try { } catch { }.

Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
10 years agoTighten -Wno-format-nonliteral to just where it's needed
Josh Stone [Wed, 20 Nov 2013 21:01:10 +0000 (13:01 -0800)]
Tighten -Wno-format-nonliteral to just where it's needed

We only have one function, stap_strfloctime(), which actually requires
relaxing this warning; the rest can and should be checked.  Split this
function into its own file, and give just that the relaxed option.

10 years agoFix retstr in __nd_syscall.clock_settime.return
Josh Stone [Wed, 20 Nov 2013 19:44:30 +0000 (11:44 -0800)]
Fix retstr in __nd_syscall.clock_settime.return

Probably just a copy-paste typo, but nd_syscalls can't use $return.

10 years agoparse: Let pp1_activation own the token rather than copying
Josh Stone [Wed, 20 Nov 2013 19:36:26 +0000 (11:36 -0800)]
parse: Let pp1_activation own the token rather than copying

This works around the RHEL4 compiler, which apparently doesn't see
parser::pp1_activation as a friend of token, even though parser is.
So it was failing to invoke the now-restricted copy-constructor, but
there's not really any reason for it to make a copy anyway.

10 years agoDon't check kernel "utrace" support for dyninst
Josh Stone [Wed, 20 Nov 2013 19:19:19 +0000 (11:19 -0800)]
Don't check kernel "utrace" support for dyninst

This regressed after commit d0923e365964097a2209cfc23568d5770f596bad,
which stopped reading kernel CONFIG variables at all for --dyninst.
We don't need them, but it didn't hurt much to check before.

10 years agoFix PR16187 by improving the syscall.sendfile/nd_syscall.sendfile probes.
David Smith [Mon, 18 Nov 2013 20:22:36 +0000 (14:22 -0600)]
Fix PR16187 by improving the syscall.sendfile/nd_syscall.sendfile probes.

* tapset/linux/syscalls2.stp (syscall.sendfile): Added
  'compat_sys_sendfile' and 'compat_sys_sendfile64' support.
* tapset/linux/nd_syscalls2.stp (nd_syscall.sendfile): Similar changes.

10 years agoPR16184: Fix sigmask decoding in the presence of TRACESYSGOOD
Josh Stone [Mon, 18 Nov 2013 19:20:02 +0000 (11:20 -0800)]
PR16184: Fix sigmask decoding in the presence of TRACESYSGOOD

Commit f1e0e63bb6992df4127bc7ae7ba89be478b9c250 added SIGTRAP|0x80 to
indicate PTRACE_O_TRACESYSGOOD signals.  However, _stp_sigset_str became
unpredictable, because it checks sigismember for all known signals, but
SIGTRAP|0x80 is out of the bitrange possible in a sigmask.

Now _stp_sigset_str only checks sigismember for values <= _NSIG.

10 years ago(Re)Fix PR16175 by updating mmap.c test program.
David Smith [Mon, 18 Nov 2013 19:17:13 +0000 (13:17 -0600)]
(Re)Fix PR16175 by updating mmap.c test program.

* testsuite/systemtap.syscall/mmap.c: Avoid mmap ulimit by only mmap'ing a
  maximum of 4K.

10 years agoPR16176: Fix 'nd_syscall.truncate' probe alias on ia32.
David Smith [Mon, 18 Nov 2013 15:38:28 +0000 (09:38 -0600)]
PR16176: Fix 'nd_syscall.truncate' probe alias on ia32.

* tapset/linux/nd_syscalls2.stp (__nd_syscall.truncate): Add
  'asmlinkage()' call.
  (__nd_syscall.truncate64): Ditto.

10 years agoPR10574: Fix a few pc=0 that escaped this old bug
Josh Stone [Sat, 16 Nov 2013 01:56:41 +0000 (17:56 -0800)]
PR10574: Fix a few pc=0 that escaped this old bug

We already checked for pc=0 in dwflpp::die_entrypc, but a couple places
didn't check the return value to notice COMDAT rejection.  We also need
to check this in the simpler dwflpp::function_entrypc, and both
functions are now marked warn_unused_result.

The new testsuite/semok/nullpc.stp makes sure we don't have any pc=0 in
stap itself, which is a large enough C++ binary to sometimes have these
COMDAT-eliminated null functions.

10 years agoPR15999 with symbol-table fallback, fill in empty $$parms, $$vars, etc
Lukas Berk [Fri, 15 Nov 2013 22:05:53 +0000 (17:05 -0500)]
PR15999 with symbol-table fallback, fill in empty $$parms, $$vars, etc

*tapsets.cxx - format empty symbol context, a few whitespace fixes

10 years agoFix PR16175 by upping offsets in mmap.c test program.
David Smith [Fri, 15 Nov 2013 21:54:40 +0000 (15:54 -0600)]
Fix PR16175 by upping offsets in mmap.c test program.

* testsuite/systemtap.syscall/mmap.c (main): Upped offsets to 64k, since
  ppc64 has a 64k page size.

10 years agolevenshtein: half substitution penalty if same case
Jonathan Lebon [Fri, 15 Nov 2013 20:11:46 +0000 (15:11 -0500)]
levenshtein: half substitution penalty if same case

We tweak the penalties so that if they differ only by their casing, then
the substitution penalty is halved.

Example of the effect:

Equal weights:
SYS_close --> SYSC_close, SyS_close, SYSC_clone, SyS_clone, con_close

Half penalty for diff casing
SYS_close --> SyS_close, SYSC_close, SyS_clone, sys_close, SYSC_clone

The 'SYSC' versions rank lower. But more importantly, we see 'sys_close'
become higher rank than 'con_close'.

10 years agoPR15219 partial fix. Several syscall.clock_* probes longer nest.
David Smith [Fri, 15 Nov 2013 19:52:03 +0000 (13:52 -0600)]
PR15219 partial fix. Several syscall.clock_* probes longer nest.

* tapset/linux/syscalls.stp: Add __syscall_get() macro calls to
  syscall.clock_nanosleep and syscall.clock_nanosleep.return to reject
  nested syscalls. Added compat_sys_clock_settime support to
  syscall.clock_settime and syscall.clock_settime.return.
* tapset/linux/nd_syscalls.stp: Similar changes as above.
* tapset/linux/syscalls.stpm: New file.
* tapset/linux/aux_syscalls.stp (_stp_syscall_nr): New function.

10 years agoalso suggest function aliases on unresolved dwarf probes
Jonathan Lebon [Fri, 15 Nov 2013 19:35:43 +0000 (14:35 -0500)]
also suggest function aliases on unresolved dwarf probes

This patch does two things:
1. It removes sym_seen and replaces it with inlined_funcs, which only
   picks up inlined functions.
2. suggest_dwarf_functions() now aggregates functions from both
   inlined_funcs and the module_info symtab function cache.

The net result is that (1) we're no longer storing duplicate
information, and (2) we now also suggest function aliases (which are in
the cache).

10 years agoPR16165: make token ctors private and befriend only the necessary
Jonathan Lebon [Thu, 14 Nov 2013 16:17:36 +0000 (11:17 -0500)]
PR16165: make token ctors private and befriend only the necessary

10 years agoPR16165: extend print_format::create
Jonathan Lebon [Wed, 13 Nov 2013 22:34:56 +0000 (17:34 -0500)]
PR16165: extend print_format::create

In an effort to restrict token creation, we change the
print_format::create() function to accept a string to denote the type of
print statement we want, rather than always deriving it from the token's
content. This allows us to skip the creation of tokens in a few places
that synthesize print statements.

- staptree.h: update print_format::create() declaration to accept new
  parameter and add new member print_format_type
- staptree.cxx: update print_format::create() and use print_format_type
  in print_format::print()
- elaborate.cxx: don't create token, use new parameter instead
- tapset-mark.cxx: ditto
- tapset-utrace.cxx: ditto
- tapsets.cxx: ditto

10 years agotestsuite: Support prelink even on NFS paths
Josh Stone [Thu, 14 Nov 2013 01:46:22 +0000 (17:46 -0800)]
testsuite: Support prelink even on NFS paths

We had an issue that prelink would fail trying to restore selinux
context if the file is on NFS, e.g. for someone working in NFS $HOME.
It turns out prelink see nfs_t on the source, but isn't allowed to set
nfs_t on the destination (even though it will already be nfs_t).

Now we have a [prelink] proc for test to run prelink though a mktemp
file.  The source is copied to tmp, prelinked, and copied back.

10 years agoPR16162: Support .plt probes on prelinked libraries
Josh Stone [Thu, 14 Nov 2013 01:04:19 +0000 (17:04 -0800)]
PR16162: Support .plt probes on prelinked libraries

There were a few bias issues in how plt addresses were handled, which
broke in the face of prelink offsets.  This patch tries to standardize
how these addresses are handled.

* tapsets.cxx (query_plt_statement): New function to fix plt addresses,
  both adding dwfl's elf bias and subtracting the dw bias, so it will
  work with dwflpp::relocate_address like everything else.
  (base_query::base_query): Leave session::consult_symtab alone!
  (dwarf_query::query_module_symtab): PLT doesn't fake a path through
  the symbol table anymore.
  (dwarf_query::handle_query_module): Direct PLT to query_plt_statement.
  (dwarf_query::add_probe_point): Remove the relocate exemption for plt.
* testsuite/systemtap.base/plt.exp: Update with a prelink test, and
  refactor a lot of the test on the way.

10 years agoPR16165: re-use perf_op token when expanding
Jonathan Lebon [Wed, 13 Nov 2013 18:20:00 +0000 (13:20 -0500)]
PR16165: re-use perf_op token when expanding

10 years agoPR16166: assign token to new block
Jonathan Lebon [Wed, 13 Nov 2013 17:29:49 +0000 (12:29 -0500)]
PR16166: assign token to new block

10 years agoDefine EM_AARCH64 if elf.h doesn't.
Mark Wielaard [Wed, 13 Nov 2013 15:59:53 +0000 (16:59 +0100)]
Define EM_AARCH64 if elf.h doesn't.

10 years agostapdyn: warn on !isInstrumentable functions
Josh Stone [Wed, 13 Nov 2013 02:20:44 +0000 (18:20 -0800)]
stapdyn: warn on !isInstrumentable functions

The most common reason I've found that Dyninst won't allow us to
instrument a function is an indirect jump.  This prevents them from
creating a control-flow graph, so they conservatively refuse.

Explicit indirect jumps are rare, like in the internals of longjmp, but
they may also occur for switches that are implemented with a jump table,
or tail calls to a vtable function, for instance.

10 years agoMerge branch 'jlebon/mismatch' (PR16097)
Jonathan Lebon [Tue, 12 Nov 2013 21:02:16 +0000 (16:02 -0500)]
Merge branch 'jlebon/mismatch' (PR16097)

10 years agoupdate NEWS
Jonathan Lebon [Tue, 12 Nov 2013 20:40:05 +0000 (15:40 -0500)]
update NEWS

10 years agoperf.exp: adapt for new error msg
Jonathan Lebon [Tue, 12 Nov 2013 19:20:49 +0000 (14:20 -0500)]
perf.exp: adapt for new error msg

10 years agoadd mismatch_complexity
Jonathan Lebon [Mon, 11 Nov 2013 17:19:35 +0000 (12:19 -0500)]
add mismatch_complexity

The mismatch_complexity variable allows us to only print out the most
complex kind of mismatch, and skip over simpler mismatches, in order to
keep the mismatch reporting as simple to understand as possible.

When assert_resolvability is false, mismatch_complexity simply remembers
the most complex mismatch we've met so far during each pass (e.g.
unresolved() is 0, mismatch(e) is 1, mismatch(tok, t1, t2) is 2, and
mismatch(tok, t, decl, index) is 3).

Once we turn on assert_resolvability, we check mismatch_complexity in
mismatch() and unresolved() to determine whether to print out an error
or not. If mismatch_complexity is higher than our own complexity, then
we don't print anything since we know that there is a better-suited
mismatch coming up.

10 years agoimplement resolved() and mismatch() and use them
Jonathan Lebon [Mon, 11 Nov 2013 17:05:42 +0000 (12:05 -0500)]
implement resolved() and mismatch() and use them

We finally complete the new function bodies. In resolved(), we add items
to the resolved_types vector, while in mismatch(), we retrieve from the
vector to print out exactly where the decl type was initially resolved.

10 years agonew resolved_type struct and mismatch/resolved functions
Jonathan Lebon [Mon, 11 Nov 2013 16:34:39 +0000 (11:34 -0500)]
new resolved_type struct and mismatch/resolved functions

The resolved_type struct holds all the information about a newly
resolved decl. The token 'tok' holds where the resolution occurred, and
'index' is the position of the function-argument/array-index of the
decl.

The vector resolved_types will hold all the decls we resolve. A new
resolved() function is introduced which will add elements to the vector,
while an analogous mismatch() function will be used to report mismatches
between type and resolved decl.

10 years agoremove resolved_toks and printed_toks
Jonathan Lebon [Mon, 11 Nov 2013 16:20:29 +0000 (11:20 -0500)]
remove resolved_toks and printed_toks

This patch reverts commit d5f0c423 (which introduced the "type was first
inferred here" message) in anticipation for a replacement.

10 years agoMakefile.am: give warning if %_topdir is not writeable
Jonathan Lebon [Tue, 12 Nov 2013 16:29:53 +0000 (11:29 -0500)]
Makefile.am: give warning if %_topdir is not writeable

10 years agoAdd tapset/arm64/aux_syscalls.stp
William Cohen [Mon, 11 Nov 2013 19:20:35 +0000 (14:20 -0500)]
Add tapset/arm64/aux_syscalls.stp

The AArch64 processor needs to have _arch_ptrace_argstr() function
defined so anything using the syscall.ptrace probe will function.

10 years agoAdd basic register access support for arm64
William Cohen [Mon, 11 Nov 2013 18:42:54 +0000 (13:42 -0500)]
Add basic register access support for arm64

The no dwarf syscalls tapset needs some code to access the syscall
parameters.  This is a first pass to add the support for the ARM64
architecture.

10 years agoFixed a typo introduced in commit 7acb3e34.
Miroslav Franc [Mon, 11 Nov 2013 14:55:24 +0000 (08:55 -0600)]
Fixed a typo introduced in commit 7acb3e34.

* runtime/linux/uprobes-common.c (stap_uprobe_change_plus): The outer if
  statement use curly braces to create a block, however the ending
  curly brace ended up outside macro conditional.

10 years agodon't require .config and Module.symvers for dyninst runtime
Adrian Negreanu [Fri, 8 Nov 2013 13:24:08 +0000 (15:24 +0200)]
don't require .config and Module.symvers for dyninst runtime

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
10 years agoRevert commit 65ddca0 since s390x can get get syscall arguments 7+.
David Smith [Fri, 8 Nov 2013 17:01:20 +0000 (11:01 -0600)]
Revert commit 65ddca0 since s390x can get get syscall arguments 7+.

* tapset/linux/nd_syscalls2.stp (nd_syscall.pselect7): Since the fix for
  PR15913, s390x systems can get arguments 7 (and following) off the
  stack. Revert commit 65ddca0 which hardcoded argument 7 to -1.
  (nd_syscall.compat_pselect7): Ditto.

10 years agostap.1: remove 'experimental' designation from regex/macro blurbs
Frank Ch. Eigler [Fri, 8 Nov 2013 15:37:02 +0000 (10:37 -0500)]
stap.1: remove 'experimental' designation from regex/macro blurbs

10 years agostapdyn: Tighten BPatch insertion sets
Josh Stone [Thu, 7 Nov 2013 23:30:42 +0000 (15:30 -0800)]
stapdyn: Tighten BPatch insertion sets

We were doing insertion sets in instrument_object_dynprobes(),
regardless of whether there was even a target match.  This sometimes
triggers bad corner cases in Dyninst when the finalize tries to go do
things in a nascent process, with no action actually needed.  While this
gets investigated in Dyninst, we can narrow down our insertion sets to
instrument_dynprobe_target(), where at least we know it's a match.

10 years agosystemtap.spec: specify /usr for udev rules on UsrMove systems
Jonathan Lebon [Thu, 7 Nov 2013 15:42:21 +0000 (10:42 -0500)]
systemtap.spec: specify /usr for udev rules on UsrMove systems

Hopefully rpmdiff will like that better.

10 years agoAdd basic print_regs() support for aarch64
William Cohen [Wed, 6 Nov 2013 12:29:08 +0000 (07:29 -0500)]
Add basic print_regs() support for aarch64

Signed-off-by: William Cohen <wcohen@redhat.com>
10 years agoAdd basic aarch64 support for kprobes
William Cohen [Sun, 27 Oct 2013 19:03:18 +0000 (15:03 -0400)]
Add basic aarch64 support for kprobes

Signed-off-by: William Cohen <wcohen@redhat.com>
10 years agoPR16132: staprun: fix a comment to not remove a not double not negative. not.
Frank Ch. Eigler [Thu, 7 Nov 2013 01:45:57 +0000 (20:45 -0500)]
PR16132: staprun: fix a comment to not remove a not double not negative.  not.

10 years agoPR16132: staprun: fix fallback for openat/open modes for debugfs trace%d
Frank Ch. Eigler [Wed, 6 Nov 2013 23:24:51 +0000 (18:24 -0500)]
PR16132: staprun: fix fallback for openat/open modes for debugfs trace%d

Previous code got confused as to how many trace%d files to open and
where.  Now we openat() only from the incoming staprun/stapio -F fd
directory, or open() right from /sys/kernel/debug/systemtap/..., with
no hanky panky between them.

10 years agoNEWS: add timestamp of 2.4 release
Frank Ch. Eigler [Wed, 6 Nov 2013 17:17:12 +0000 (12:17 -0500)]
NEWS: add timestamp of 2.4 release

10 years agoversion bump and autoreconf
Jonathan Lebon [Wed, 6 Nov 2013 17:11:25 +0000 (12:11 -0500)]
version bump and autoreconf

10 years agopre-release version bump release-2.4
Frank Ch. Eigler [Wed, 6 Nov 2013 16:33:23 +0000 (11:33 -0500)]
pre-release version bump

10 years agoPR16129: add task_work handling for utrace_death events
David Smith [Wed, 6 Nov 2013 16:18:04 +0000 (11:18 -0500)]
PR16129: add task_work handling for utrace_death events

* runtime/stp_utrace.c (utrace_report_work): New task_work callback
  for handling utrace_report_death events.
  (utrace_cleanup, utrace_task_alloc, utrace_free): Manage its cleanup.

10 years agoNEWS re. stap-server ssl: mention changes
Frank Ch. Eigler [Wed, 6 Nov 2013 15:31:44 +0000 (10:31 -0500)]
NEWS re. stap-server ssl: mention changes

10 years agostap-server ssl: enable all cipher suites manually
Frank Ch. Eigler [Wed, 6 Nov 2013 14:52:25 +0000 (09:52 -0500)]
stap-server ssl: enable all cipher suites manually

On some versions of NSS, NSS_SetDomesticPolicy doesn't work right,
so let's use lower-level functions with the appropriate (zero)
level of return-code checking.

10 years agostap-server ssl: enable all cipher suites
Frank Ch. Eigler [Wed, 6 Nov 2013 13:34:22 +0000 (08:34 -0500)]
stap-server ssl: enable all cipher suites

The "export" set of cipher suites is too limited and going away.

10 years agotapset: Decode SIGTRAP|0x80 from PTRACE_O_TRACESYSGOOD
Josh Stone [Wed, 6 Nov 2013 01:24:52 +0000 (17:24 -0800)]
tapset: Decode SIGTRAP|0x80 from PTRACE_O_TRACESYSGOOD

10 years agoCONFIG_UIDGID_STRICT_TYPE_CHECKS workaround, cont'd
Frank Ch. Eigler [Tue, 5 Nov 2013 21:07:54 +0000 (16:07 -0500)]
CONFIG_UIDGID_STRICT_TYPE_CHECKS workaround, cont'd

The stap runtime doesn't play that well with k[gu]id_t and namespaces.
$SUBJECT kconfig option highlights the extent to which we use [ug]id_t.
An earlier commit 857163157b8 papered over the problem to some extent;
the present commit adds anothet coat of slop to cover the cracks.

10 years agotestsuite: disable color_parsing staprun tests unless instaltest_p
Frank Ch. Eigler [Tue, 5 Nov 2013 16:29:18 +0000 (11:29 -0500)]
testsuite: disable color_parsing staprun tests unless instaltest_p

10 years agotestsuite: disable sdt_asm.exp unless installtest_p
Frank Ch. Eigler [Tue, 5 Nov 2013 16:26:42 +0000 (11:26 -0500)]
testsuite: disable sdt_asm.exp unless installtest_p

10 years agoFix typo in man/error::7stap
Masanari Iida [Tue, 5 Nov 2013 15:21:32 +0000 (00:21 +0900)]
Fix typo in man/error::7stap

Correct spelling typo in man/error::7stap

10 years agorevert previous commit and strengthen inode_uprobes_p instead
Jonathan Lebon [Tue, 5 Nov 2013 17:29:25 +0000 (12:29 -0500)]
revert previous commit and strengthen inode_uprobes_p instead

10 years agodon't test uprobes_filtering.exp on RHEL5/6
Jonathan Lebon [Tue, 5 Nov 2013 16:16:16 +0000 (11:16 -0500)]
don't test uprobes_filtering.exp on RHEL5/6

We don't want to run this test on RHEL5/6, where we compile our own
uprobes module (there's no filtering possible anyway, since these
kernels don't support UPROBE_HANDLER_REMOVE).

10 years agoupdate user_string_n_quoted.exp test case
Jonathan Lebon [Tue, 5 Nov 2013 15:17:12 +0000 (10:17 -0500)]
update user_string_n_quoted.exp test case

With commit 7bec2c2, the default behaviour of user_string_n_quoted() has
changed. The test case is now updated to test that
user_string_n_quoted() trims strings according to input length and that
user_string_n2_quoted() trims strings according to output length given
the inverse parameters.

10 years agoauthors bump
Frank Ch. Eigler [Mon, 4 Nov 2013 19:01:40 +0000 (14:01 -0500)]
authors bump

10 years agoFix BZ1020853 by fixing procfs probe compile problems on newer kernels.
David Smith [Mon, 4 Nov 2013 17:18:39 +0000 (11:18 -0600)]
Fix BZ1020853 by fixing procfs probe compile problems on newer kernels.

* runtime/procfs.c (_stp_mkdir_proc_module): Support kern_path(), along
  with vfs_path_lookup().
* buildrun.cxx (compile_pass): Added 'exportconf' for kern_path().

10 years agoMerge branch 'jlebon/levensh'
Jonathan Lebon [Fri, 1 Nov 2013 22:11:11 +0000 (18:11 -0400)]
Merge branch 'jlebon/levensh'

10 years agoNEWS: mention improved suggestions
Jonathan Lebon [Fri, 1 Nov 2013 22:09:55 +0000 (18:09 -0400)]
NEWS: mention improved suggestions

10 years agoimprove levenshtein performance
Jonathan Lebon [Fri, 1 Nov 2013 18:57:40 +0000 (14:57 -0400)]
improve levenshtein performance

Doing this simple bypass has drastic performance consequences. E.g. when
matching against small-ish strings, we see ~10 time speed improvements,
while with larger strings we see slightly more than twice the speed.

See comments for explanation

10 years agofix off-by-one error in levenshtein
Jonathan Lebon [Fri, 1 Nov 2013 18:54:22 +0000 (14:54 -0400)]
fix off-by-one error in levenshtein

Well, this is embarrassing... I swear I tested it back then! This should
greatly improve accuracy for especially shorter strings.

10 years agoclarify msg for unresolved global in foreach loop
Jonathan Lebon [Fri, 1 Nov 2013 17:07:28 +0000 (13:07 -0400)]
clarify msg for unresolved global in foreach loop

Instead of printing the foreach token when the global array is
unresolved, print the array token.

10 years agolevensh suggest unresolved script functions
Jonathan Lebon [Fri, 1 Nov 2013 15:36:05 +0000 (11:36 -0400)]
levensh suggest unresolved script functions

probe begin { user_string_m() }
              ^ suggests user_string_n, user_string, user_string2, ...

10 years agoimprove function arity mismatch error msg
Jonathan Lebon [Fri, 1 Nov 2013 15:19:55 +0000 (11:19 -0400)]
improve function arity mismatch error msg

The symbolic semantic_pass now prints a clearer error when a function
matches by name, but not by arity. Previously, there was no distinction
between referencing a non-existent function and one that exists but does
not match arity.

Upon arity mismatch, we print both where the function call occurred, and
where the function was defined.

10 years agosuggest trace alternatives on mismatch
Jonathan Lebon [Fri, 1 Nov 2013 13:39:24 +0000 (09:39 -0400)]
suggest trace alternatives on mismatch

probe kernel.trace("sched_switchz") -> suggests sched_switch

10 years agosuggest PLT alternatives on mismatch
Jonathan Lebon [Fri, 1 Nov 2013 13:29:38 +0000 (09:29 -0400)]
suggest PLT alternatives on mismatch

probe process("ls").plt("getent") --> suggests getenv

10 years agoremove suggest_functions from dwarf_builder class
Jonathan Lebon [Fri, 1 Nov 2013 13:27:50 +0000 (09:27 -0400)]
remove suggest_functions from dwarf_builder class

And rename it to suggest_dwarf_functions. This will allow us to use it
from other builders, as we will see in an upcoming patch.

10 years agoadd plt_funcs to module_info
Jonathan Lebon [Fri, 1 Nov 2013 13:24:21 +0000 (09:24 -0400)]
add plt_funcs to module_info

PLT functions seen in a module are added to its module_info so that we
can provide suggestions in an upcoming patch.

10 years agomove visited_modules from dwarf_query to base_query
Jonathan Lebon [Fri, 1 Nov 2013 13:21:49 +0000 (09:21 -0400)]
move visited_modules from dwarf_query to base_query

The visited_modules set is now part of base_query. This helps us
centralize the place where modules are added to the set (in
query_module) and will be needed for implementing suggestions for
non-dwarf-related probes.

10 years agolevensh suggest unresolved struct member
Jonathan Lebon [Thu, 31 Oct 2013 21:55:10 +0000 (17:55 -0400)]
levensh suggest unresolved struct member

List alternatives in Levenshtein score order.

probe process("ls").function("print_file_name_and_frills") {
   println($f->linknode)
}              ^ suggests linkmode, linkname, linkok

10 years agolevensh suggest unresolved dwarf locals
Jonathan Lebon [Thu, 31 Oct 2013 21:34:34 +0000 (17:34 -0400)]
levensh suggest unresolved dwarf locals

List alternatives in Levenshtein score order.

probe process("ls").function("main") {
   println($argd)
}          ^ suggests argc, argv

10 years agolevensh suggest tracepoint variables
Jonathan Lebon [Thu, 31 Oct 2013 21:18:53 +0000 (17:18 -0400)]
levensh suggest tracepoint variables

List alternatives in Levenshtein score order.

probe kernel.trace("sched_switch") {
   println($nexts)
}          ^ suggests $next

10 years agolevensh suggest never-assigned vars
Jonathan Lebon [Thu, 31 Oct 2013 21:09:43 +0000 (17:09 -0400)]
levensh suggest never-assigned vars

List alternatives in Levenshtein score order.

Never-assigned local vars in probes:

probe begin { var = 1; println(vor) }
                               ^ suggests var

Never-assigned local vars in functions:

function func() { var = 1; println(vor) } \
   probe begin { func() }          ^ suggests var

Never-assigned global vars:

global bla, blo \
   probe begin { blo = 1; println(bla) }
       ^ suggests blo

10 years agolevensh suggest unresolved probe points
Jonathan Lebon [Thu, 31 Oct 2013 19:38:29 +0000 (15:38 -0400)]
levensh suggest unresolved probe points

This patch adds Levenshtein suggestion to match_node::find_and_build().
Suggestions are made in three cases:
   - Unresolved double-glob (e.g. syscall.poen**)
   - Unresolved glob (e.g. syscall.poen*)
   - Unresolved no-glob (e.g. kernel.functoin("bla"))

Note that suggestions for globby functors are based on the prefix part
only (part of functor prior to the **) to increase meaningfulness.

Example outputs:

syscall.poen --> similar: open, chown, fork, iopl, mount
kernel.functoin --> similar: function, data, trace, mark, statement

syscall.poen** --> similar: open, chown, fork, iopl, mount
syscall.poen* --> similar: open, chown, fork, iopl, mount
syscall.*poen --> similar: open, chown, ppoll, capget, capset
syscall.**poen --> similar: open, capget, capset, chown, fchown

Non-globby functors in general give good results. Globby stuff can be
troublesome:

sys**poen --> similar: nfs, vfs, _nfs, _vfs, end

10 years agorefactor levenshtein suggesting
Jonathan Lebon [Thu, 31 Oct 2013 17:45:58 +0000 (13:45 -0400)]
refactor levenshtein suggesting

In anticipation for a wider use of levenshtein(), we factor out the
common part into a new function levenshtein_suggest(). We then change
suggest_functions() to use levenshtein_suggest().

10 years agoRemoved unused code in tapset-method.cxx
Lukas Berk [Fri, 1 Nov 2013 19:27:46 +0000 (15:27 -0400)]
Removed unused code in tapset-method.cxx

*tapset-method.cxx - remove the unused bmoption_escape function

10 years agoFlip user_string_n_quoted to limit the input count
Josh Stone [Thu, 31 Oct 2013 22:03:34 +0000 (15:03 -0700)]
Flip user_string_n_quoted to limit the input count

The documentation of that function implies that it's counting n from the
input string, but in fact that limit was being applied to the output,
including quotes and escaping.

Now _stp_text_str takes two length parameters to limit the input count
and output size separately.  A new user_string_n2_quoted() lets you
specify both of these lengths, and user_string_n_quoted now uses that to
limit input length, or output still in compatibility mode.

Several syscall tapsets which read user buffers of known length will now
use user_string_n2_quoted to fit that.  This was seen in syscall.write
which may not necessarily have any '\0' at the end of its buffer.

10 years agoFix typo in man/stap.1
Masanari Iida [Wed, 30 Oct 2013 02:34:59 +0000 (11:34 +0900)]
Fix typo in man/stap.1

Correct spelling typo in man/stap.1

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
10 years agodebuginfo man pages: mention elfutils & compressed-debuginfo
Frank Ch. Eigler [Thu, 31 Oct 2013 14:40:35 +0000 (10:40 -0400)]
debuginfo man pages: mention elfutils & compressed-debuginfo

10 years agolast_100_frees example: make it even more lockless
Frank Ch. Eigler [Wed, 30 Oct 2013 20:39:24 +0000 (16:39 -0400)]
last_100_frees example: make it even more lockless

jistone advised that a global var++ was a source of
contention.  So, use a timestamp instead to order
the operations.

10 years agoNEWS: mention duplicate error elimination
Jonathan Lebon [Wed, 30 Oct 2013 20:13:32 +0000 (16:13 -0400)]
NEWS: mention duplicate error elimination

10 years agolast_100_frees example: run lock-free
Frank Ch. Eigler [Wed, 30 Oct 2013 20:12:44 +0000 (16:12 -0400)]
last_100_frees example: run lock-free

Switch to using an aggregate array (using a counter as the <<< operand
and @max+ at the reader-sorting side).

10 years agoPR16058 style fixups for other nd_syscalls aliases
Frank Ch. Eigler [Wed, 30 Oct 2013 16:10:43 +0000 (12:10 -0400)]
PR16058 style fixups for other nd_syscalls aliases

Specifically, nd_syscall.rt_sigtimedwait and .truncate used the same
erroneous

   probe alias = foo1, foo2 { }
   probe foo1 = kprobe.function("foo") ? { }
   probe foo2 = kprobe.function("foo") ? { }

construct, whereas the optionality should appear at the top-level alias
level.

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