]> sourceware.org Git - systemtap.git/log
systemtap.git
10 years agomodule cache hashing: add systemtap version string
Frank Ch. Eigler [Wed, 7 May 2014 13:52:57 +0000 (09:52 -0400)]
module cache hashing: add systemtap version string

* session.cxx (version_string): New method.
  (version): Call it.
* hash.cxx (get_base_hash): Ditto.

10 years agoFix tcl error in testsuite/systemtap.base/target_set.exp
David Smith [Tue, 6 May 2014 20:50:11 +0000 (15:50 -0500)]
Fix tcl error in testsuite/systemtap.base/target_set.exp

* testsuite/systemtap.base/target_set.exp: Fix tcl error on script compile
  failure by providing fail reason.

10 years agoFix PR16914 by adding more aarch64 defines.
David Smith [Tue, 6 May 2014 20:42:11 +0000 (15:42 -0500)]
Fix PR16914 by adding more aarch64 defines.

* runtime/linux/compat_unistd.h: Add '__NR_open' and '__NR_futimesat'
  defines for aarch64.

10 years agoFlip condition so proper default picked for STAP_NOP in testsuite/sys/sdt.h
William Cohen [Tue, 6 May 2014 20:01:54 +0000 (16:01 -0400)]
Flip condition so proper default picked for STAP_NOP in testsuite/sys/sdt.h

A number of the uprobes code failed to build on aarch64 because the
define for STAP_NOP would default to the unusual "nop 0".  The test
has been flipped around so the default is usual "nop" if there is
not something explict.

10 years agoFix PR16914 by adding aarch64 support to runtime/linux/compat_unistd.h.
David Smith [Tue, 6 May 2014 18:34:18 +0000 (13:34 -0500)]
Fix PR16914 by adding aarch64 support to runtime/linux/compat_unistd.h.

10 years agoFix nd_syscall ustat32 probes.
David Smith [Tue, 6 May 2014 17:26:31 +0000 (12:26 -0500)]
Fix nd_syscall ustat32 probes.

* tapset/linux/nd_syscalls2.stp: Combine the 2 nd_syscall.ustat32 probes
  into one.

10 years agoPR16913: aarch64: don't require prelink
Martin Cermak [Tue, 6 May 2014 13:53:05 +0000 (09:53 -0400)]
PR16913: aarch64: don't require prelink

10 years agoMake syscall.sendfile optional.
David Smith [Mon, 5 May 2014 21:33:19 +0000 (16:33 -0500)]
Make syscall.sendfile optional.

10 years agoFix more compile error when we don't have a dwarf unwinder.
David Smith [Mon, 5 May 2014 21:25:25 +0000 (16:25 -0500)]
Fix more compile error when we don't have a dwarf unwinder.

* runtime/linux/runtime.h: Fix compilation on systems without
  STP_USE_DWARF_UNWINDER defined.
* runtime/unwind/unwind.h: For systems without STP_USE_DWARF_UNWINDER
  defined, just define a dummy unwind_context structure along with the
  real unwind_cache structure.

10 years agoFix compile error when we don't have a dwarf unwinder in _stp_tack_kernel_print
David Smith [Mon, 5 May 2014 20:46:40 +0000 (15:46 -0500)]
Fix compile error when we don't have a dwarf unwinder in _stp_tack_kernel_print

* runtime/stack.c (_stp_stack_kernel_print): Use 'c->kregs' instead of
  nonexistent 'regs' variable. This code is only compiled when
  STP_USE_DWARF_UNWINDER isn't defined.

10 years agosystemtap.spec: make java/emacs conditional on usual >=f19-rhel7
Frank Ch. Eigler [Mon, 5 May 2014 16:59:15 +0000 (12:59 -0400)]
systemtap.spec: make java/emacs conditional on usual >=f19-rhel7

10 years agobeginnner's guide configury: compatibility with older publican
Frank Ch. Eigler [Mon, 5 May 2014 16:49:10 +0000 (12:49 -0400)]
beginnner's guide configury: compatibility with older publican

Older publican doesn't support the --pdftool=fop option.  It's too
much hassle to autoautoconf this (considering the existing fop-related
conditionals at the top level configure.ac), so instead here we try
publican with and then without the --pdftool=fop option.

10 years agoFixed PR6791 by adding ia64 dwarfless register access.
David Smith [Mon, 5 May 2014 15:20:14 +0000 (10:20 -0500)]
Fixed PR6791 by adding ia64 dwarfless register access.

* tapset/ia64/registers.stp: Add dwarfless register access.
* runtime/regs.c (__stp_sign_extend32): Ensure it is present for ia64
  compiles.
* tapset/linux/nd_syscalls2.stp: Add ia64 support.
* testsuite/systemtap.syscall/nd_syscall.exp: Remove kfail for ia64.
* testsuite/buildok/nd_syscalls-detailed.stp: Make accept4 and fork tests
  optional.
* testsuite/systemtap.examples/process/strace.tcl: Removed file that
  kfailed ia64 for lack of dwarfless register access.
* testsuite/systemtap.examples/process/thread-business.tcl: Ditto.

10 years agoAdd pyparsing to dtrace
Stan Cox [Mon, 5 May 2014 14:24:20 +0000 (10:24 -0400)]
Add pyparsing to dtrace

* dtrace.in: pylint cleanups.
  (_HeaderCreator): Moved from _provider.
  (_PypProvider):  New.  The pyparsing parser.
  (_ReProvider): Moved from _provider.  The regexp parser.
  (main): Add pyparsing awareness.

10 years agoAdd test coverage for rhbz1027459
Martin Cermak [Fri, 2 May 2014 16:39:35 +0000 (18:39 +0200)]
Add test coverage for rhbz1027459

