]> sourceware.org Git - systemtap.git/log
systemtap.git
9 years agoexamples index: add link to .txt "sample usage" files
Frank Ch. Eigler [Fri, 13 Feb 2015 22:48:05 +0000 (17:48 -0500)]
examples index: add link to .txt "sample usage" files

9 years agolinetimes sample: revise, add sample screenshot, _bestify
Frank Ch. Eigler [Fri, 13 Feb 2015 22:41:41 +0000 (17:41 -0500)]
linetimes sample: revise, add sample screenshot, _bestify

The callgraph-printing logic is much simplified by the recent addition
of array-slice operations.

9 years agonew files for example output from _best example scripts
Abegail Jakop [Fri, 13 Feb 2015 22:24:05 +0000 (17:24 -0500)]
new files for example output from _best example scripts

9 years agoBZ1128209: add a configure --{enable,disable}-virt option
Frank Ch. Eigler [Fri, 13 Feb 2015 15:31:32 +0000 (10:31 -0500)]
BZ1128209: add a configure --{enable,disable}-virt option

It was desirable that a systemtap rpm be buildable in a predictable
manner (in this case, without virthost support), even if prerequisites
(libvirt etc.) were accidentally installed.

9 years agostap.1: tweak SAFETY AND SECURITY section
Frank Ch. Eigler [Fri, 13 Feb 2015 15:07:38 +0000 (10:07 -0500)]
stap.1: tweak SAFETY AND SECURITY section

Reorganized to emphasize translate- and run-time checks at the top.

9 years agoPR17966: never generate .call for an unresolved .return $var
Josh Stone [Fri, 13 Feb 2015 02:06:54 +0000 (18:06 -0800)]
PR17966: never generate .call for an unresolved .return $var

The saved-return code already skipped .call for any $var that generated
an error, but variables attempted in a symtab context don't generate
errors until later.  This means a @defined-guarded $var might create an
unguarded access in .call that causes unrecoverable errors further on.

Now the .call will be skipped if the target_symbol persists for any
reason, regardless of its error state.  Any resolved target_symbol
should become something quite different, usually a loc2c function call.

The minidebuginfo.exp test is extended to exercise @defined and .return
scenarios as well.

9 years agoruntime/linux: block utrace-via-tracepoints without tracepoints
Josh Stone [Thu, 12 Feb 2015 21:45:15 +0000 (13:45 -0800)]
runtime/linux: block utrace-via-tracepoints without tracepoints

The code in autoconf-utrace-via-tracepoints.c will compile just fine on
kernels which do have those tracepoints, but not CONFIG_TRACEPOINTS=y.
That would only result in ENOSYS at runtime.

To get this autoconf working at compile time, check the config directly.

Reported-by: Crestez Dan Leonard <cdleonard@gmail.com>
9 years agoTweak a couple of syscall test cases.
David Smith [Wed, 11 Feb 2015 19:10:20 +0000 (13:10 -0600)]
Tweak a couple of syscall test cases.

* testsuite/systemtap.syscall/shutdown.c: Fix typo.
* testsuite/systemtap.syscall/module.c: Tweak to avoid an OOM error on
  ppc64.

9 years agoMake fileline-profile.stp executable
William Cohen [Wed, 11 Feb 2015 15:05:17 +0000 (10:05 -0500)]
Make fileline-profile.stp executable

9 years agoUpdate the keyctl.c testcase so that it can also be run using sudo.
Martin Cermak [Wed, 11 Feb 2015 09:20:36 +0000 (10:20 +0100)]
Update the keyctl.c testcase so that it can also be run using sudo.

9 years agogcc5 -Wformat=2 tweaks, x86-64 on rawhide edition
Frank Ch. Eigler [Wed, 11 Feb 2015 00:33:41 +0000 (19:33 -0500)]
gcc5 -Wformat=2 tweaks, x86-64 on rawhide edition

And a few more crawl out from between one's toes ...

9 years agogcc5 -Wformat=2 tweaks, x86-64 edition
Frank Ch. Eigler [Wed, 11 Feb 2015 00:21:21 +0000 (19:21 -0500)]
gcc5 -Wformat=2 tweaks, x86-64 edition

inttypes.h print-format macros vs. types, round too, 64-bit edition

9 years agogcc5 -Wformat=2 tweaks
Frank Ch. Eigler [Tue, 10 Feb 2015 22:42:35 +0000 (17:42 -0500)]
gcc5 -Wformat=2 tweaks

-Wformat=2 now includes -Wformat=signedness, which sadly some of our
violates.  Correct this throughout with some casts. In the case of
stapdyn, we downgrade to -Wformat=1 due to problems with
dyninst-devel.

Regenerate auto* configury on fedora rawhide, since automake was
complaining about needing "subdir-objects" in AUTOMAKE_OPTIONS.

9 years agoFix PR17951 by fixing nesting in several syscall socketcall-based probes.
David Smith [Tue, 10 Feb 2015 21:31:40 +0000 (15:31 -0600)]
Fix PR17951 by fixing nesting in several syscall socketcall-based probes.

* tapset/linux/syscalls.stp: Fix syscall nesting in syscall.{bind,
  connect, getpeername, getsockname, listen}.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Fix syscall nesting in syscall.{recvmsg,
  send, sendmsg, shutdown, socket, socketpair}.
* tapset/linux/nd_syscalls2.stp: Ditto.
* runtime/linux/compat_unistd.h: Correct __NR_ia32_fchown32 value. Add
  __NR_bind, __NR_connect, __NR_getpeername, __NR_getsockname,
  __NR_listen, __NR_recvmsg, __NR_send, __NR_sendmsg, __NR_shutdown,
  __NR_socket, and __NR_socketpair.

