]> sourceware.org Git - systemtap.git/log
systemtap.git
7 years agoBZ1431263: Fix hardware breakpoint probe handler return types.
David Smith [Tue, 21 Mar 2017 20:49:11 +0000 (15:49 -0500)]
BZ1431263: Fix hardware breakpoint probe handler return types.

* tapsets.cxx (hwbkpt_derived_probe_group::emit_module_decls): Fix
  hardware breakpoint probe handler return type - changed from 'int' to
  'void' to match the kernel.
  (hwbkpt_derived_probe_group::emit_module_init): Ditto.

7 years agoPR21255: Fix missing __set_task_state() definition.
David Smith [Fri, 17 Mar 2017 15:44:12 +0000 (10:44 -0500)]
PR21255: Fix missing __set_task_state() definition.

* runtime/stp_utrace.c: Fix missing __set_task_state() definition. If we
  can't find a __set_task_state() definition, define our own.

7 years agoPR21255: Fix missing get_task_mm() declaration.
David Smith [Fri, 17 Mar 2017 14:36:42 +0000 (09:36 -0500)]
PR21255: Fix missing get_task_mm() declaration.

* buildrun.cxx (compile_pass): Add <linux/sched/mm.h> autoconf test. This
  was caused by the following kernel commit:

    commit 6e84f31522f931027bf695752087ece278c10d3f
    Author: Ingo Molnar <mingo@kernel.org>
    Date:   Wed Feb 8 18:51:29 2017 +0100

        sched/headers: Prepare for new header dependencies before moving
        code to <linux/sched/mm.h>
* runtime/linux/access_process_vm.h: Include <linux/sched.h> and, if it
  exists, <linux/sched/mm.h>.
* runtime/linux/autoconf-sched-mm.c: New file.

7 years agoFix BZ1425568 by updating task_dentry_path() to handle chroot().
David Smith [Fri, 10 Mar 2017 16:15:48 +0000 (10:15 -0600)]
Fix BZ1425568 by updating task_dentry_path() to handle chroot().

* tapset/linux/dentry.stp (task_dentry_path): Fix task_dentry_path when
  called on a target executable that has run chroot().
* testsuite/systemtap.base/task_dentry_path.exp: Add test for chroot'ed
  executable.
* testsuite/systemtap.base/task_dentry_path3.stp: New test.

7 years agoAdd PR19021 test case to task_dentry_path.exp.
David Smith [Thu, 9 Mar 2017 17:11:49 +0000 (11:11 -0600)]
Add PR19021 test case to task_dentry_path.exp.

7 years agoFor custom built upstream kernels on Debian, fix version detection
Ritesh Raj Sarraf [Thu, 2 Mar 2017 18:21:05 +0000 (23:51 +0530)]
For custom built upstream kernels on Debian, fix version detection

Debian Bug: 856461