10 years agoMake the syscall.accept4 buildok test optional.
David Smith [Fri, 2 May 2014 14:49:36 +0000 (09:49 -0500)]
Make the syscall.accept4 buildok test optional.

10 years agoPR16894: new wordexp.exp to check -c COMMAND handling
Jonathan Lebon [Fri, 2 May 2014 14:19:06 +0000 (10:19 -0400)]
PR16894: new wordexp.exp to check -c COMMAND handling

This simple testcase checks that invalid -c COMMANDs for unspecified
process probes are properly handled (e.g. prior to commit eb94071, we
segfaulted).

10 years agoPR16894: give better errors re. -c commands
Jonathan Lebon [Fri, 2 May 2014 13:43:07 +0000 (09:43 -0400)]
PR16894: give better errors re. -c commands

This patch allows SystemTap to make the distinction when reporting an
error between no -c command given, and a given but invalid -c command.

- man/stapprobes.3stap: introduce 'unspecified' verbiage and clear up
  restrictions on unspecified process probes
- session.cxx: cmd_file() now throws errors upon wordexp() failures
- tapsets.cxx: (1) handle possibility of error from cmd_file() and chain
                   with own error if it occurs
               (2) separately handle no -c command / empty file
               (3) introduce 'unspecified' verbiage in error messages
                   and point to [man stapprobes]
- tapset-perfmon.cxx: ditto

10 years agoPR16716 partial fix: Fix types in syscall.clock_{getres,gettime,nanosleep}.
David Smith [Fri, 2 May 2014 13:20:21 +0000 (08:20 -0500)]
PR16716 partial fix: Fix types in syscall.clock_{getres,gettime,nanosleep}.

* tapset/linux/syscalls.stp (syscall.clock_getres): Fix compat support and
  types.
  (syscall.clock_gettime): Fix compat support and add 'tp_uaddr' variable.
  (syscall.clock_nanosleep): Fix types. Add 'clk_id', 'clk_id_str',
  'req_uaddr', and 'rem_uaddr' variables. Deprecate 'flag_str' in favor of
  'flags_str'.
  (syscall.compat_clock_nanosleep): Ditto.
  (syscall.clock_settime): Fix types.
* tapset/linux/nd_syscalls.stp (nd_syscall.clock_getres): Fix compat support.
  (nd_syscall.clock_gettime): Fix compat support and add 'tp_uaddr' variable.
  (nd_syscall.clock_nanosleep): Add 'clk_id', 'clk_id_str', 'req_uaddr',
  and 'rem_uaddr' variables. Deprecate 'flag_str' in favor of 'flags_str'.
  (nd_syscall.compat_clock_nanosleep): Ditto.
* tapset/linux/aux_syscalls.stp (_struct_timeval_u): Instead of "UNKNOWN",
  print the failing address.
  (_struct_compat_timeval_u): Ditto.
  (_struct_timezone_u): Ditto.
  (_struct_timespec_u): Ditto.
  (_struct_compat_timespec_u): Ditto.
  (_stp_clock_nanosleep_flags_str): New function.
  (_get_wc_str): Convert to use _stp_lookup_str().
* testsuite/buildok/aux_syscalls-embedded.stp: Add test for
  _stp_clock_nanosleep_flags_str().
* testsuite/buildok/syscalls-detailed.stp: Add tests for new variables.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/clock.c: Add more error testing.
* testsuite/systemtap.syscall/futimes.c: Update expected output.
* testsuite/systemtap.syscall/net1.c: Ditto.
* testsuite/systemtap.syscall/recvmmsg.c: Ditto.
* testsuite/systemtap.syscall/select.c: Ditto.
* testsuite/systemtap.syscall/inotify.c: Fix "COVERAGE" comment formatting.

10 years agocmd_file(): properly free the words array
Jonathan Lebon [Thu, 1 May 2014 20:43:09 +0000 (16:43 -0400)]
cmd_file(): properly free the words array

We should free it regardless if rc > 0.

10 years agocmd_file(): only free words if succeeded
Jonathan Lebon [Thu, 1 May 2014 20:31:59 +0000 (16:31 -0400)]
cmd_file(): only free words if succeeded

Otherwise, we may accidentally summon Cthulhu.

10 years agofix typo in changelog (bad date)
Martin Cermak [Thu, 1 May 2014 06:42:41 +0000 (08:42 +0200)]
fix typo in changelog (bad date)

10 years agoversion bump and autoreconf
Jonathan Lebon [Wed, 30 Apr 2014 18:56:22 +0000 (14:56 -0400)]
version bump and autoreconf

10 years agoAdd MMPAP_SYSCALL_NO and other defines in runtime/syscall.h for aarch64
William Cohen [Wed, 30 Apr 2014 18:52:42 +0000 (14:52 -0400)]
Add MMPAP_SYSCALL_NO and other defines in runtime/syscall.h for aarch64

10 years agoPR16716 partial fix: Fix types in syscall.{compat_select,unlinkat}
David Smith [Wed, 30 Apr 2014 18:44:51 +0000 (13:44 -0500)]
PR16716 partial fix: Fix types in syscall.{compat_select,unlinkat}

* tapset/linux/syscalls2.stp: Fix types in syscall.{compat_select,unlinkat}.
* tapset/linux/nd_syscalls2.stp: Fix types in nd_syscall.unlinkat.

10 years agosystemtap.spec: pre-release log and bump release-2.5
Jonathan Lebon [Wed, 30 Apr 2014 18:16:20 +0000 (14:16 -0400)]
systemtap.spec: pre-release log and bump

10 years agoPR16716 partial fix: Fix types in syscall.{linkat,readlink,readlinkat}.
David Smith [Wed, 30 Apr 2014 15:06:39 +0000 (10:06 -0500)]
PR16716 partial fix: Fix types in syscall.{linkat,readlink,readlinkat}.