9 years agoPR16716 partial fix: Fix syscall nesting in 'syscall.{chown,fchown,lchown}'.
David Smith [Tue, 10 Feb 2015 16:04:10 +0000 (10:04 -0600)]
PR16716 partial fix: Fix syscall nesting in 'syscall.{chown,fchown,lchown}'.

* tapset/linux/syscalls.stp: Fix x86/x86_64 syscall nesting in
  syscall.{chown,fchown,lchown}.
* tapset/linux/nd_syscalls.stp: Ditto.
* runtime/linux/compat_unistd.h: Added __NR_ia32_chown32,
  __NR_ia32_fchown32, and __NR_ia32_lchown32.

9 years agoMake all socketcall.connect probes optional.
William Cohen [Tue, 10 Feb 2015 12:36:51 +0000 (07:36 -0500)]
Make all socketcall.connect probes optional.

Both 32-bit and 64-bit arm do not implement syscall socketcall.  A
number of tests were failing on those architectures because two of the
syscall socketcall return probes were not optional.  Made those two
syscall socketcall variants optional like all the others.

9 years agoFix PR17928 - syscall tapset/testsuite problems (on a newer 32-bit kernel) (2)
William Cohen [Mon, 9 Feb 2015 22:23:13 +0000 (17:23 -0500)]
Fix PR17928 - syscall tapset/testsuite problems (on a newer 32-bit kernel) (2)

* tapset/linux/syscalls2.stp {sys_recv, sys_recvfrom}
* testsuite/systemtap.syscall/keyctl.c: Added 32-bit fix
* testsuite/systemtap.syscall/recv.c: Ditto
* testsuite/systemtap.syscall/send.c: Ditto
* testsuite/systemtap.syscall/sendmsg.c: Ditto

9 years agoFix PR17928 - syscall tapset/testsuite problems (on a newer 32-bit kernel).
William Cohen [Mon, 9 Feb 2015 16:03:09 +0000 (11:03 -0500)]
Fix PR17928 - syscall tapset/testsuite problems (on a newer 32-bit kernel).

* tapset/linux/syscalls.stp: Fix types in syscall.{chmod, fchmod, fchmodat}

9 years agoThe 32-bit arm does not remap epoll_wait or poll syscalls
William Cohen [Sat, 7 Feb 2015 05:42:07 +0000 (00:42 -0500)]
The 32-bit arm does not remap epoll_wait or poll syscalls

The poll test was failing because the test was expecting the 32-bit
arm processor to remap the epoll_wait syscall to epoll_pwait and to
remap the poll syscall to ppoll.  Only the arm64 is remapping those
syscalls.

9 years agoDo not expect that alarm(-1) to work for the syscall alarm.c test
William Cohen [Sat, 7 Feb 2015 04:15:17 +0000 (23:15 -0500)]
Do not expect that alarm(-1) to work for the syscall alarm.c test

Setting a alarm for a time in the past (alarm(-1)) doesn't make much
sense.  Some kernels allow this and do not flag an error.  Others such
as the Fedora 20 32-bit ARM kernel return -EINVAL.  Allow the
syscall alarm test to pass with kernels that do return an error.

9 years agoFix PR17928 - syscall tapset/testsuite problems (on a newer 32-bit kernel).
David Smith [Fri, 6 Feb 2015 20:57:51 +0000 (14:57 -0600)]
Fix PR17928 - syscall tapset/testsuite problems (on a newer 32-bit kernel).

* tapset/linux/syscalls.stp: Fix types in syscall.{add_key, alarm,
  fgetxattr, fstatfs64, getrandom, getxattr, init_module, lgetxattr,
  listxattr, llistxattr, lsetxattr, lstat, madvise, mlock,
  modify_ldt, mmap2, mq_timedsend, msgrcv, msgsnd, msync, munmap}.
  Fix types and add 32-bit kernel support via socketcall in
  syscall.{bind, connect, getpeername, getsockname, listen}.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Fix types and add 32-bit kernel support via
  socketcall in syscall.{recvmsg, send, sendmsg, sendmmsg, shutdown,
  socket, socketpair}. Fix types in syscall.{sendfile, sendto, setxattr,
  shmget, statfs64}.
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Fixed typos.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/modify_ldt.c: New testcase.
* testsuite/systemtap.syscall/inotify.c: Added 32-bit fix.
* testsuite/systemtap.syscall/mq.c: Ditto.
* testsuite/systemtap.syscall/recvfrom.c: Ditto.
* testsuite/systemtap.syscall/recvmmsg.c: Ditto.
* testsuite/systemtap.syscall/recvmsg.c: Ditto.
* testsuite/systemtap.syscall/sendmmsg.c: Ditto.
* testsuite/systemtap.syscall/sendto.c: Ditto.
* testsuite/systemtap.syscall/memfd_create.c: Fixed compile problem.
* testsuite/systemtap.syscall/nfsservctl.c: Ditto.
* testsuite/systemtap.syscall/shutdown.c: Ditto.
* testsuite/systemtap.syscall/sigmask.c: Ditto.

9 years agoPR16716 partial fix: Fix types for 'syscall.prctl'.
David Smith [Fri, 6 Feb 2015 19:51:50 +0000 (13:51 -0600)]
PR16716 partial fix: Fix types for 'syscall.prctl'.

* tapset/linux/aux_syscalls.stp (_prctl_argstr): New function.
* tapset/linux/syscalls2.stp (syscall.prctl): Fixed types and calls
  _prctl_argstr().
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/systemtap.syscall/coverage.tcl: Updated bad syscall list.
* testsuite/systemtap.syscall/prctl.c: New test case.
* testsuite/buildok/aux_syscalls-embedded.stp: Added new test.