rrs@learner:~$ stap-prep
dpkg: warning: version '(gcc' has bad syntax: version number does not start with digit
Package linux-image-4.10.1+ version 4.10.1+-20 does not match version of currently running kernel: (gcc
 Consider apt-get upgrade && reboot
dpkg: warning: version '(gcc' has bad syntax: version number does not start with digit
Package linux-headers-4.10.1+ version 4.10.1+-20 does not match version of currently running kernel: (gcc
 Consider apt-get upgrade && reboot
You need package linux-image-4.10.1+-dbgsym but it does not seem to be available
 Debian -dbgsym packages are typically in a separate repository
 Follow https://wiki.debian.org/AutomaticDebugPackages to add this repository
2017-03-02 / 23:32:37 ♒♒♒  ☺

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
7 years agoSet correct updated message for Debian
Ritesh Raj Sarraf [Thu, 2 Mar 2017 18:21:04 +0000 (23:51 +0530)]
Set correct updated message for Debian

Debian now provides debug symbol packages for all its packages,
including for the Linux kernel.
There is a separate repository for debug symbol packages.

This patch updates those details.
Thanks to Jack Henschel for reporting the bug and the fix

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
7 years agoImprove syscall test case results on newer powerpc kernels.
David Smith [Mon, 6 Mar 2017 22:31:12 +0000 (16:31 -0600)]
Improve syscall test case results on newer powerpc kernels.

* testsuite/systemtap.syscall/getrandom.c: Improved.
* testsuite/systemtap.syscall/kexec_load.c: Add support for
  kexec_file_load() to be unimplemented.
* testsuite/systemtap.syscall/tapset/syscall.stp: Mark kexec_file_load()
  as unimplemented on powerpc.

7 years agoRegenerated tapset/linux/ARCH/syscall_num.stp files.
David Smith [Mon, 6 Mar 2017 22:25:06 +0000 (16:25 -0600)]
Regenerated tapset/linux/ARCH/syscall_num.stp files.

* scripts/dump-syscalls.sh: Added comment about how to obtain strace
  source.
* tapset/linux/arm/syscall_num.stp: Regenerated from the v4.16-27-gdb316ec
  version of strace.
* tapset/linux/arm64/syscall_num.stp: Ditto.
* tapset/linux/i386/syscall_num.stp: Ditto.
* tapset/linux/mips/syscall_num.stp: Ditto.
* tapset/linux/powerpc/syscall_num.stp: Ditto.
* tapset/linux/x86_64/syscall_num.stp: Ditto.

7 years agoFix s390x-specific syscall tests.
David Smith [Thu, 2 Mar 2017 21:25:17 +0000 (15:25 -0600)]
Fix s390x-specific syscall tests.

* testsuite/buildok/syscalls-arch-detailed.stp: Made s390x probe tests
  optional, since the underlying probes don't exist on the 4.10 kernel.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Ditto.

7 years agoFix s390x compile error in runtime/stack-s390.c.
David Smith [Thu, 2 Mar 2017 21:23:28 +0000 (15:23 -0600)]
Fix s390x compile error in runtime/stack-s390.c.

* runtime/stack-s390.c (__stp_stack_print): Update code to let it compile
  on the 4.10 kernel. Kernel commit d5c352c moved 'thread_info' into
  task_struct.

7 years agoPR20600: Don't use 'time' uninitialized in __stp_time_local_update().
David Smith [Thu, 2 Mar 2017 19:11:35 +0000 (13:11 -0600)]
PR20600: Don't use 'time' uninitialized in __stp_time_local_update().

* runtime/time.c (__stp_time_local_update): Make sure to initialize 'time'
  before use.

7 years agoUpdate lookup_bad_addr() for platforms where user_addr_max() doesn't exist.
David Smith [Thu, 2 Mar 2017 17:14:47 +0000 (11:14 -0600)]
Update lookup_bad_addr() for platforms where user_addr_max() doesn't exist.

* runtime/linux/addr-map.c (lookup_bad_addr): Handle platforms (like
  s390x) where in_task() exists, but user_addr_max() doesn't.

7 years agoFix PR20600 by updating __stp_time_local_update().
David Smith [Tue, 28 Feb 2017 16:12:06 +0000 (10:12 -0600)]
Fix PR20600 by updating __stp_time_local_update().

* runtime/time.c (__stp_time_local_update): Fix PR20600 by changing the
  way we disable/reenable interrupts.

7 years agodummy commit to test git fsckObjects
Frank Ch. Eigler [Fri, 24 Feb 2017 17:56:54 +0000 (12:56 -0500)]
dummy commit to test git fsckObjects

7 years agoUpdate the vfs.stp tapset for newer kernels.
David Smith [Wed, 22 Feb 2017 16:04:00 +0000 (10:04 -0600)]
Update the vfs.stp tapset for newer kernels.

* tapset/linux/vfs.stp: Since the __block_write_begin() function can be
  inlined on newer kernels, we'll also probe
  __block_write_begin_int(). Also, check to see if '$file' is defined
  before using it in _vfs.block_write_begin.return.

7 years agosamples: add cve-2017-6074 security band-aid
Frank Ch. Eigler [Wed, 22 Feb 2017 14:53:50 +0000 (09:53 -0500)]
samples: add cve-2017-6074 security band-aid

7 years agoPR21190: Only build with --enable-sqlite on fedora17+ and rhel7+.
Martin Cermak [Tue, 21 Feb 2017 14:42:25 +0000 (15:42 +0100)]
PR21190: Only build with --enable-sqlite on fedora17+ and rhel7+.

Build with --enable-sqlite on systems having at least sqlite-3.7.

7 years agoAutoreconf after version update (3.1 -> 3.2).
Martin Cermak [Mon, 20 Feb 2017 15:43:24 +0000 (16:43 +0100)]
Autoreconf after version update (3.1 -> 3.2).

This fixes the `make rpm` target, so that it works out of the box.

7 years agoBegin next release cycle
Cody Santing [Fri, 17 Feb 2017 18:49:19 +0000 (13:49 -0500)]
Begin next release cycle

* NEWS: Add section for version 3.2
* configure.ac: Bump version to 3.2
* doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml: same
* systemtap.spec: same
* testsuite/configure.ac: same

7 years agosystemtap.spec: changelog date for release release-3.1
Frank Ch. Eigler [Fri, 17 Feb 2017 17:37:01 +0000 (12:37 -0500)]
systemtap.spec: changelog date for release

7 years agoNEWS: release date set
Frank Ch. Eigler [Fri, 17 Feb 2017 17:34:38 +0000 (12:34 -0500)]
NEWS: release date set

7 years agoPrerelease updates
Cody Santing [Fri, 17 Feb 2017 17:04:27 +0000 (12:04 -0500)]
Prerelease updates

* .../SystemTap_Beginners_Guide: Update docs using ./scripts/update-docs
* .../syscalls.3stap: same
* .../syscalls.xmlpart: same
* session.cxx: Update copyright year
* stapdyn/stapdyn.cxx: same
* staprun/common.c: same

7 years agoUpdate AUTHORS
Cody Santing [Fri, 17 Feb 2017 15:49:45 +0000 (10:49 -0500)]
Update AUTHORS

7 years agoi18n: update-po autoreconfig
Frank Ch. Eigler [Fri, 17 Feb 2017 15:25:36 +0000 (10:25 -0500)]
i18n: update-po autoreconfig

7 years agoREADME: mention c++11 here too
Frank Ch. Eigler [Fri, 17 Feb 2017 15:22:17 +0000 (10:22 -0500)]
README: mention c++11 here too

7 years agoNEWS: mention c++11
Frank Ch. Eigler [Fri, 17 Feb 2017 15:18:00 +0000 (10:18 -0500)]
NEWS: mention c++11

7 years agoPR20236 cont'd: runtime: preempt_disable* around strncpy_from_user()
Frank Ch. Eigler [Fri, 17 Feb 2017 15:12:30 +0000 (10:12 -0500)]
PR20236 cont'd: runtime: preempt_disable* around strncpy_from_user()

After commit 906d6fe632cc9, we delegate to normal kernel routines for
some more userspace-kernelspace copying jobs.  On some old kernels, on
some architectures, these functions make more assumptions about
atomicity than other stap runtime was guaranteeing.  Out of abundance
of caution (and positive test results on conversions.exp), we add a
manual (redundant?) preempt_disable/enable wrap around this call.

7 years agoAdded a small kludge to systemtap.context/symfile.tcl.
David Smith [Thu, 16 Feb 2017 18:23:09 +0000 (12:23 -0600)]
Added a small kludge to systemtap.context/symfile.tcl.

7 years agoFix python tapset errors.
David Smith [Wed, 15 Feb 2017 22:05:41 +0000 (16:05 -0600)]
Fix python tapset errors.

* tapset/python2.stp (python2_get_var_obj): Fix the returned value of the
  2nd function variant.
* tapset/python3.stp (python3_get_var_obj): Ditto.

7 years agoip tapset: separate @cast alternative headers
Frank Ch. Eigler [Wed, 15 Feb 2017 19:20:37 +0000 (14:20 -0500)]
ip tapset: separate @cast alternative headers

The @cast(x,y,"<A><B>") construct is not an alternation facility
between headers A and B.  It's a conjunction.  If a structure is
declared either in A or B, separate @cast()s are required.  Adapt to
this corrected understanding for three iphdr disassembly functions.

7 years agoUpdate python 3 module list in tapset/python3.stp.
David Smith [Tue, 14 Feb 2017 22:47:41 +0000 (16:47 -0600)]
Update python 3 module list in tapset/python3.stp.

7 years agoUpdated testsuite/buildok/dentry-embedded.stp.
David Smith [Tue, 14 Feb 2017 22:45:39 +0000 (16:45 -0600)]
Updated testsuite/buildok/dentry-embedded.stp.

* testsuite/buildok/dentry-embedded.stp: Added missing functions and
  reorganized to match tapset function order.

7 years agoBetter PR21102 fix: Smarter ioblock.stp tapset update for newer kernels.
David Smith [Tue, 14 Feb 2017 22:44:01 +0000 (16:44 -0600)]
Better PR21102 fix: Smarter ioblock.stp tapset update for newer kernels.

* tapset/linux/ioblock.stp: Updated copyright dates. Better fix for
  PR21102 by handling 4.9 kernels properly. Added a new 'opf' field to the
  ioblock probes.
  (bio_op): New function.
* testsuite/buildok/ioblock-embedded.stp: Added bio_op() test.

7 years agosymbol resolution: tweak levenshtein suggestions for private symbols
Frank Ch. Eigler [Tue, 14 Feb 2017 19:57:01 +0000 (14:57 -0500)]
symbol resolution: tweak levenshtein suggestions for private symbols

Attempted or typo'd access to a private function or variable properly
fail, but the levensthein suggestions should not include the
not-visible private symbols in the tapset.  This patch excludes the
private ones from suggestion lists.  But it is overbroad: a private
variable in the user script may also be excluded.

7 years agoTweak systemtap.stress/tapset_functions.exp.
David Smith [Mon, 13 Feb 2017 19:04:29 +0000 (13:04 -0600)]
Tweak systemtap.stress/tapset_functions.exp.

* testsuite/systemtap.stress/tapset_functions.exp: Take 'qsq_start' off
  the blacklist, since without it we get 'never-assigned global variable'
  warnings.

7 years agoGet systemtap.base/vars.exp working on newer kernels.
David Smith [Mon, 13 Feb 2017 16:42:23 +0000 (10:42 -0600)]
Get systemtap.base/vars.exp working on newer kernels.

* testsuite/systemtap.base/vars.exp: Test for function existence before
  trying to list function variables. Test 'bio_copy_user_iov', which
  exists on newer kernels.

7 years agoFix systemtap.base/vma_vdso.exp by fixing stap command line.
David Smith [Mon, 13 Feb 2017 15:25:01 +0000 (09:25 -0600)]
Fix systemtap.base/vma_vdso.exp by fixing stap command line.

* testsuite/systemtap.base/vma_vdso.exp: Fix failures by removing unused
  stap command line argument.

7 years agotestsuite: fix dtrace.exp - listing_mode.exp conflict
Frank Ch. Eigler [Sun, 12 Feb 2017 21:11:49 +0000 (16:11 -0500)]
testsuite: fix dtrace.exp - listing_mode.exp conflict

The 'pypath' tcl global variable could leak from one test into the
next, causing an inappropriate attempt to remove a test source file.
Pro tip: all .exp files run in the same tcl/expect interpreter, so
global variables set in one persist to others.

7 years agotestsuite: use mktemp ... without -t template
Frank Ch. Eigler [Sun, 12 Feb 2017 20:46:51 +0000 (15:46 -0500)]
testsuite: use mktemp ... without -t template

On RHEL5 boxes, the -t foo-XXXXXXXXX-bar text is not always
processed correctly, preserving all those XXX's and causing
collisions.

7 years agoconfigury: -lrpmdb where needed
Frank Ch. Eigler [Sun, 12 Feb 2017 20:27:31 +0000 (15:27 -0500)]
configury: -lrpmdb where needed

Some older rpm schemes require an explicit -lrpmdb in stap_LIBS.

7 years agoconfigury: use pkgconfig for sqlite3
Frank Ch. Eigler [Sun, 12 Feb 2017 19:53:44 +0000 (14:53 -0500)]
configury: use pkgconfig for sqlite3

While testing on RHEL5, its sqlite 3.3.6 was found too old to support
some of the APIs we need.  Switch to a versioned pkgconfig test.

7 years agoFix BZ1421105 by requiring 'kernel-devel-uname-r' in the spec file.
David Smith [Fri, 10 Feb 2017 20:04:41 +0000 (14:04 -0600)]
Fix BZ1421105 by requiring 'kernel-devel-uname-r' in the spec file.

* systemtap.spec: Switch to requiring 'kernel-devel-uname-r' instead of
  'kernel-devel'.

7 years agoUpdated error message in testsuite/systemtap.base/utf_user_trunc.c.
David Smith [Fri, 10 Feb 2017 17:36:10 +0000 (11:36 -0600)]
Updated error message in testsuite/systemtap.base/utf_user_trunc.c.

7 years agoUpdate systemtap.base/utf_user_trunc.exp test case for gcc 7.
David Smith [Fri, 10 Feb 2017 16:26:23 +0000 (10:26 -0600)]
Update systemtap.base/utf_user_trunc.exp test case for gcc 7.

* testsuite/systemtap.base/utf_user_trunc.c: Lengthen MAXSTRINGLEN value
  to 41 characters to ensure that systmetap's error buffer is large enough
  to handle the "read fault" error messages (for example). Otherwise the
  test will fail when gcc 7 rightly complains that the error buffer isn't
  big enough.
* testsuite/systemtap.base/utf_user_trunc.stp: Ditto.

7 years agoAdd gcc 7 fixes to procfs_maxsize.exp.
David Smith [Fri, 10 Feb 2017 15:49:48 +0000 (09:49 -0600)]
Add gcc 7 fixes to procfs_maxsize.exp.

* testsuite/systemtap.base/procfs_maxsize.exp: Update for gcc 7. To avoid
  'format-truncation' errors, lengthen all procfs strings.

7 years agoTweak process_resume.exp to better ignore the number of getpid calls.
David Smith [Thu, 9 Feb 2017 19:29:05 +0000 (13:29 -0600)]
Tweak process_resume.exp to better ignore the number of getpid calls.

7 years agoFix a 'duplicate-decl-specifier' gcc 7 error in runtime/linux/alloc.c.
David Smith [Thu, 9 Feb 2017 19:08:25 +0000 (13:08 -0600)]
Fix a 'duplicate-decl-specifier' gcc 7 error in runtime/linux/alloc.c.

7 years agoFix/update the cast-scope testcase for gcc 7.
David Smith [Thu, 9 Feb 2017 18:39:17 +0000 (12:39 -0600)]
Fix/update the cast-scope testcase for gcc 7.

* testsuite/systemtap.base/cast-scope.exp: Update expected output for
  cast-scope.cxx change. This way we're depending on our own class instead
  of the internal details of the std::string class (which changed with gcc
  7).
* testsuite/systemtap.base/cast-scope.cxx: Instead of using the
  std::string class, define our own test class.
* testsuite/systemtap.base/cast-scope.stp: Update for cast-scope.cxx change.

7 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Thu, 9 Feb 2017 16:11:52 +0000 (10:11 -0600)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

7 years agoAdd a minor fix to semok.exp
David Smith [Thu, 9 Feb 2017 16:08:06 +0000 (10:08 -0600)]
Add a minor fix to semok.exp

* testsuite/systemtap.pass1-4/semok.exp: Mark utrace14.stp as a "root
  only" test.

7 years agosamples: add sched-latency.stp sample script
Frank Ch. Eigler [Thu, 9 Feb 2017 16:07:37 +0000 (11:07 -0500)]
samples: add sched-latency.stp sample script

Inspired by Tom Zanussi's example from https://lkml.org/lkml/2017/2/8/996

7 years agopython testsuite: tcl typo fix
Frank Ch. Eigler [Thu, 9 Feb 2017 15:20:58 +0000 (10:20 -0500)]
python testsuite: tcl typo fix

(This time for python3.)

7 years agoRHBZ1369685: stap-prep: try debuginfo-install even harder
Frank Ch. Eigler [Wed, 8 Feb 2017 19:17:59 +0000 (14:17 -0500)]
RHBZ1369685: stap-prep: try debuginfo-install even harder

Sometimes "yum install" succeeds even if "debuginfo-install" is needed,
so || is not the right condition.

7 years agoAdd the container_check.stp example.
William Cohen [Wed, 8 Feb 2017 18:48:45 +0000 (13:48 -0500)]
Add the container_check.stp example.

7 years agoPR20820: Add optim_stats test case minor improvement.
David Smith [Wed, 8 Feb 2017 17:04:08 +0000 (11:04 -0600)]
PR20820: Add optim_stats test case minor improvement.

* testsuite/systemtap.base/optim_stats1.stp: Use monotonic kernel timing.
* testsuite/systemtap.base/optim_stats2.stp: Ditto.

7 years agoAdd a small fix to systemtap.examples/process/futexes2.stp.
David Smith [Wed, 8 Feb 2017 16:54:41 +0000 (10:54 -0600)]
Add a small fix to systemtap.examples/process/futexes2.stp.

7 years agoImprove externalval.exp test for gcc 7.
David Smith [Wed, 8 Feb 2017 16:51:52 +0000 (10:51 -0600)]
Improve externalval.exp test for gcc 7.

* testsuite/systemtap.base/externalvar.c: Add asm() statements so that gcc
  won't optimize the external variables away.
* testsuite/systemtap.base/externalvar_lib.c: Ditto.

7 years agoUpdate systemtap.pass1-4/buildok-dyninst.exp.
David Smith [Tue, 7 Feb 2017 20:55:50 +0000 (14:55 -0600)]
Update systemtap.pass1-4/buildok-dyninst.exp.

* testsuite/systemtap.pass1-4/buildok-dyninst.exp: Add a KFAIL for
  defined-entry.stp, since it only uses kernel probes.

7 years agoUpdate tracepoint finding logic for linux 4.10.
David Smith [Tue, 7 Feb 2017 20:13:42 +0000 (14:13 -0600)]
Update tracepoint finding logic for linux 4.10.

* tapsets.cxx (tracepoint_extra_decls): Update for the 4.10 linux kernel.

7 years agoUpdate systemtap.base/utf_kernel_trunc.exp test case for gcc 7.
David Smith [Tue, 7 Feb 2017 16:01:22 +0000 (10:01 -0600)]
Update systemtap.base/utf_kernel_trunc.exp test case for gcc 7.

* testsuite/systemtap.base/utf_kernel_trunc.exp: Lengthen MAXSTRINGLEN
  value to 41 characters to ensure that systemtap's error buffer is large
  enough to handle the "read fault" error messages (for
  example). Otherwise the test will fail when gcc 7 rightly complains that
  the error buffer isn't big enough.
* testsuite/systemtap.base/utf_kernel_trunc.stp: Ditto.

7 years agoAdd some minor fixes to systemtap.base/auto_path.exp.
David Smith [Tue, 7 Feb 2017 15:32:35 +0000 (09:32 -0600)]
Add some minor fixes to systemtap.base/auto_path.exp.

* testsuite/systemtap.base/auto_path.exp: Improve test case by lenghening
  some timeout values.

7 years agocallees test case: pass "stap --ldd ..."
Frank Ch. Eigler [Mon, 6 Feb 2017 15:47:39 +0000 (10:47 -0500)]
callees test case: pass "stap --ldd ..."

... to make it more likely to have enough backtracing data through
glibc if needed.

7 years agopython testsuite: typo fix
Frank Ch. Eigler [Mon, 6 Feb 2017 11:36:57 +0000 (06:36 -0500)]
python testsuite: typo fix

7 years agoruntime: suppress a gcc7 warning
Frank Ch. Eigler [Sun, 5 Feb 2017 19:11:32 +0000 (14:11 -0500)]
runtime: suppress a gcc7 warning

A signed-overflow warning is emitted by gcc7 for former code related
in _stp_vsprint_binary.  A few more conditions make the warning go.

7 years agoPR21063 cont'd: dtrace.in $CFLAGS filtering
Frank Ch. Eigler [Sat, 4 Feb 2017 23:41:32 +0000 (18:41 -0500)]
PR21063 cont'd: dtrace.in $CFLAGS filtering

Passing $CFLAGS with embedded \" sequences is OK, so tune the previous
CFLAGS sanitization logic to nuke only backslash-newline sequences.
Modified dtrace.exp test covers this case as well as previous one.

7 years agoFix PR21105 by updating 2 syscall test cases.
David Smith [Fri, 3 Feb 2017 22:09:00 +0000 (16:09 -0600)]
Fix PR21105 by updating 2 syscall test cases.

* testsuite/systemtap.syscall/getrlimit.c: Handle glibc substituting
  prlimit64() for getrlimit()/setrlimit().
* testsuite/systemtap.syscall/lseek.c: Handle glibc substituting
  llseek() for lseek().

7 years agoUpdate syscall probes and test cases.
David Smith [Thu, 2 Feb 2017 22:21:16 +0000 (16:21 -0600)]
Update syscall probes and test cases.

* tapset/linux/sysc_dup2.stp: Added a 'flags_str' variable to match the
  dup3 syscall probes.
* tapset/linux/sysc_fadvise64.stp: Added a 'advice_str' variable.
* tapset/linux/sysc_accept.stp: Fix addressing error by adding @cast().
* tapset/linux/sysc_accept4.stp: Ditto.
* tapset/linux/sysc_bind.stp: Ditto.
* tapset/linux/sysc_connect.stp: Ditto.
* tapset/linux/sysc_getpeername.stp: Ditto.
* tapset/linux/sysc_getsockname.stp: Ditto.
* tapset/linux/sysc_recv.stp: Ditto.
* tapset/linux/sysc_recvfrom.stp: Ditto.
* tapset/linux/sysc_recvmsg.stp: Ditto.
* tapset/linux/sysc_send.stp: Ditto.
* tapset/linux/sysc_sendmmsg.stp: Ditto.
* tapset/linux/sysc_sendmsg.stp: Ditto.
* tapset/linux/sysc_sendto.stp: Ditto.
* tapset/linux/sysc_setsockopt.stp: Ditto.
* tapset/linux/sysc_shutdown.stp: Ditto.
* tapset/linux/sysc_socket.stp: Ditto.
* testsuite/buildok/syscalls-detailed.stp: Fix a few printf statements.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.

7 years agoFix PR21102 by updating the ioblock tapset.
David Smith [Thu, 2 Feb 2017 18:25:14 +0000 (12:25 -0600)]
Fix PR21102 by updating the ioblock tapset.

* tapset/linux/ioblock.stp: Update tapset for newer kernels. Upstream
  kernel commits (like commit 1eff9d322a444245c67515edb52bc0eb68374aa8)
  renamed and reworked the 'bi_rw' field of the bio structure.

7 years agoPR21101: Fix gcc7 'duplicate-decl-specifier' and 'format-truncation' errors.
David Smith [Thu, 2 Feb 2017 15:08:57 +0000 (09:08 -0600)]
PR21101: Fix gcc7 'duplicate-decl-specifier' and 'format-truncation' errors.

* tapset/linux/aux_syscalls.stp: Fix gcc7 'duplicate-decl-specifier'
  and 'format-truncation' errors
* tapset/linux/arm/aux_syscalls.stp: Fix gcc7 'duplicate-decl-specifier'
  errors.
* tapset/linux/arm64/aux_syscalls.stp: Ditto.
* tapset/linux/i386/aux_syscalls.stp: Ditto.
* tapset/linux/ia64/aux_syscalls.stp: Ditto.
* tapset/linux/powerpc/aux_syscalls.stp: Ditto.
* tapset/linux/s390/aux_syscalls.stp: Ditto.
* tapset/linux/x86_64/aux_syscalls.stp: Ditto.

7 years agoPR20333 - The NEWS file entry.
Martin Cermak [Thu, 2 Feb 2017 10:06:50 +0000 (11:06 +0100)]
PR20333 - The NEWS file entry.

7 years agomerge to master (575fe913f6b6b81421f7bfda7c72ab8c15ecb8e3)
Martin Cermak [Thu, 2 Feb 2017 08:13:40 +0000 (09:13 +0100)]
merge to master (575fe913f6b6b81421f7bfda7c72ab8c15ecb8e3)

7 years agoFix -Wimplicit-fallthrough build errors
Lukas Berk [Mon, 30 Jan 2017 15:14:24 +0000 (10:14 -0500)]
Fix -Wimplicit-fallthrough build errors

GCC7 will now error implicit fallthrough's as per sourceware.org/PR7652

7 years agoUpdated a comment in runtime/time.c.
David Smith [Thu, 26 Jan 2017 15:25:32 +0000 (09:25 -0600)]
Updated a comment in runtime/time.c.

7 years agoPR20672 prime: prevent python $var infinitely recursive expansion
Frank Ch. Eigler [Thu, 26 Jan 2017 13:10:53 +0000 (08:10 -0500)]
PR20672 prime: prevent python $var infinitely recursive expansion

The new python expanding visitors take probe-python bodies and intend
to generate probe-process bodies, expanding python $var references to
uprobe marker $var ones.  During the expansion process however, the
code can get confused as to whether the new $arg3 is fish or foul.
If asked, it will map $arg3 -> foo($arg3, "arg3"), then recurse,
which is a recipe for stack exhaustion.

So now we map the generated $arg3 with a new hacky target_symbol flag,
"synthetic", to prevent infinite recursion there.  (Note that using
the recently added abort_provide() response from the expander is not
enough, because an outer relaxation loop would then trigger infinite
looping rather than infinite recursion.)

A better solution could be to have a *not-in-place* rewriting visitor,
so that the output tree is never reprocessed by the invoking visitor.

7 years agoAdd timestamp to nfsd-trace.stp example.
David Smith [Wed, 25 Jan 2017 19:39:57 +0000 (13:39 -0600)]
Add timestamp to nfsd-trace.stp example.

* testsuite/systemtap.examples/network/nfsd-trace.stp: Add timestamp.

7 years agoPR20627: rework several code rewriting passes
Frank Ch. Eigler [Wed, 25 Jan 2017 15:00:11 +0000 (10:00 -0500)]
PR20627: rework several code rewriting passes

The translator depends on some staptree rewriting passes not only for
optimization but also for correctness.

The @defined() construct is one where its timely execution and
implication handling is important, so that other constructs protected
by false-valued if(@defined()) guards are not even processed.  In
other places, @defined() nodes are collapsed to zero under heuristic
conditions.  This has all been a mash of uncomfortable probe-specific
and probe-independent code, running the same visitors in different
modes at different times, looping or not.

So we take a step forward in recognizing that some visitors
necessarily operate partially, and must be rerun, interleaved with
others.  New functions in tapsets.h:

update_visitor_loop() -- given a vector of update_visitors, loop till relaxed
var_expand_const_fold_loop() -- same specialized to const-folder

... are now used from general elaborator driver as well as
probe-derivation logic.  Some heuristic code regarding @defined()
can be removed.

This extends the update_visitor base template with its own notion of
relaxed-ness, which is naturally that if a staptree node/pointer has
been replaced (changed to a different value) during the visiting
traversal, then it is -not- relaxed yet, and this is saved in a new
instance variable.  (A reset() function resets this so the same
visitor object can be reused.)

This makes it unnecessary to track count_replaced_defined_ops()
separately.  It should make it possible to drop some other bool& flags
in some other older optimization passes; this is left for later.

7 years agotestsuite: tweak bz1027459
Frank Ch. Eigler [Wed, 25 Jan 2017 15:36:57 +0000 (10:36 -0500)]
testsuite: tweak bz1027459

On a multi-CPU box, it's possible for two syscall.* probes to start
firing at the same time, this print two or more "hi"s, before the
exit() stops further new probes.

7 years agotestsuite: more adaptation to $var -> @entry($var) in .return probes
Frank Ch. Eigler [Wed, 25 Jan 2017 11:46:41 +0000 (06:46 -0500)]
testsuite: more adaptation to $var -> @entry($var) in .return probes

... and miscellaneous quickie fixes

7 years agotestsuite infrastructure: change stap_run api
Frank Ch. Eigler [Mon, 16 Jan 2017 15:58:41 +0000 (10:58 -0500)]
testsuite infrastructure: change stap_run api

... add another .exp straggler

7 years agoUpdate lookup_bad_addr() to avoid a kernel warning.
David Smith [Tue, 24 Jan 2017 16:44:12 +0000 (10:44 -0600)]
Update lookup_bad_addr() to avoid a kernel warning.

* runtime/linux/addr-map.c (lookup_bad_addr): Handle kernel commit
  7c4788950ba which adds a kernel warning if access_ok() is called when
  not in task context.

7 years agosystemtap.spec: switch to pkgconfig(LIB) buildreq syntax
Frank Ch. Eigler [Mon, 23 Jan 2017 15:34:47 +0000 (10:34 -0500)]
systemtap.spec: switch to pkgconfig(LIB) buildreq syntax

Instead of buildrequiring the pkgconfig package per se and the various
LIBFOO-devel, switch to the fedora-preferred pkgconfig(LIB) syntax.

7 years agodtrace wrapper: tolerate \ \n etc. in $CFLAGS
Frank Ch. Eigler [Sat, 21 Jan 2017 22:58:48 +0000 (17:58 -0500)]
dtrace wrapper: tolerate \ \n etc. in $CFLAGS

A user reports that some rpmbuild make jobs can cause embedded
wackiness like \ characters in $CFLAGS.  Nuke them.

7 years agonew example: nfsd-trace.stp
Frank Ch. Eigler [Fri, 20 Jan 2017 23:28:07 +0000 (18:28 -0500)]
new example: nfsd-trace.stp

Traces nfsd operations, with file names.

7 years agoPR21065: dtrace .d usdt parser: tolerate probe ... (...) : (...); syntax
Frank Ch. Eigler [Fri, 20 Jan 2017 23:15:44 +0000 (18:15 -0500)]
PR21065: dtrace .d usdt parser: tolerate probe ... (...) : (...); syntax

Allow our /usr/bin/dtrace-impersonating usdt-.d file parser to take in
those .d files that use the "arguments passed to probe consumers"
extended syntax:

provider {
    probe FOO (int foo, char *bar) : (int foo, string bar);
}

We just quietly ignore the latter part though, so the systemtap script
sees the application's raw DTRACE_PROBE* argument list.

7 years agoruntime/unwind: don't warn about self-unwinding
Frank Ch. Eigler [Fri, 20 Jan 2017 03:04:48 +0000 (22:04 -0500)]
runtime/unwind: don't warn about self-unwinding

If a kernel backtrace traversed the stap module itself, until this
patch, the runtime emitted a pair of _stp_warn()'s complaining about
not-quite-perfect unwind data.  This is noisy and unhelpful, since a
user can't do anything about it, so we switch over to a dbug(1) type
message.

7 years agosystemtap.spec: add python*-setuptools buildrequires
Frank Ch. Eigler [Thu, 19 Jan 2017 21:28:30 +0000 (16:28 -0500)]
systemtap.spec: add python*-setuptools buildrequires

On some distros, these packages are not in the basic buildroot.

7 years agoHandle F24 dropping ppc64 32-bit exe support in the testsuite.
David Smith [Fri, 20 Jan 2017 19:06:40 +0000 (13:06 -0600)]
Handle F24 dropping ppc64 32-bit exe support in the testsuite.

* testsuite/lib/compile_flags.exp (arch_compile_init): New
  function. Fedora 24 ppc64 has dropped 32-bit exe support. Now on ppc64
  systems, we test the 32-bit support. If it doesn't work (or isn't
  present), assume only 64-bit exe support.
  (arch_compile_flags): For ppc64, return the number of compile flags
  arch_compile_init() determined for this system.
  (arch_compile_flag): Ditto.
* testsuite/lib/systemtap.exp (setup_systemtap_environment): Call
  arch_compile_init().

7 years agoAdd a syscalls macro to the dyninst tapset that the python tapsets use.
David Smith [Thu, 19 Jan 2017 20:43:49 +0000 (14:43 -0600)]
Add a syscalls macro to the dyninst tapset that the python tapsets use.

* tapset/dyninst/syscalls.stpm: New file.

7 years agoAdd python probe documentation to the man pages.
David Smith [Thu, 19 Jan 2017 17:10:31 +0000 (11:10 -0600)]
Add python probe documentation to the man pages.

* man/stapprobes.3stap: Add python probe documentation.
* stapref.1: Ditto.

7 years agoMove and update comment in systemtap.spec.
David Smith [Mon, 16 Jan 2017 18:54:24 +0000 (12:54 -0600)]
Move and update comment in systemtap.spec.

7 years agotweak python helper installation paths
Frank Ch. Eigler [Mon, 16 Jan 2017 18:23:57 +0000 (13:23 -0500)]
tweak python helper installation paths

Since our python helper includes C shared libraries, all the files
(including .egg-info) will get put under %python_sitearch
(/usr/lib64/...) rather than %python_sitelib (/usr/lib/...).

The translate-time stap-resolve-module-function* file belongs in
the -devel subrpm, not -runtime.

7 years agotestsuite infrastructure: change stap_run api
Frank Ch. Eigler [Mon, 16 Jan 2017 15:58:41 +0000 (10:58 -0500)]
testsuite infrastructure: change stap_run api

... add a few testcase .exp stragglers

7 years agoAnnounce python probe support in NEWS.
David Smith [Mon, 16 Jan 2017 15:30:05 +0000 (09:30 -0600)]
Announce python probe support in NEWS.

7 years agoFix the python helper module compiliation.
David Smith [Mon, 16 Jan 2017 15:29:38 +0000 (09:29 -0600)]
Fix the python helper module compiliation.

* python/Makefile.am: Fix a problem where we were using the system's copy
  of sdt.h, instead of the source tree's copy of sdt.h.
* python/Makefile.in: Regenerated.

7 years agotestsuite infrastructure: change stap_run api
Frank Ch. Eigler [Mon, 16 Jan 2017 15:24:45 +0000 (10:24 -0500)]
testsuite infrastructure: change stap_run api

Formerly, the stap_run tcl proc accepted a target stap script file
name both as its first argument, as well as in the general stap
argument list at the end.  It passed the former name as an extra file
name iff it existed in the $srcdir/$testdir.  Some tests happened to
use test names that matched files, so triggered this stap_run
heuristic, even if the .stp files were specified some other way.  This
led to extra stap arguments, leading to "unused $0/@0 ..."  warnings,
leading to test failures.

Now, stap_run never does anything clever with its first parameter - it
just uses it to construct the dejagnu test case id/name.  The .stp
file name (if any - if not using -e SCRIPT for example) is now
expected to be included by the testcase.exp as arguments at the end.

7 years agotweak unused $n/@n warning for argv tapset users
Frank Ch. Eigler [Mon, 16 Jan 2017 15:23:23 +0000 (10:23 -0500)]
tweak unused $n/@n warning for argv tapset users

Use the demangled (original) names in s.globals[] rather than mangled
name to heuristically identify use of the argv tapset (and thus
suppression of the warnings).

7 years agoMerge syscalls with identical 'name' to common files.
Martin Cermak [Mon, 16 Jan 2017 14:52:54 +0000 (15:52 +0100)]
Merge syscalls with identical 'name' to common files.

7 years agoBackport commit 9b7699bf248e86933aed563a10c6c0bf27b22237 from master.
Martin Cermak [Fri, 13 Jan 2017 12:40:16 +0000 (13:40 +0100)]
Backport commit 9b7699bf248e86933aed563a10c6c0bf27b22237 from master.

7 years agoPR20333: Add new convenience variables to the buildok tests.
Martin Cermak [Fri, 13 Jan 2017 10:09:54 +0000 (11:09 +0100)]
PR20333: Add new convenience variables to the buildok tests.

* nd_syscalls2-detailed.stp, syscalls2-detailed.stp: Drop the
  compat_pselect7a versus compat_pselect7 typo handling which was
  systemtap_v <= "1.3".
* nd_syscalls2-detailed.stp: Add nd_syscall.sched_yield and
  nd_syscall.userfaultfd test to align with syscalls2-detailed.stp
* The rest of the changes is adding new convenience variables.

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