* tapset/linux/syscalls.stp: Fixed types in syscall.linkat.
* tapset/linux/syscalls2.stp: Fixed types in
  syscall.{readlink,readlinkat).
* testsuite/systemtap.syscall/link.c: Added tests.

10 years agoPR16716 partial fix: Fix types in syscall.{open,openat}.
David Smith [Tue, 29 Apr 2014 20:56:12 +0000 (15:56 -0500)]
PR16716 partial fix: Fix types in syscall.{open,openat}.

* tapset/linux/syscalls2.stp: Fixed types in syscall.{open,openat}.
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/systemtap.syscall/openclose.c: Added tests.

10 years agopyexample.stp: split into py2example.stp and py3example.stp
Jonathan Lebon [Tue, 29 Apr 2014 18:32:48 +0000 (14:32 -0400)]
pyexample.stp: split into py2example.stp and py3example.stp

In order to be compatible on systems with only python2 installed (or
only python3 installed), we split the pyexample.stp script into two
versions.

We also add a test_support line in the meta files so that check.exp
marks them as untested if either/both python versions are not present.

In the tapsets, we make py2/3 aliases that the scripts then use, but
also create general ones that refer to both the 2 and 3 variants.

The python3 version requires -g --suppress-time-limits, otherwise it's
very likely that a 'overhead exceeded' ERROR.

- py2example.stp: python 2 version of the script
- py2example.meta: meta file for python 2 version, with test_support
  check for python 2 specific SDT markers
- py3example.stp: python 3 version of the script
- py3example.meta: meta file for python 3 version, with test_support
  check for python 3 specific SDT markers
- tapset/python2.stp: make python2 specific aliases and alias the
  general ones to that
- tapset/python3.stp: make python3 specific aliases and alias the
  general ones to that

10 years agofix --suppress-time-limits usage typo too
Frank Ch. Eigler [Tue, 29 Apr 2014 20:25:04 +0000 (16:25 -0400)]
fix --suppress-time-limits usage typo too

10 years agoFix typo for suppress-time-limits in runtime headers
Lukas Berk [Tue, 29 Apr 2014 20:17:36 +0000 (16:17 -0400)]
Fix typo for suppress-time-limits in runtime headers

*man/stap.1   - update man page to properly list macro's
  and polarity of statement
*runtime/common_probe_context.h - fix STAP_SUPPRESS_TIME_LIMITS_ENABLE typo
*runtime/runtime_defines.h  - ditto

10 years agoFix PR16884 by updating [nd_]syscall.compat_sys_shmctl.
David Smith [Tue, 29 Apr 2014 19:31:09 +0000 (14:31 -0500)]
Fix PR16884 by updating [nd_]syscall.compat_sys_shmctl.

* tapset/linux/syscalls2.stp (syscall.compat_sys_shmctl): Make supported
  variables match up with syscall.shmctl.
* tapset/linux/nd_syscalls2.stp (nd_syscall.compat_sys_shmctl): Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Updated
  syscall.compat_sys_shmctl test.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* NEWS: Mention variable deprecations.

10 years agoPR16716 partial fix: Fix types in syscall.{chmod,fchmodat}.
David Smith [Tue, 29 Apr 2014 18:24:33 +0000 (13:24 -0500)]
PR16716 partial fix: Fix types in syscall.{chmod,fchmodat}.

* tapset/linux/syscalls.stp: Fixed types in syscall.{chmod,fchmodat}.
* tapset/linux/nd_syscalls.stp: Removed old comment.

10 years agoPR16716 partial fix: Fix types in syscall.sysfs.
David Smith [Tue, 29 Apr 2014 17:25:51 +0000 (12:25 -0500)]
PR16716 partial fix: Fix types in syscall.sysfs.

* tapset/linux/syscalls2.stp: Fixed types in syscall.sysfs. Improved
  output formatting.
* tapset/linux/syscalls2.stp: Improved output formatting in
  nd_syscall.sysfs.
* testsuite/systemtap.syscall/sysfs.c: New test case.

10 years agoNEWS: typos in --dump-functions blurb
Jonathan Lebon [Tue, 29 Apr 2014 16:15:59 +0000 (12:15 -0400)]
NEWS: typos in --dump-functions blurb

10 years agoPR16716 partial fix: Fix types in syscall.{dup,dup2,dup3}.
David Smith [Tue, 29 Apr 2014 15:54:27 +0000 (10:54 -0500)]
PR16716 partial fix: Fix types in syscall.{dup,dup2,dup3}.

* tapset/linux/syscalls.stp: Fixed types in syscall.{dup,dup2,dup3}.
* tapset/linux/aux_syscalls.stp (_dup3_flag_str): Just use the open mode
  flags list.
* testsuite/systemtap.syscall/dup.c: Add more tests.

10 years agoupdate copyrights
Jonathan Lebon [Tue, 29 Apr 2014 15:42:41 +0000 (11:42 -0400)]
update copyrights

Update the Red Hat copyrights using:

scripts/update-copyright "Red Hat" redhat.com

10 years agonew helper script scripts/update-copyrights
Jonathan Lebon [Thu, 24 Apr 2014 16:53:06 +0000 (12:53 -0400)]
new helper script scripts/update-copyrights

This script looks at all the tracked files in the tree that are
copyrighted by <company> and updates the copyright year if they've been
modified this year by a user at <domain>.

Usage example: scripts/update-copyrights "Red Hat" redhat.com

10 years agoBZ1092147: ppc64le: don't require prelink
Brent Baude [Mon, 28 Apr 2014 20:39:19 +0000 (16:39 -0400)]
BZ1092147: ppc64le: don't require prelink