9 years agoThis patch fix spelling typo in stap.1 and stap-server.8
Masanari Iida [Fri, 6 Feb 2015 19:43:21 +0000 (14:43 -0500)]
This patch fix spelling typo in stap.1 and stap-server.8

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
9 years agoNEWS blurb about symfileline() and related functions
Abegail Jakop [Fri, 6 Feb 2015 16:00:53 +0000 (11:00 -0500)]
NEWS blurb about symfileline() and related functions

9 years agoMerge branch 'ajakop/12276' of ssh://sourceware.org/git/systemtap into ajakop/12276
Abegail Jakop [Fri, 6 Feb 2015 15:47:47 +0000 (10:47 -0500)]
Merge branch 'ajakop/12276' of ssh://sourceware.org/git/systemtap into ajakop/12276

Conflicts:
runtime/unwind/unwind.h

9 years agoPR12276: example usages of symfileline() to profile
Abegail Jakop [Thu, 5 Feb 2015 21:30:27 +0000 (16:30 -0500)]
PR12276: example usages of symfileline() to profile

EXAMPLE/profiling/periodic.stp: for the case of printing out symdata for a
kernel address, if file:line information is available, then print out the
symbol@file:line information.

EXAMPLE/profiling/fileline-profile.*: use symfileline() and symname(),
or symdata if file:line info is not available, to print out information
on the top 20 addresses sampled from when the stap script was running.

9 years agoPR12276: add runtime check for specified address len
Abegail Jakop [Thu, 5 Feb 2015 21:17:00 +0000 (16:17 -0500)]
PR12276: add runtime check for specified address len

9 years agoPR12276: more debug_line traversal checks during runtime
Abegail Jakop [Tue, 3 Feb 2015 15:37:54 +0000 (10:37 -0500)]
PR12276: more debug_line traversal checks during runtime

9 years agoPR12276: fix debug_line linenum and address calcs
Abegail Jakop [Mon, 2 Feb 2015 23:15:48 +0000 (18:15 -0500)]
PR12276: fix debug_line linenum and address calcs

9 years agoPR12276: check all sequences in _stp_linenumber_lookup
Abegail Jakop [Mon, 2 Feb 2015 23:05:47 +0000 (18:05 -0500)]
PR12276: check all sequences in _stp_linenumber_lookup

runtime/sym.c: addresses can only increase within a sqeunce, but at the
start of the new sequence, the starting address can be lower than the
previous'. _stp_linenumber_lookup() was changed to iterate through all
sequences until a suitable address is found, instead of giving up when
the line data address passes the desired address.

9 years agoPR12276: fix line numbers to match in usymfileline.exp
Abegail Jakop [Mon, 2 Feb 2015 21:56:14 +0000 (16:56 -0500)]
PR12276: fix line numbers to match in usymfileline.exp

9 years agoPR12276: compare symfileline() with pp()
Abegail Jakop [Wed, 28 Jan 2015 16:43:46 +0000 (11:43 -0500)]
PR12276: compare symfileline() with pp()

[u]symfileline.*: added a test that uses *.statement(*@*:*) probes to
compare the return from [u]symfileline() with the @file:line portion of pp()

9 years agoPR12276: expect path+file in [u]symfile[line] tests
Abegail Jakop [Tue, 27 Jan 2015 19:22:55 +0000 (14:22 -0500)]
PR12276: expect path+file in [u]symfile[line] tests

9 years agoPR12276: symfile[line]() return path and filename
Abegail Jakop [Tue, 27 Jan 2015 18:51:23 +0000 (13:51 -0500)]
PR12276: symfile[line]() return path and filename

sym.c: changed the filename gathering portion from _stp_linenumber_lookup()
to collect the directory information and include that with the returned
filename. moved the filename gathering portion to its own function,
_stp_filename_lookup()

9 years agoPR12276: fix comparison in dump_line_tables_check()
Abegail Jakop [Fri, 23 Jan 2015 16:57:57 +0000 (11:57 -0500)]
PR12276: fix comparison in dump_line_tables_check()

9 years agoPR12276: correct checks in dump_line_tables_check()
Abegail Jakop [Thu, 22 Jan 2015 20:28:50 +0000 (15:28 -0500)]
PR12276: correct checks in dump_line_tables_check()

9 years agoPR12276: add ifdef when assigning _stp_module.debug_line
Abegail Jakop [Wed, 14 Jan 2015 17:31:17 +0000 (12:31 -0500)]
PR12276: add ifdef when assigning _stp_module.debug_line

9 years agoPR12276: fix inital line data check to check all units
Abegail Jakop [Wed, 14 Jan 2015 17:22:24 +0000 (12:22 -0500)]
PR12276: fix inital line data check to check all units

translate.cxx: encase the majority of dump_line_tables_check() in a while
loop to check all of the units/line number programs instead of only
the first unit/line number program

9 years agoPR12276: perform initial checks on debug_line data
Abegail Jakop [Wed, 7 Jan 2015 21:30:23 +0000 (16:30 -0500)]
PR12276: perform initial checks on debug_line data

translate.cxx: during translation, check that most of the line data
header looks fine. checks dont cover directory or file name table.

9 years agoPR12276: tests for symfileline and related
Abegail Jakop [Wed, 31 Dec 2014 15:22:11 +0000 (10:22 -0500)]
PR12276: tests for symfileline and related

[u]context-symbols-embedded.stp: check that [u]symfileline() and
the related tapset functions build without issues
usymfileline.*: tests usymfileline(), usymfile(), and usymline() with
and without debug_line info
symfileline.*: tests symfileline(), symfile() and symline() with
an valid address from the kernel module set up in context.exp
context.exp: add symfileline to list of tests to be run

9 years agoPR12276: add functions [u]symfile and [u]symline
Abegail Jakop [Mon, 22 Dec 2014 21:58:44 +0000 (16:58 -0500)]
PR12276: add functions [u]symfile and [u]symline

runtime/sym.c: in _stp_snprint_addr(), add in the ability to return
the linenumber or the filename.
tapset/linux/[u]context-symbols.stp: added functions [u]symline and
[u]symfile. fixed spelling mistake with pragma:myproc-unprivileged

9 years agoPR12276: fix addr adjustment for symfileline()
Abegail Jakop [Mon, 22 Dec 2014 20:04:34 +0000 (15:04 -0500)]
PR12276: fix addr adjustment for symfileline()

runtime/sym*: adjust the given address to account for the load offset
runtime/transport/symbols.c: include the body of _stp_module_update_self()
if STP_NEED_LINE_DATA so that the sec_load_offset can be updated
tapset/linux/context-symbols.stp: remove the pragma myproc-unpriveleged
since it's spelled wrong, and it's not needed anyways
translate.cxx: add funtion find_debug_frame_offset() to set the
sec_load_offset for the ".text" section

9 years agoPR12276: debug_line data decoder
Abegail Jakop [Thu, 11 Dec 2014 20:20:44 +0000 (15:20 -0500)]
PR12276: debug_line data decoder

runtime/sym.c: have _stp_linenumber_lookup() go through the
debug_line info and determine if the given address corresponds
to a line number (and a file name).

9 years agoPR12276: constant definitions and moved functions
Abegail Jakop [Tue, 9 Dec 2014 20:58:17 +0000 (15:58 -0500)]
PR12276: constant definitions and moved functions

unwind.*: moved function and constant definitions related to read_pointer()
from unwind.c to unwind/unwind.h for use by the debug_line decoder
sym.*: include the unwind header file and add in constants for decoding
opcodes within the debug_line decoder

9 years agoPR12276: [u]symfileline() tapset functions
Abegail Jakop [Tue, 9 Dec 2014 19:29:10 +0000 (14:29 -0500)]
PR12276: [u]symfileline() tapset functions

runtime/sym.c: added the portion to print out the file name and line
number of the given address

9 years agoPR12276: pragma:lines sets need_lines, not need_symbols
Abegail Jakop [Fri, 5 Dec 2014 20:55:30 +0000 (15:55 -0500)]
PR12276: pragma:lines sets need_lines, not need_symbols

9 years agoPR12276: dump debug_line data to generated header
Abegail Jakop [Fri, 5 Dec 2014 15:15:37 +0000 (10:15 -0500)]
PR12276: dump debug_line data to generated header

elaborate.cxx: set a flag to indicate debug_line data is needed if
pragma:lines was found in embedded code
translate.cxx: gather debug_line data if it is needed and can be accessed.
if the data was gathered, output it to the generated header file

9 years agoPR12276: example usages of symfileline() to profile
Abegail Jakop [Thu, 5 Feb 2015 21:30:27 +0000 (16:30 -0500)]
PR12276: example usages of symfileline() to profile

EXAMPLE/profiling/periodic.stp: for the case of printing out symdata for a
kernel address, if file:line information is available, then print out the
symbol@file:line information.

EXAMPLE/profiling/fileline-profile.*: use symfileline() and symname(),
or symdata if file:line info is not available, to print out information
on the top 20 addresses sampled from when the stap script was running.

9 years agoPR12276: add runtime check for specified address len
Abegail Jakop [Thu, 5 Feb 2015 21:17:00 +0000 (16:17 -0500)]
PR12276: add runtime check for specified address len

9 years agoActually add changes meant for commit cfdd554.
David Smith [Wed, 4 Feb 2015 21:57:55 +0000 (15:57 -0600)]
Actually add changes meant for commit cfdd554.

* tapset/linux/syscalls.stp (syscall.kill): Fix types.
* tapset/linux/syscalls2.stp (syscall.quotactl): Fix types and add 32-bit
  support.
  (syscall.wait4): Fix nesting.
  (syscall.waitid): Add 32-bit support.
  (syscall.waitpid): New probe.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_adjtx_mode_str): Deprecate unused function.
  (_statfs_f_type_str): Ditto.
  (_waitid_opt_str): Deprecated, since the difference between it and
  _wait4_opt_str() was unnecessary.
  (_internal_wait_opt_str): Deprecated since no longer necessary.
  (_flock_cmd_str): Reworked and updated.
  (_wait4_opt_str): Ditto.
  (_waitid_which_str): Ditto.
  (_quotactl_cmd_str): Ditto.
* NEWS: Mention deprecated functions.
* runtime/linux/compat_unistd.h: Added __NR_compat_wait4.
* testsuite/buildok/aux_syscalls-embedded.stp: Updated.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/clone.c: Ditto.
* testsuite/systemtap.syscall/flock.c: Ditto.
* testsuite/systemtap.syscall/getrandom.c: Ditto.
* testsuite/systemtap.syscall/wait4.c: Ditto.
* testsuite/systemtap.syscall/test.tcl: Make more robust.
* testsuite/systemtap.syscall/module.c: Handle s390.

9 years agoPR16716 partial fix: Fix types for 'syscall.{kill,quotactl,wait{4,id,pid}}'.
David Smith [Tue, 3 Feb 2015 16:21:02 +0000 (10:21 -0600)]
PR16716 partial fix: Fix types for 'syscall.{kill,quotactl,wait{4,id,pid}}'.