10 years agoPR16406: fix build-id false mismatch for userspace-program vs. kernel-module
Frank Ch. Eigler [Mon, 28 Apr 2014 19:55:56 +0000 (15:55 -0400)]
PR16406: fix build-id false mismatch for userspace-program vs. kernel-module

The translate.cxx-emitted _stp_module array has two name fields, .name
and .path, which were ambiguous as to whether each was a kernel module
or a userspace executable.  The .name string was just the basename,
and it was used in the near-startup-time _stp_module_check().  If the
userspace program matched a kernel module, bangorama (a false build-id
mismatch error at startup) .. unless --all-modules was given, in
which case the kernel modules won the duplication race.

The correction has a couple of parts.  First, the _stp_module .name is
made the same as the fully-/-qualified .path for userspace programs.
Second, _stp_module_check checks all kernel+module bits it knows
about, not just the first one.  Hand-tested with a variety of runs,
and with the *myproc.exp test, which is now forced to try to conflict.

* translate.cxx (dump_unwindsym_ctx): Make userspace _stp_module->name's
  fully-/-qualified.
* runtime/sym.c (_stp_module_check): Check all and only kernel-space
  build-ids.  Filter by _stp_module->name.
  (stp_kmodule_check, stp_usermodule_check): WARN_ON wrong-polarity
  incoming module/path name.
* testsuite/.../unprivileged_myproc.exp: Run 'modprobe loop'

10 years agounprivileged_myproc.exp: only KFAIL .callee(string)
Jonathan Lebon [Mon, 28 Apr 2014 21:00:39 +0000 (17:00 -0400)]
unprivileged_myproc.exp: only KFAIL .callee(string)

This is a followup to the followup commit 9d4241d. The .callees and
.callees(number) probes will always work because they will match ibar().
Only the .callee(string), which is turned to .callee("tbar"), should be
KFAILed, since it will definitely fail for GCC < 4.7.

10 years agounprivileged_myproc.exp: adjust loop.c
Jonathan Lebon [Mon, 28 Apr 2014 20:24:32 +0000 (16:24 -0400)]
unprivileged_myproc.exp: adjust loop.c

The process("./loop").function("ibar").inline probe was failing in this
test because of a bug in GCC (RHBZ1092144). In a nutshell, GCC unrolls
the loop once, resulting in ibar() being called twice: once outside the
loop and once inside. However, only the former gets a corresponding
inlined_subroutine DIE. As a result, the SystemTap probe only fires once
at startup rather than at every iteration.

This patch takes out the if-expression in the loop so that GCC doesn't
need to do any unrolling and we end up with two inlined_subroutine DIEs.

10 years agotask.stp: fix typo in task_rlimit() description
Jonathan Lebon [Mon, 28 Apr 2014 14:52:58 +0000 (10:52 -0400)]
task.stp: fix typo in task_rlimit() description

10 years agoPR16716 partial fix: Fix types in syscall.{inotify_add_watch,inotify_rm_watch}
David Smith [Mon, 28 Apr 2014 20:32:32 +0000 (15:32 -0500)]
PR16716 partial fix: Fix types in syscall.{inotify_add_watch,inotify_rm_watch}

* tapset/linux/syscalls.stp: Fix types in
  syscall.{inotify_add_watch,inotify_rm_watch}.
* tapset/linux/nd_syscalls.stp: Fix types in nd_syscall.inotify_rm_watch.
* tapset/linux/aux_syscalls.stp (_inotify_watch_mask_str): Updated and
  improved to display unknown values.
  (_inotify_init1_flag_str): Ditto.
* testsuite/systemtap.syscall/inotify.c: Add more tests.

10 years agoPR16716 partial fix: Fix types in syscall.{close,creat}.
David Smith [Mon, 28 Apr 2014 18:22:26 +0000 (13:22 -0500)]
PR16716 partial fix: Fix types in syscall.{close,creat}.

* tapset/linux/syscalls.stp: Fixed types in syscall.{close,creat}.
* tapset/linux/syscalls.stp: Fixed types in syscall.creat.
* tapset/linux/aux_syscalls.stp (_sys_open_flag_str): Updated and improved
  to display unknown values.
* testsuite/systemtap.syscall/openclose.c: Added more tests.

10 years agoAdd java backtracing and self unwinding to NEWS
Lukas Berk [Mon, 28 Apr 2014 15:26:24 +0000 (11:26 -0400)]
Add java backtracing and self unwinding to NEWS

*NEWS - add news blurbs

10 years agosyscall testsuite: accept4 SOCK_CLOEXEC
Frank Ch. Eigler [Mon, 28 Apr 2014 14:55:19 +0000 (10:55 -0400)]
syscall testsuite: accept4 SOCK_CLOEXEC

Add a conditional #define for RHEL5 era kernels.

10 years agosyscall testsuite test.tcl: use staprun -R for reused module
Frank Ch. Eigler [Mon, 28 Apr 2014 14:53:30 +0000 (10:53 -0400)]
syscall testsuite test.tcl: use staprun -R for reused module

It's been occasionally observed that a single syscall test case can
leave the [nd_]syscall.ko module loaded, which blocks further testing.
staprun -R can rename the .ko, to avoid the chain failure.

10 years agounprivileged_myproc testsuite: mark .callees tests kfail for gcc < 4.7
Frank Ch. Eigler [Sun, 27 Apr 2014 22:20:26 +0000 (18:20 -0400)]
unprivileged_myproc testsuite: mark .callees tests kfail for gcc < 4.7

This is a followup to commit 081e9217c8d0, this time on rhel6.