* tapset/linux/syscalls.stp (syscall.kill): Fix types.
* tapset/linux/syscalls2.stp (syscall.quotactl): Fix types and add 32-bit
  support.
  (syscall.wait4): Fix nesting.
  (syscall.waitid): Add 32-bit support.
  (syscall.waitpid): New probe.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_adjtx_mode_str): Deprecate unused function.
  (_statfs_f_type_str): Ditto.
  (_waitid_opt_str): Deprecated, since the difference between it and
  _wait4_opt_str() was unnecessary.
  (_internal_wait_opt_str): Deprecated since no longer necessary.
  (_flock_cmd_str): Reworked and updated.
  (_wait4_opt_str): Ditto.
  (_waitid_which_str): Ditto.
  (_quotactl_cmd_str): Ditto.
* NEWS: Mention deprecated functions.
* runtime/linux/compat_unistd.h: Added __NR_compat_wait4.
* testsuite/buildok/aux_syscalls-embedded.stp: Updated.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/clone.c: Ditto.
* testsuite/systemtap.syscall/flock.c: Ditto.
* testsuite/systemtap.syscall/getrandom.c: Ditto.
* testsuite/systemtap.syscall/wait4.c: Ditto.
* testsuite/systemtap.syscall/test.tcl: Make more robust.
* testsuite/systemtap.syscall/kill.c: New test.
* testsuite/systemtap.syscall/quotactl.c: Ditto.
* testsuite/systemtap.syscall/wait.c: Ditto.

9 years agoPR12276: more debug_line traversal checks during runtime
Abegail Jakop [Tue, 3 Feb 2015 15:37:54 +0000 (10:37 -0500)]
PR12276: more debug_line traversal checks during runtime

9 years agoPR12276: fix debug_line linenum and address calcs
Abegail Jakop [Mon, 2 Feb 2015 23:15:48 +0000 (18:15 -0500)]
PR12276: fix debug_line linenum and address calcs

9 years agoruntime/unwind.c: advance data pointer in get_sleb128()
Abegail Jakop [Tue, 3 Feb 2015 14:30:09 +0000 (09:30 -0500)]
runtime/unwind.c: advance data pointer in get_sleb128()

9 years agoPR12276: check all sequences in _stp_linenumber_lookup
Abegail Jakop [Mon, 2 Feb 2015 23:05:47 +0000 (18:05 -0500)]
PR12276: check all sequences in _stp_linenumber_lookup

runtime/sym.c: addresses can only increase within a sqeunce, but at the
start of the new sequence, the starting address can be lower than the
previous'. _stp_linenumber_lookup() was changed to iterate through all
sequences until a suitable address is found, instead of giving up when
the line data address passes the desired address.

9 years agoPR12276: fix line numbers to match in usymfileline.exp
Abegail Jakop [Mon, 2 Feb 2015 21:56:14 +0000 (16:56 -0500)]
PR12276: fix line numbers to match in usymfileline.exp

9 years agoFix the hw_watch_addr.stp test to properly test for kernel support
William Cohen [Mon, 2 Feb 2015 04:02:01 +0000 (23:02 -0500)]
Fix the hw_watch_addr.stp test to properly test for kernel support

The check for kernel support uses perf and perf needs to just have the
address to watch.  There was additional output on the line from
/proc/kallsyms causing the test to fail. Used awk to extract only the
numerical address from the line.

9 years agoFix the hw_watch_sym.stp test to properly test for kernel support
William Cohen [Mon, 2 Feb 2015 02:21:24 +0000 (21:21 -0500)]
Fix the hw_watch_sym.stp test to properly test for kernel support

The check for kernel support uses perf and perf needs to just have the
address to watch.  There was additional output on the line from
/proc/kallsyms causing the test to fail. Used awk to extract only the
numerical address from the line.

9 years agoAdd missing "'" to pingpong.meta for proper check for support
William Cohen [Mon, 2 Feb 2015 01:53:42 +0000 (20:53 -0500)]
Add missing "'" to pingpong.meta for proper check for support

9 years agoMatch more 32-bit ARM variants for sdt_misc.exp
William Cohen [Mon, 2 Feb 2015 01:16:54 +0000 (20:16 -0500)]
Match more 32-bit ARM variants for sdt_misc.exp

On 32-bit ARM The target names may be things like
armv7l-unknown-linux-gnueabihf.  The target test would miss these
types of tuples because the tuple had something other than just "arm".
The tests have been broaden to allow for these other arm variants.

9 years agoFixed systemtap-server.exp
William Cohen [Fri, 30 Jan 2015 22:38:43 +0000 (17:38 -0500)]
Fixed systemtap-server.exp

When certain systemtap-service.exp tests failed the failure would
cause the script to exit early due to an error and omit the remaining
tests due to a missing "global test".  Added the missing statement.
Now the failures are reported and the rest of the tests are run.

9 years agoPR17749: add subtest to global_end.exp
Jonathan Lebon [Mon, 26 Jan 2015 19:19:59 +0000 (14:19 -0500)]
PR17749: add subtest to global_end.exp

Make a new test script checking all the ways in which a variable should
be marked as used.

Note that there are other places in which a var should be marked used
(e.g. stat_op), but they would need to be nested within a context which
already marks nested symbols as used (e.g. in an if() condition). Unless
it's placed on a line by itself, in which case it doesn't matter because
it would get elided as a side-effect-free expr.

9 years agoPR17749: varuse visitor: account for all ways vars are used
Jonathan Lebon [Mon, 12 Jan 2015 20:27:10 +0000 (15:27 -0500)]
PR17749: varuse visitor: account for all ways vars are used

Ensures that vars are marked as used in the following situations:
- if conditions
- for/while loop conditions
- function call arguments
- return statements
- foreach array slices
- foreach limit
- ternary expression conditions
- arrayindex indexes

Also fixes all the variables in a function marked as used if called from
an lvalue context.

9 years agoAllow utrace_syscall_args.stp to accepts arm64 use of syscall.openat
William Cohen [Fri, 30 Jan 2015 15:45:03 +0000 (10:45 -0500)]
Allow utrace_syscall_args.stp to accepts arm64 use of syscall.openat

The arm64 maps open syscalls to openat syscalls.  Tweaked the
testsuite to also look for the openat syscalls so things work on
arm64.

9 years agoRemove the "-m64" option forr arm64 sdt_misc.exp tests
William Cohen [Thu, 29 Jan 2015 17:56:45 +0000 (12:56 -0500)]
Remove the "-m64" option forr arm64 sdt_misc.exp tests

The arm64 code is always 64-bit, never 32-bit. Tthe gcc compiler does
not have a "-m64" option to force 64-bit code generation for arm64 and
the builds will fail with "-m64" on the command line.  Eliminated the
unwanted option from the sdt_misc.exp tests when running on arm64.

9 years agoJust use a simple match for the uname for cmd_parse15
William Cohen [Thu, 29 Jan 2015 16:58:28 +0000 (11:58 -0500)]
Just use a simple match for the uname for cmd_parse15

When building kernels from a git repository the uname ends up having
'+' in the name.  The '+' in the uname can cause the expect for the
cmd_parse15 test to fail.  Changed expect to use the simple-minded
"-gl" to match in these cases.

9 years agoUpdate and improve some aux_syscalls.stp functions.
David Smith [Thu, 29 Jan 2015 17:10:16 +0000 (11:10 -0600)]
Update and improve some aux_syscalls.stp functions.

* tapset/linux/aux_syscalls.stp (_struct_itimerval_u): Instead of
  returning "UNKNOWN" for an invalid pointer, return the pointer value.
  (_struct_compat_itimerval_u): Ditto.
  (_itimer_which_str): Reworked and updated.
  (_sock_family_str): Ditto.
  (_rlimit_resource_str): Ditto.
  (_rusage_who_str): Ditto.
  (_rlimit_resource_str): Ditto.
  (_rusage_who_str): Ditto.
* tapset/linux/syscalls.stp (syscall.getrusage): Don't bother rejecting
  RUSAGE_BOTH, let the kernel do it.
* tapset/linux/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/clone.c: Add s390 fix.
* testsuite/systemtap.syscall/acct.c: Add limit tests.
* testsuite/systemtap.syscall/itimer.c: Ditto.
* testsuite/systemtap.syscall/unlink.c: Ditto.
* testsuite/systemtap.syscall/getitimer.c: Update expected output.
* testsuite/systemtap.syscall/getrlimit.c: Ditto.
* testsuite/systemtap.syscall/getrusage.c: Ditto.
* testsuite/systemtap.syscall/setitimer.c: Ditto.
* testsuite/systemtap.syscall/socket.c: Ditto.
* testsuite/systemtap.syscall/socketpair.c: Ditto.

9 years agonew example: glibc-malloc
Siddhesh Poyarekar [Thu, 29 Jan 2015 16:39:41 +0000 (11:39 -0500)]
new example: glibc-malloc

Taken from http://developerblog.redhat.com/2015/01/06/malloc-systemtap-probes-an-example/
with slight tweaks by fche.

9 years agoPR17894: skip testing unknown globals on kernels < 3.11
Josh Stone [Wed, 28 Jan 2015 18:19:42 +0000 (10:19 -0800)]
PR17894: skip testing unknown globals on kernels < 3.11

Kernels didn't start ignoring unknown module options until commit
54041d8a7333 (v3.11-rc1~44^2~2), so just mark earlier as unsupported.

9 years agostapprobes.3stap: correct a probepoint typo
Josh Stone [Wed, 28 Jan 2015 18:19:26 +0000 (10:19 -0800)]
stapprobes.3stap: correct a probepoint typo

9 years agoPR16716 partial fix: 'syscall.{exit,exit_group,{delete,finit,init}_module}'.
David Smith [Wed, 28 Jan 2015 18:16:59 +0000 (12:16 -0600)]
PR16716 partial fix: 'syscall.{exit,exit_group,{delete,finit,init}_module}'.

* tapset/linux/syscalls.stp (syscall.delete_module): Fixed types and added
  'flags_str'.
  (syscall.exit): Fixed types.
  (syscall.exit_group): Ditto.
  (syscall.finit_module): New probe.
  (syscall.init_module): Fixed types.
* tapset/linux/nd_syscalls.stp (nd_syscall.delete_module): Fixed types and
  added 'flags_str'.
  (nd_syscall.finit_module): New probe.
  (nd_syscall.init_module): Fixed types.
* tapset/linux/syscalls2.stp (syscall.nfsservctl): Handle
  CONFIG_NFSD_DEPRECATED.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_nfsctl_cmd_str): Reworked and updated.
  (_module_flags_str): Ditto.
  (_finit_module_flags_str): Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added more tests.
* testsuite/buildok/syscalls-detailed.stp: Added finit_module testing.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/exit.c: New test.
* testsuite/systemtap.syscall/exit_group.c: Ditto.
* testsuite/systemtap.syscall/module.c: Ditto.
* testsuite/systemtap.syscall/nfsservctl.c: Ditto.
* testsuite/systemtap.syscall/clone.c: Update regexp.
* testsuite/systemtap.syscall/getrandom.c: Added COVERAGE comment.
* testsuite/systemtap.syscall/memfd_create.c: Ditto.
* testsuite/systemtap.syscall/shmat.c: Ditto.
* testsuite/systemtap.syscall/shmget.c: Ditto.
* testsuite/systemtap.syscall/coverage.tcl: No longer ignores 'add_key'.