10 years agoruntime rhel6: avoid kernel crash with buildid checks for process(PID#) probes
Frank Ch. Eigler [Sun, 27 Apr 2014 21:16:29 +0000 (17:16 -0400)]
runtime rhel6: avoid kernel crash with buildid checks for process(PID#) probes

Crash observed on rhel6 (utrace -> process(NUM).statement(ADDR).absolute probes)
in unprivileged_myproc.exp test case.

* runtime/linux/uprobes-common.c (stap_uprobe_change_plus): Don't try to check
  process against _stp_module entry, if we don't even have a process pathname.
* runtime/sym.c (_stp_usermodule_check): WARN_ON incoming null pathname.

10 years agotapset: Deal with missing fs in i386/register.stp
Josh Stone [Sat, 26 Apr 2014 00:17:03 +0000 (17:17 -0700)]
tapset: Deal with missing fs in i386/register.stp

Older kernels didn't have fs in pt_regs, so the following _reg_offsets
were incorrect.  Make fs conditional on stapconf, and use a counter to
more easily keep track of the differences.

10 years agoruntime: Fix synthesized regs on ix86
Josh Stone [Sat, 26 Apr 2014 00:12:18 +0000 (17:12 -0700)]
runtime: Fix synthesized regs on ix86

The ix86 register names and offsets in the inline asm of
arch_unw_init_frame_info are now fixed, including stapconf to deal with
fs/xfs/gs changes over time.

x86_64 is updated to match the same style of access.

10 years agobuildrun: Don't bother filtering -fno-asynchonous-unwind-tables
Josh Stone [Fri, 25 Apr 2014 23:05:50 +0000 (16:05 -0700)]
buildrun: Don't bother filtering -fno-asynchonous-unwind-tables

Our -fasynchronous-unwind-tables in EXTRA_CFLAGS takes precedence just
fine over kbuild's -fno-asynchonous-unwind-tables setting.

10 years agoruntime: Extend sect_attrs use back to 2.6.11
Josh Stone [Fri, 25 Apr 2014 23:01:06 +0000 (16:01 -0700)]
runtime: Extend sect_attrs use back to 2.6.11

Only 2.6.19+ has sect_attrs->nsections, but from 2.6.11 one can count
where the NULL terminator is on sect_attrs->grp.attrs.

10 years agoruntime: Initialize _stp_module_self from THIS_MODULE
Josh Stone [Fri, 25 Apr 2014 22:25:10 +0000 (15:25 -0700)]
runtime: Initialize _stp_module_self from THIS_MODULE

By iterating the sections of THIS_MODULE directly, rather than from
STP_RELOCATION messages, we can more safely contain the eh_frame length
determination.  As an upper bound, the length can be no more than the
distance to the next section in memory.  Then when we walk fde records,
we can sanity check that the offsets make sense.

10 years agosyscalls tapset: adapt to absence of uselib(2) syscall
Frank Ch. Eigler [Fri, 25 Apr 2014 23:14:39 +0000 (19:14 -0400)]
syscalls tapset: adapt to absence of uselib(2) syscall

LKML commit 69369a70 made it possible to configure a kernel without
uselib(2) support.  Mark these tapset aliases optional so syscall.*
type probing works on !CONFIG_USELIB kernels.

10 years agoPR6961 cont'd: add a terminating 0x00000000 word to module .ko .eh_frame
Frank Ch. Eigler [Fri, 25 Apr 2014 19:46:06 +0000 (15:46 -0400)]
PR6961 cont'd: add a terminating 0x00000000 word to module .ko .eh_frame

This is necessary because now we parse our own module's .eh_frame
lightly at startup time, and must reliably find the end of the
entries.  (We don't get the crtend.o goodies from userspace.)
We also reject 8-byte extended-length cases, should they ever come up.

* session.* (op_create_auxiliary): Make possible to designate aux files
  as trailers (coming in after the main generated .o file) instead of before.
* buildrun.cxx (compile_pass): Add s.auxiliary_output trailers.
* translate.cxx (emit_symbol_data_done): T-800 returns from the future.
* runtime/sym.c (_stp_kmodule_update_address): Reject 8-byte extended-length
  fields in .eh_frame.

10 years agostmt_inlines.exp: mark untested for older GCCs
Jonathan Lebon [Fri, 25 Apr 2014 19:35:27 +0000 (15:35 -0400)]
stmt_inlines.exp: mark untested for older GCCs

The RHEL5 GCC does not output the necessary debuginfo in order to do
this test, so mark it untested.

10 years agostatement.exp: adapt for RHEL5
Jonathan Lebon [Fri, 25 Apr 2014 19:00:07 +0000 (15:00 -0400)]
statement.exp: adapt for RHEL5

In GCC < 4.4, the decl_line is the line holding the opening brace, not the
line with the identifier. Since the decl_line is the basis for relative
line number statement probes, this discrepancy was causing statement.exp
to have some RELATIVE subtest failures.

Add another empty line so that main@statement.c+4 always falls on an
empty line, regardless of which is the decl_line.

10 years agotestsuite: adapt to RHEL5
Jonathan Lebon [Fri, 25 Apr 2014 16:01:52 +0000 (12:01 -0400)]
testsuite: adapt to RHEL5

- callee.exp: set as untested if GCC or elfutils too old
- dump_functions.exp: RHEL5 exec doesn't support -ignorestderr
- dump_probe_aliases.exp: ditto

10 years agolib/systemtap.exp: add strverscmp proc
Jonathan Lebon [Fri, 25 Apr 2014 15:59:31 +0000 (11:59 -0400)]
lib/systemtap.exp: add strverscmp proc

There are times when we want to set tests as 'untested' if certain
component versions are not met. The new proc strverscmp will serve well
there.

10 years agolib/systemtap.exp: get better GCC and elfutils version info
Jonathan Lebon [Fri, 25 Apr 2014 15:53:12 +0000 (11:53 -0400)]
lib/systemtap.exp: get better GCC and elfutils version info

Rather than having the global GCC_Version hold the whole
"gcc --version | head -n 1" string, create a new GCC_FullVersion for
that and make GCC_Version only hold the raw version (e.g. "4.1.2").
This will be useful later on for version comparison.

Create new ELF_Version which holds the elfutils library version against
which SystemTap was compiled.

10 years agosyscall testsuite: syslog.c: make nonblocking
Frank Ch. Eigler [Thu, 24 Apr 2014 20:33:43 +0000 (16:33 -0400)]
syscall testsuite: syslog.c: make nonblocking

We need to use SYSLOG_ACTION_READ_ALL, not SYSLOG_ACTION_READ,
to ensure our test program quits quickly.

10 years agoChange how we assign _stp_module_self name/path to use THIS_MODULE
Lukas Berk [Thu, 24 Apr 2014 20:22:18 +0000 (16:22 -0400)]
Change how we assign _stp_module_self name/path to use THIS_MODULE

*runtime/sym.c - change _stp_module_self name/path member variables to
         be assigned using THIS_MODULE->name instead of strcpy

10 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Wed, 23 Apr 2014 21:00:58 +0000 (16:00 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

10 years agoPR16716partial fix: Fix types in syscall.{fchmod,fchown,fchownat}.
David Smith [Wed, 23 Apr 2014 21:00:31 +0000 (16:00 -0500)]
PR16716partial fix: Fix types in syscall.{fchmod,fchown,fchownat}.

*tapset/linux/syscalls.stp: Fix types in syscall.{fchmod,fchown,fchownat}.
*testsuite/systemtap.syscall/chmod.c: Added more tests.

10 years agoMerge branch 'jistone/pr16844'
Josh Stone [Wed, 23 Apr 2014 20:36:22 +0000 (13:36 -0700)]
Merge branch 'jistone/pr16844'

10 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap into lberk/backtrace
Lukas Berk [Wed, 23 Apr 2014 20:18:58 +0000 (16:18 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap into lberk/backtrace

10 years agopr16806.exp: new testcase
Jonathan Lebon [Wed, 23 Apr 2014 19:48:37 +0000 (15:48 -0400)]
pr16806.exp: new testcase

- pr16806.exp: new testcase to verify proper tracepoint unregistration
  and utrace shutdown.
- loop.c: don't call usleep() if NOSLEEP is defined. This is used by
  pr16806.exp, which requires it to make conditions more racy.
- unprivileged_myproc.exp: simplify path to C file.
- unprivileged_probes.exp: ditto.

10 years agostmt_inlines.exp: rename cleanup proc
Jonathan Lebon [Wed, 23 Apr 2014 18:55:13 +0000 (14:55 -0400)]
stmt_inlines.exp: rename cleanup proc

There is already a proc named cleanup in lib/systemtap.exp. Rename the
one in stmt_inlines.exp so we don't accidentally redefine it.

10 years agoFix typo in systemtap.spec file rpm scriptlet
Lukas Berk [Wed, 23 Apr 2014 19:59:03 +0000 (15:59 -0400)]
Fix typo in systemtap.spec file rpm scriptlet

*systemtap.spec - switch directory check condition to use '${archdir}'
  variable instead of %{archdir}

10 years agoPR16716 partial fix: Better types passed to _dfd_str() from syscall probes.
David Smith [Wed, 23 Apr 2014 19:37:51 +0000 (14:37 -0500)]
PR16716 partial fix: Better types passed to _dfd_str() from syscall probes.

* tapset/linux/syscalls.stp: Fixed calls to _dfd_str() in
  facessat, fchownat, futimesat, compat_futimesat, and linkat syscall
  probes.
  (syscall.futimesat): Added 'dirfd_str' variable. Fixed nesting.
  (syscall.compat_futimesat): Ditto.
* tapset/linux/nd_syscalls.stp (nd_syscall.futimesat): Added 'dirfd_str'
  variable. Fixed nesting.
  (nd_syscall.compat_futimesat): Ditto.
* tapset/linux/syscalls2.stp: Fixed calls to _dfd_str() in openat,
  readlinkat, renameat, symlinkat, unlinkat, and utimensat syscall
  probes.
  (syscall.openat): Added 'dfd' and 'dfd_str' variables.
  (syscall.readlinkat): Added 'dfd_str' variable.
  (syscall.utimensat): Added 'dfd', 'dfd_str', 'filename_uaddr',
  'filename', 'tsp_uaddr', 'flags', and 'flags_str' variables.
  (syscall.compat_utimensat): Ditto.
* tapset/linux/nd_syscalls2.stp (nd_syscall.openat): Added 'dfd' and
  'dfd_str' variables.
  (nd_syscall.readlinkat): Added 'dfd_str' variable.
  (nd_syscall.utimensat): Added 'dfd', 'dfd_str', 'filename_uaddr',
  'filename', 'tsp_uaddr', 'flags', and 'flags_str' variables.
  (nd_syscall.compat_utimensat): Ditto.
* tapset/linux/aux_syscalls.stp (_dfd_str): Improve to not ignore
  compatibility mode wrong value (instead, values passed in were fixed).
* runtime/linux/compat_unistd.h: Add '__NR_compat_futimesat' define.
* testsuite/systemtap.syscall/alarm.c: Add more tests.
* testsuite/systemtap.syscall/futimes.c: Ditto.
* testsuite/buildok/syscalls-detailed.stp: Added basic test for new
  variables.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.

10 years agoPR16844: Direct messages to _stp_dbug
Josh Stone [Wed, 23 Apr 2014 00:14:36 +0000 (17:14 -0700)]
PR16844: Direct messages to _stp_dbug

Adds dbug_tp(), with a new DEBUG_TRACEPOINTS flag to control verbosity.
All printk and WARNs are removed in favor of dbug_tp.

10 years agoPR16844: Use _stp_kmalloc_gfp and _stp_kfree
Josh Stone [Tue, 22 Apr 2014 21:27:26 +0000 (14:27 -0700)]
PR16844: Use _stp_kmalloc_gfp and _stp_kfree

10 years agoPR16844: Initial adaptation for kernel 3.15 tracepoints
Josh Stone [Tue, 22 Apr 2014 16:07:42 +0000 (09:07 -0700)]
PR16844: Initial adaptation for kernel 3.15 tracepoints

This hides the tracepoint version adaptations in stp_tracepoint.h.  For
older kernel versions, that header is sufficient.  With 3.15 we have to
do extra bookkeeping ourselves, so it pulls in stp_tracepoints.c, which
is borrowed almost verbatim from lttng.  It seems to work well, but we
can still decide if we want to take a different approach.

10 years agotestsuite: don't mandate presence of -m32/-m64 libc/stdc++ devel
Frank Ch. Eigler [Tue, 22 Apr 2014 21:11:00 +0000 (17:11 -0400)]
testsuite: don't mandate presence of -m32/-m64 libc/stdc++ devel

Some distros (I'm looking at you, Ubuntu 14) don't make it easy to
build several permutations of -m32 / -m64 binaries.

10 years agoCorrect the architecture for the libHelper_ppc64.so name
Lukas Berk [Tue, 22 Apr 2014 16:36:57 +0000 (12:36 -0400)]
Correct the architecture for the libHelper_ppc64.so name

*java/Makefile.am - override the java_arch name (powerpc64) with ppc64
*java/Makefile.in - generated from an autoreconf

10 years agostmt_inlines.exp: testcase for statement probes in inlines
Jonathan Lebon [Tue, 22 Apr 2014 16:16:49 +0000 (12:16 -0400)]
stmt_inlines.exp: testcase for statement probes in inlines

This testcase verifies our ability to place probes on statements in
functions that have been inlined multiple times.

10 years agostatement.exp and stmt_rel.exp: a few tweaks
Jonathan Lebon [Fri, 18 Apr 2014 04:49:20 +0000 (00:49 -0400)]
statement.exp and stmt_rel.exp: a few tweaks

- stmt_rel.exp: small fix
- statement.exp: test a few more things

10 years agocallee.exp: fix inline compilation
Jonathan Lebon [Tue, 22 Apr 2014 15:08:30 +0000 (11:08 -0400)]
callee.exp: fix inline compilation

GCC won't emit a warning if we also use the inline keyword.

10 years agostapprobes.3stap: give @defined() hint for $return
Jonathan Lebon [Tue, 22 Apr 2014 14:49:14 +0000 (10:49 -0400)]
stapprobes.3stap: give @defined() hint for $return

10 years agoPR16716 partial fix: Better types in 'syscall.{access,faccessat}'.
David Smith [Tue, 22 Apr 2014 15:32:05 +0000 (10:32 -0500)]
PR16716 partial fix: Better types in 'syscall.{access,faccessat}'.

* tapset/linux/syscalls.stp: Fix 'mode' variable type in
  'syscall.{access,faccessat}'.
* tapset/linux/aux_syscall.stp: Convert to use _stp_lookup_or_str().
* testsuite/systemtap.syscall/access.c (main): Add tests.

10 years agosession.cxx: print found System.map file name for report, not first one tried
Frank Ch. Eigler [Tue, 22 Apr 2014 15:06:50 +0000 (11:06 -0400)]
session.cxx: print found System.map file name for report, not first one tried

10 years agosession.cxx: also print kernel_functions[] sizes at -vvv verbosity
Frank Ch. Eigler [Tue, 22 Apr 2014 15:04:54 +0000 (11:04 -0400)]
session.cxx: also print kernel_functions[] sizes at -vvv verbosity

10 years agoStapbm uses netstat, require it for runtime-java
Lukas Berk [Tue, 22 Apr 2014 14:32:36 +0000 (10:32 -0400)]
Stapbm uses netstat, require it for runtime-java

*systemtap.spec - require net-tools for netstat use in stapbm/runtime-java

10 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Tue, 22 Apr 2014 13:43:26 +0000 (08:43 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

10 years agoPR16716 partial fix: Better types in 'syscall.{swapon,syslog}'.
David Smith [Tue, 22 Apr 2014 13:42:59 +0000 (08:42 -0500)]
PR16716 partial fix: Better types in 'syscall.{swapon,syslog}'.

* tapset/linux/syscalls2.stp: Fix types in 'syscall.syslog' and
  'syscall.swapon'. In 'syscall.swapon', decode the flags in the new
  'swapflags' variable.
* tapset/linux/nd_syscalls2.stp: In 'nd_syscall.swapon', decode the flags
  in the new 'swapflags' variable.
* tapset/linux/aux_syscalls.stp (_swapon_flags_str): New function.
* tapset/uconversions.stp (user_string_n2_quoted): If we're in a compat
  task, when printing the pointer value as a number, don't expand it to
  64-bits.
* testsuite/systemtap.syscall/swap.c: Added more tests.
* testsuite/systemtap.syscall/syslog.c: New test case.
* testsuite/buildok/syscalls2-detailed.stp: Added new 'swapflags' variable.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.

10 years agoAdd python support tapset example.
Stan Cox [Tue, 22 Apr 2014 13:37:16 +0000 (09:37 -0400)]
Add python support tapset example.

* systemtap.examples/general/tapset/(python2.stp,python3.stp,python.stpm): Python support tapset
* systemtap.examples/general/(pyexample.meta,pyexample.stp,pyexample.py):  Use it.

10 years agoPR16716 partial fix: Better types in 'syscall.{getpriority,setpriority}'.
David Smith [Mon, 21 Apr 2014 18:43:33 +0000 (13:43 -0500)]
PR16716 partial fix: Better types in 'syscall.{getpriority,setpriority}'.

* tapset/linux/syscalls.stp: Fix types in 'syscall.getpriority'.
* tapset/linux/syscalls2.stp: Fix types in 'syscall.setpriority'.
* tapset/linux/aux_syscalls.stp (_priority_which_str): Convert to use
  _stp_lookup_str().
* testsuite/systemtap.syscall/getpriority.c: New test case.
* testsuite/systemtap.syscall/setpriority.c: Ditto.

10 years agoPR16716 partial fix: Better types in 'syscall.{getpgid,reboot,setpgid}'.
David Smith [Mon, 21 Apr 2014 17:52:26 +0000 (12:52 -0500)]
PR16716 partial fix: Better types in 'syscall.{getpgid,reboot,setpgid}'.

* tapset/linux/syscalls.stp: Fix types in 'syscall.getpgid'.
* tapset/linux/syscalls2.stp: Fix types in 'syscall.reboot' and
  'syscall.setpgid'.
* tapset/linux/x86_64/syscalls.stp: Fix nesting in 'syscall.mmap2'.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_reboot_magic_str): Convert to use
  _stp_lookup_str().
  (_reboot_flag_str): Ditto.
* runtime/linux/compat_unistd.h: Added mmap2 defines.
* testsuite/systemtap.syscall/pgid.c (main): Add more tests.
* testsuite/systemtap.syscall/reboot.c: New test case.

10 years agotapset: set _shutdown_how_str and _madvice_advice_str :string
Josh Stone [Fri, 18 Apr 2014 01:27:01 +0000 (18:27 -0700)]
tapset: set _shutdown_how_str and _madvice_advice_str :string

These were failing buildok/aux_syscalls-embedded.stp, because print()
can't figure out their types implicitly.

10 years agotapset: mark _sched_policy_str() as pure and :string
Josh Stone [Fri, 18 Apr 2014 01:14:06 +0000 (18:14 -0700)]
tapset: mark _sched_policy_str() as pure and :string

This was causing issues in any script that pulled in aux_syscalls, but
didn't use _sched_policy_str().  Since it wasn't pure, it couldn't be
elided, and since it wasn't explicitly declared :string, there was no
type deduction to define its STAP_RETVALUE.

10 years agotestsuite: tighten warn_overflow.exp verbosity to just pass-5
Josh Stone [Fri, 18 Apr 2014 01:14:57 +0000 (18:14 -0700)]
testsuite: tighten warn_overflow.exp verbosity to just pass-5

10 years agotestsuite: don't mix -p2 and -l in labels.exp
Josh Stone [Fri, 18 Apr 2014 00:54:01 +0000 (17:54 -0700)]
testsuite: don't mix -p2 and -l in labels.exp

Since commit bba368c5c5fea, -p2 and -l are exclusive options, even
though internally they are similar.

Furthermore, "labels exe .statement" and "labels so .statement" had this
failure masked, because they were looking for the absence of the error
"semantic error: no match" rather than the presence of actual matches.
Thus the option-validating error didn't trigger failure before.

10 years agoPrevent lock-recursion in _stp_ctl_send
Josh Stone [Thu, 17 Apr 2014 21:32:40 +0000 (14:32 -0700)]
Prevent lock-recursion in _stp_ctl_send

In rare cases, we may hit a probe while the transport layer is holding a
spinlock, and that probe may call _stp_ctl_send which tries to grab the
same and deadlocks.  This is a bit easier to trigger on lockdep-enabled
kernels with the lock_acquired tracepoint.

This patch refactors the context->busy state management into get/put
context, and those areas which grab probe-sensitive locks now wrap
themselves with a context to stay comfortably free of probes.

Tangentially, the dyninst side abandons the busy flag, as it already had
a tls_context pointer to prevent direct recursion and a mutex for
exclusive access across all processes.

DEBUG_REENTRANCY is an unfortunate casualty, because we can't safely
call _stp_warn when the busy context may be from those held locks.

10 years agoNEWS: add blurb re. statement probes
Jonathan Lebon [Thu, 17 Apr 2014 21:43:29 +0000 (17:43 -0400)]
NEWS: add blurb re. statement probes

10 years agoMerge branch 'jlebon/pr16615'
Jonathan Lebon [Thu, 17 Apr 2014 21:42:52 +0000 (17:42 -0400)]
Merge branch 'jlebon/pr16615'

10 years agostmt_rel.exp: improve coverage
Jonathan Lebon [Thu, 17 Apr 2014 21:34:24 +0000 (17:34 -0400)]
stmt_rel.exp: improve coverage

The testcase previously only tested that specific relative linenos in
bio_init() were valid and that there were at least 3 linenos available
for probing.

We now improve this test by checking that probes listed by the wildcard
lineno are all accessible by relative numbering as well. As a sanity
check, we check that bio_init() has at least 3 linenos available, as
before.

10 years agostmt_rel_user.exp: generalize it
Jonathan Lebon [Thu, 17 Apr 2014 21:32:44 +0000 (17:32 -0400)]
stmt_rel_user.exp: generalize it

Since only stmt_rel_user.exp uses stmt_rel.c, it's more fitting to
rename it and make the testcase refer to it in a more general way.

10 years agotestsuite: adapt to new statement probes
Jonathan Lebon [Thu, 17 Apr 2014 18:05:38 +0000 (14:05 -0400)]
testsuite: adapt to new statement probes

- implicitptr.exp: set lineno to 13. 7 falls outside the function.
- library.stp: adjust relative lineno
- stmt_rel_user.exp: ditto

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