9 years agoPR12276: compare symfileline() with pp()
Abegail Jakop [Wed, 28 Jan 2015 16:43:46 +0000 (11:43 -0500)]
PR12276: compare symfileline() with pp()

[u]symfileline.*: added a test that uses *.statement(*@*:*) probes to
compare the return from [u]symfileline() with the @file:line portion of pp()

9 years agoSupport constant arguments for arm64 sdt markers
William Cohen [Wed, 28 Jan 2015 03:36:40 +0000 (22:36 -0500)]
Support constant arguments for arm64 sdt markers

Testing of the arm64 uprobes kernel support showed that systemtap was
not handling sdt marker arguments that were optimized into constants
correctly (PR17889).  The arm64 does not prefix literals. No '$' or
'#' prefixes.  Corrected the matching code to address this case.  Also
added an entry in the comment of architecture specific sdt argument
constructs documenting the possible arm64 sdt marker argument formats.

9 years agoFix PR17888 by updating the dentry.stp tapset.
David Smith [Tue, 27 Jan 2015 20:45:49 +0000 (14:45 -0600)]
Fix PR17888 by updating the dentry.stp tapset.

* tapset/linux/dentry.stp (task_dentry_path): For newer kernels, the 'mnt'
  and 'dentry' members of 'struct path' are already pointers, so no need
  to take their addresses.

9 years agoPR12276: expect path+file in [u]symfile[line] tests
Abegail Jakop [Tue, 27 Jan 2015 19:22:55 +0000 (14:22 -0500)]
PR12276: expect path+file in [u]symfile[line] tests

9 years agoPR12276: symfile[line]() return path and filename
Abegail Jakop [Tue, 27 Jan 2015 18:51:23 +0000 (13:51 -0500)]
PR12276: symfile[line]() return path and filename

sym.c: changed the filename gathering portion from _stp_linenumber_lookup()
to collect the directory information and include that with the returned
filename. moved the filename gathering portion to its own function,
_stp_filename_lookup()

9 years agoMake EM_AARCH64 backup definition more generally available (PR17884)
William Cohen [Tue, 27 Jan 2015 15:29:08 +0000 (10:29 -0500)]
Make EM_AARCH64 backup definition more generally available (PR17884)

There are older versions of elf.h that do not have a definition of
EM_AARCH64.  There was a backup definition of EM_AARCH64 in
tapset.cxx, but also need this definition for dwflpp.cxx.  Moved the
definition EM_AARCH64 to dwflpp.h to make it more generally visible.

9 years agoFix strconcat.stp file perms to avoid possible tcl sourcing error.
Martin Cermak [Tue, 27 Jan 2015 14:35:44 +0000 (15:35 +0100)]
Fix strconcat.stp file perms to avoid possible tcl sourcing error.

9 years agoPR16716 partial fix: Fix types for 'syscall.{keyctl,add_key,request_key}'.
Martin Cermak [Tue, 27 Jan 2015 08:41:05 +0000 (09:41 +0100)]
PR16716 partial fix: Fix types for 'syscall.{keyctl,add_key,request_key}'.

* tapset/linux/aux_syscalls.stp: Added related defines.
* tapset/linux/nd_syscalls.stp: Fix types for add_key and keyctl.
* tapset/linux/nd_syscalls2.stp: Fix argstr for request_key.
* tapset/linux/syscalls.stp: Fix types for add_key and keyctl.
* tapset/linux/syscalls2.stp: Fix argstr for request_key.
* testsuite/buildok/nd_syscalls-detailed.stp: New keyctl convenience vars.
* testsuite/buildok/syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/keyctl.c: New testcase.

9 years agoAdd plt support for arm64 and allow the plt tests to run arm64.
William Cohen [Mon, 26 Jan 2015 21:07:00 +0000 (16:07 -0500)]
Add plt support for arm64 and allow the plt tests to run arm64.

9 years agoCorrect syscall numbers for arm64
William Cohen [Mon, 26 Jan 2015 21:01:33 +0000 (16:01 -0500)]
Correct syscall numbers for arm64

The 32-bit arm and 64-bit arm architectures are pretty different.
They do not share the same syscall numbers for mmap, mmap2, munmap,
and mremap.  These need to be corrected for systemtap to notice when
memory map operations occured on arm64 and uprobes may need to be
inserted or removed.

9 years agoTolerate missing line records in prologue search
Josh Stone [Fri, 23 Jan 2015 23:03:01 +0000 (15:03 -0800)]
Tolerate missing line records in prologue search

If we're trying to scan line records for the function prologue, but the
current CU fails dwarf_getsrclines(), then just return so we can probe
without skipping prologues.

Such CUs were seen for the jemalloc sources built into Rust's libstd.
For some reason these don't have any DW_AT_stmt_list at all!

9 years agoPR17858: Just warn and continue for stapdyn unknown globals
Josh Stone [Fri, 23 Jan 2015 22:46:03 +0000 (14:46 -0800)]
PR17858: Just warn and continue for stapdyn unknown globals

With staprun modules, the kernel just noted the unknown module option in
dmesg, and everything continues.  For stapdyn, we were getting a warning
which set enough of an error state to skip the rest of initialization,
including begin probes, but not enough to exit the script.  Now unknown
options just warn without setting error state, but invalid options like
bad number formats will set an error and properly exit.

9 years agoPR12276: fix comparison in dump_line_tables_check()
Abegail Jakop [Fri, 23 Jan 2015 16:57:57 +0000 (11:57 -0500)]
PR12276: fix comparison in dump_line_tables_check()

9 years agoPR17860: add testcase to foreach_limit.exp
Jonathan Lebon [Mon, 19 Jan 2015 15:09:20 +0000 (10:09 -0500)]
PR17860: add testcase to foreach_limit.exp

This testcase would have failed to compile prior to the previous commit.

9 years agoPR17860: match foreach logic in tmpcounter and unparser
Jonathan Lebon [Fri, 16 Jan 2015 18:29:40 +0000 (13:29 -0500)]
PR17860: match foreach logic in tmpcounter and unparser

This patch fixes PR17860 by ensuring that tmpvars are declared in
c_tmpcounter::visit_foreach_loop() in the same order as they are used in
c_unparser::visit_foreach_loop().

9 years agoUpdate systemtap-service.exp to reflect commit 075ec56b (RHBZ847286)
Martin Cermak [Fri, 23 Jan 2015 10:30:49 +0000 (11:30 +0100)]
Update systemtap-service.exp to reflect commit 075ec56b (RHBZ847286)

9 years agoPR16716 partial fix: Fix types for 'syscall.{clone,s[gs]etmask,tkill}'.
David Smith [Thu, 22 Jan 2015 21:17:42 +0000 (15:17 -0600)]
PR16716 partial fix: Fix types for 'syscall.{clone,s[gs]etmask,tkill}'.

* tapset/linux/nd_syscalls.stp (nd_syscall.clone): Fix types.
* tapset/linux/syscalls2.stp (syscall.ssetmask): Fix types and add
  'newmask_str'.
  (syscall.tkill): Fix types.
* tapset/linux/nd_syscalls2.stp (nd_syscall.ssetmask): Add 'newmask_str'.
* tapset/linux/aux_syscalls.stp (_stp_sigmask_str): New function.
* testsuite/buildok/syscalls2-detailed.stp: Added 'newmask_str' testing to
  syscall.ssetmask.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/clone.c: Add limit testing.
* testsuite/systemtap.syscall/signal.c: Add testing for the 'tkill' syscall.
* testsuite/systemtap.syscall/sigmask.c: New test case.

9 years agoPR12276: correct checks in dump_line_tables_check()
Abegail Jakop [Thu, 22 Jan 2015 20:28:50 +0000 (15:28 -0500)]
PR12276: correct checks in dump_line_tables_check()

9 years agoPR17864: Fix alias_tapset.exp regression
Martin Cermak [Wed, 21 Jan 2015 17:29:48 +0000 (18:29 +0100)]
PR17864: Fix alias_tapset.exp regression

* Take only interesting parts of the stap output into account
  so that expect's match_max doesn't get exceeded.
* Adapt the testcase to commit befbf100 which modifies
  syscall.read on s390x

9 years agoerror::dwarf man page: mention possibility of elfutils lack-of-compression
Frank Ch. Eigler [Tue, 20 Jan 2015 20:16:54 +0000 (15:16 -0500)]
error::dwarf man page: mention possibility of elfutils lack-of-compression

Reported-By: Simon Eskildsen @Sirupsen
9 years agohello-world example: use probe oneshot
Frank Ch. Eigler [Sun, 18 Jan 2015 21:50:22 +0000 (16:50 -0500)]
hello-world example: use probe oneshot

9 years agodtrace.in: ignore "-x FOOBAR" options
Frank Ch. Eigler [Fri, 16 Jan 2015 19:07:02 +0000 (14:07 -0500)]
dtrace.in: ignore "-x FOOBAR" options

Reported-By: tromey & sfink
9 years agoPR12276: add ifdef when assigning _stp_module.debug_line
Abegail Jakop [Wed, 14 Jan 2015 17:31:17 +0000 (12:31 -0500)]
PR12276: add ifdef when assigning _stp_module.debug_line

9 years agoPR12276: fix inital line data check to check all units
Abegail Jakop [Wed, 14 Jan 2015 17:22:24 +0000 (12:22 -0500)]
PR12276: fix inital line data check to check all units

translate.cxx: encase the majority of dump_line_tables_check() in a while
loop to check all of the units/line number programs instead of only
the first unit/line number program

9 years agoPR17696: Ignore DW_AT_comp_dir == s.kernel_build_tree
Josh Stone [Mon, 12 Jan 2015 20:39:52 +0000 (12:39 -0800)]
PR17696: Ignore DW_AT_comp_dir == s.kernel_build_tree

If DW_AT_comp_dir is the same as s.kernel_build_tree, then it's not a
useful path for s.kernel_source_tree.  By ignoring this case, we allow
the next block to check whether the source symlink is useful instead.

9 years agoPR17714: Work with valid pointers, correctly test for unimplemented syscalls.
Martin Cermak [Mon, 12 Jan 2015 16:37:18 +0000 (17:37 +0100)]
PR17714: Work with valid pointers, correctly test for unimplemented syscalls.

* tapset/linux/syscalls.stp: Work with valid pointers in s390 compat task.
* testsuite/systemtap.syscall/poll.c: epoll_pwait() unimplemented on RHEL5 x86_64.

9 years agodummy commit to credit smileytap.svg creator
Andy Fitzsimon [Fri, 9 Jan 2015 20:53:57 +0000 (15:53 -0500)]
dummy commit to credit smileytap.svg creator

9 years agoMerge branch 'jlebon/trace_system' (PR13330)
Jonathan Lebon [Fri, 9 Jan 2015 16:41:50 +0000 (11:41 -0500)]
Merge branch 'jlebon/trace_system' (PR13330)

9 years agotracepoint_query: make private what need not be public
Jonathan Lebon [Fri, 9 Jan 2015 16:29:05 +0000 (11:29 -0500)]
tracepoint_query: make private what need not be public

And document each member with a small comment.

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