]> sourceware.org Git - systemtap.git/log
systemtap.git
9 years agoremove ns comparison in [task_]ns_* tapsets
Abegail Jakop [Fri, 22 May 2015 18:10:03 +0000 (14:10 -0400)]
remove ns comparison in [task_]ns_* tapsets

turns out that the functions used to get the ns-specific values in the
new tapsets will return a sufficient error value (0 or uid/guid overflow
value) if the target task/current  is not in the target pid/user namespace

9 years agouse find_pid_ns instead of find_get_pid in [task_]ns_*
Abegail Jakop [Fri, 22 May 2015 18:02:17 +0000 (14:02 -0400)]
use find_pid_ns instead of find_get_pid in [task_]ns_*

in the new namespace-aware tapset functions, we cant use find_get_pid() to
get the pid struct from a target ns pid because it looks for that pid in the
current task's pid ns, when we want it to look in the root pidns. switched
to find_pid_ns() which allows us to specify a pid ns to look in.

9 years agobuildok test cases for ns-aware tapsets
Abegail Jakop [Tue, 19 May 2015 18:30:50 +0000 (14:30 -0400)]
buildok test cases for ns-aware tapsets

testsuite/buildok/context-embedded-ns.stp: check that the pid and user
related ns_* tapsets can build.
testsuite/buildok/task_ns.stp: check that the pid and user related
task_ns_* tapsets can build.
testsuite/systemtap.pass1-4/buildok-dyninst.exp: add test cases to
dyinst run's KFAIL list

9 years agonew namespace-aware tapset functions: [task_]ns_*
Abegail Jakop [Fri, 15 May 2015 15:18:01 +0000 (11:18 -0400)]
new namespace-aware tapset functions: [task_]ns_*

context.stp: new tapset functions ns_[pid|tid|ppid|pgrp|sid] for pid
namespaces. ns_[e][g|u]id functions for user namespaces. the returned
value with be relative to either the --target-namespaces=PID or the stap
process' pid or user namespace.
task.stp: task_ns_* (and others) functions to be the namespace-aware
counterparts to the original task_* functions. the new functions will
return a value relative to the target-namespaces=PID or stap process'
namespaces.

9 years agonew option: --target-namespaces=PID
Abegail Jakop [Tue, 19 May 2015 15:54:31 +0000 (11:54 -0400)]
new option: --target-namespaces=PID

added a new option to specify a set of target namespaces based on a pid.
this will be used with upcoming namespace-aware tapsets, which will
rely on that target namespaces in order to provide relevant information.

9 years agoFixed PR18461 by updating the netfilter code for linux 4.1.
David Smith [Wed, 10 Jun 2015 17:38:52 +0000 (12:38 -0500)]
Fixed PR18461 by updating the netfilter code for linux 4.1.

* tapset-netfilter.cxx (emit_module_decls): Add support for new linux 4.1
  netfilter changes.
* buildrun.cxx (compile_pass): Add new netfilter autoconf test.
* runtime/linux/autoconf-netfilter-4_1.c: New autoconf test.

9 years agoFix typo in stap.1 man page
Masanari Iida [Tue, 9 Jun 2015 12:15:57 +0000 (21:15 +0900)]
Fix typo in stap.1 man page

This patch fix spelling typos in stap.1

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
9 years agoRemove more non-syscalls from testsuite/systemtap.syscall/coverage.tcl output.
David Smith [Tue, 9 Jun 2015 21:40:24 +0000 (16:40 -0500)]
Remove more non-syscalls from testsuite/systemtap.syscall/coverage.tcl output.

* testsuite/systemtap.syscall/coverage.tcl: Remove more non-syscalls from
  the output: copyarea, fillrect, and imageblit.

9 years agoIncrease the testsuite timeout value for 32-bit arm systems.
David Smith [Tue, 9 Jun 2015 18:29:41 +0000 (13:29 -0500)]
Increase the testsuite timeout value for 32-bit arm systems.

* testsuite/lib/systemtap.exp (setup_systemtap_environment): Increase the
  timeout value for 32-bit arm systems.

9 years agoPR18492: Add tapset support and test coverage for sched_{get,set}attr
Martin Cermak [Tue, 9 Jun 2015 07:47:01 +0000 (09:47 +0200)]
PR18492: Add tapset support and test coverage for sched_{get,set}attr

* tapset/linux/aux_syscalls.stp: New function _struct_sched_attr_u()
* tapset/linux/nd_syscalls2.stp: New probes nd_syscall.sched_{g,s}etattr
* tapset/linux/syscalls2.stp: New probes syscall.sched_{g,s}etattr
* testsuite/buildok/aux_syscalls-embedded.stp: New subtest
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto
* testsuite/buildok/syscalls2-detailed.stp: Ditto
* testsuite/systemtap.syscall/sched_attr.c: New testcase

9 years agoPR18501: Add tapset support and test coverage for the kcmp syscall
Martin Cermak [Tue, 9 Jun 2015 06:32:41 +0000 (08:32 +0200)]
PR18501: Add tapset support and test coverage for the kcmp syscall

* tapset/linux/aux_syscalls.stp: New function _kcmp_type_str()
* tapset/linux/nd_syscalls.stp: New probe nd_syscall.kcmp
* tapset/linux/syscalls.stp: New probe syscall.kcmp
* testsuite/buildok/aux_syscalls-embedded.stp: New subtest
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto
* testsuite/buildok/syscalls-detailed.stp: Ditto
* testsuite/systemtap.syscall/kcmp.c: New testcase

9 years agostapprobes: mention symbol-table based semi-dwarfy probe fallbacks
Frank Ch. Eigler [Mon, 8 Jun 2015 17:11:04 +0000 (13:11 -0400)]
stapprobes: mention symbol-table based semi-dwarfy probe fallbacks

9 years agoPR14161: tweak NEWS wordage and extend test case run time
Frank Ch. Eigler [Fri, 5 Jun 2015 15:10:57 +0000 (11:10 -0400)]
PR14161: tweak NEWS wordage and extend test case run time

9 years agoNEWS: STP packet probe points
Felix Lu [Fri, 5 Jun 2015 15:00:59 +0000 (11:00 -0400)]
NEWS: STP packet probe points

9 years agoNEWS: mention commit d8ef032e
Frank Ch. Eigler [Wed, 3 Jun 2015 20:12:11 +0000 (16:12 -0400)]
NEWS: mention commit d8ef032e

9 years ago14164 netfilter bridge protocol packet info
Felix Lu [Thu, 4 Jun 2015 14:24:06 +0000 (10:24 -0400)]
14164 netfilter bridge protocol packet info

9 years agoImprove a couple of syscall testcases for aarch64.
David Smith [Thu, 4 Jun 2015 18:14:24 +0000 (13:14 -0500)]
Improve a couple of syscall testcases for aarch64.

* testsuite/systemtap.syscall/getdents.c: Make changes to work better on
  aarch64.
* testsuite/systemtap.syscall/mknod.c: Ditto.

9 years agoFixed PR18477 by adding support for 10 syscalls.
David Smith [Thu, 4 Jun 2015 16:47:04 +0000 (11:47 -0500)]
Fixed PR18477 by adding support for 10 syscalls.

* runtime/linux/compat_unistd.h: Add syscall defines.
* tapset/linux/aux_syscalls.stp: Add _kexec_file_load_flags_str,
  _renameat2_flags_str, _fanotify_init_flags_str,
  _fanotify_mark_flags_str, _fanotify_mark_mask_str, and
  _perf_event_open_flags_str functions.
* tapset/linux/syscalls.stp: Added fanotify_init, fanotify_mark, getcpu,
  and kexec_file_load probes.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Added perf_event_open, prlimit64,
  process_vm_readcv, process_vm_writev, and renameat2 probes.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/syscalls.stpm: Added __BIG_ENDIAN macro.
* tapset/linux/x86_64/syscalls.stp: Made several probes optional.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added compile tests for new
  functions.
* testsuite/buildok/syscalls-detailed.stp: Added compile tests for new
  probes.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/fanotify.c: New test case.
* testsuite/systemtap.syscall/getcpu.c: Ditto.
* testsuite/systemtap.syscall/perf_event.c: Ditto.
* testsuite/systemtap.syscall/prlimit.c: Ditto.
* testsuite/systemtap.syscall/process_vm.c: Ditto.
* testsuite/systemtap.syscall/kexec_load.c: Added new tests.
* testsuite/systemtap.syscall/rename.c: Ditto.
* testsuite/systemtap.syscall/setgroups.c: Ditto.
* testsuite/systemtap.syscall/accept4.c: Checks for glibc support for
  syscall.
* testsuite/systemtap.syscall/handle_at.c: Ditto.
* testsuite/systemtap.syscall/ptrace.c: Ditto.
* testsuite/systemtap.syscall/sendmmsg.c: Ditto.
* testsuite/systemtap.syscall/sync_file_range.c: Fixed 32-bit compilation.

9 years agoAvoid compile errors in arch-dependent aux_syscalls.stp tapset files.
David Smith [Thu, 4 Jun 2015 16:31:26 +0000 (11:31 -0500)]
Avoid compile errors in arch-dependent aux_syscalls.stp tapset files.

* tapset/linux/aux_syscalls.stp: Move macro and structure definitions to
  runtime/linux/syscalls-common.h. Include new file.
* runtime/linux/syscalls-common.h: New file.
* tapset/linux/arm/aux_syscalls.stp: Include new header file to avoid
  compilation 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.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.

9 years agoUse a value for bad syscall that works better on 32-bit ARM
William Cohen [Fri, 29 May 2015 19:50:22 +0000 (15:50 -0400)]
Use a value for bad syscall that works better on 32-bit ARM

On 32-bit ARM the use of -1 for the syscall number for the bad syscall
in the utrace_syscall_args test will result in a kernel oops on some
kernels and the use other negative numbers will result in illegal
instruction exceptions.  Changing the bad syscall to use a large
positive number for the bad syscall to allow this test to work better
on 32-bit arm.

or an illegal instruction fault.

9 years agoUse __compat_[u]long() macros in syscall.migrate_pages and __keyctl_argstr()
Martin Cermak [Fri, 29 May 2015 13:26:49 +0000 (15:26 +0200)]
Use __compat_[u]long() macros in syscall.migrate_pages and __keyctl_argstr()

9 years agoAllow preprocessor.exp test to recognize 4.x kernels
William Cohen [Thu, 28 May 2015 15:08:37 +0000 (11:08 -0400)]
Allow preprocessor.exp test to recognize 4.x kernels

9 years agoSyscall tapset cleanup
Martin Cermak [Wed, 27 May 2015 06:32:58 +0000 (08:32 +0200)]
Syscall tapset cleanup

* tapset/linux/syscalls.stpm: New macros, add pragma comments
* tapset/linux/syscalls[2].stp: Cleanup

9 years agonetfilter/ip tapset: add "kernel<foo.h>" for all @cast()'s
Frank Ch. Eigler [Tue, 26 May 2015 23:01:33 +0000 (19:01 -0400)]
netfilter/ip tapset: add "kernel<foo.h>" for all @cast()'s

It is preferable to generate typing debuginfo for tapsets from headers
if possible, rather than require kernel-debuginfo.  This corrects the
buildok/netfilter-glob.stp test case on f21.

9 years agoBug 15987 - generated function::* man pages should xref to enclosing tapset::*
Felix Lu [Mon, 25 May 2015 20:27:32 +0000 (16:27 -0400)]
Bug 15987 - generated function::* man pages should xref to enclosing tapset::*

9 years agoAdd stapref.1 to systemtap.spec
Felix Lu [Mon, 25 May 2015 14:06:28 +0000 (10:06 -0400)]
Add stapref.1 to systemtap.spec

9 years agoImprove systemtap language reference man page
Felix Lu [Thu, 21 May 2015 14:25:59 +0000 (10:25 -0400)]
Improve systemtap language reference man page

9 years agoSystemtap language reference man page
Felix Lu [Tue, 19 May 2015 19:17:36 +0000 (15:17 -0400)]
Systemtap language reference man page

9 years agoAdd entry for ppc64le in arch list
Athira [Wed, 20 May 2015 12:21:03 +0000 (17:51 +0530)]
Add entry for ppc64le in arch list

A few tests fails in ppc64le with error:

========
parse error: expected 'probe', 'global', 'function', or '%{'^M
         saw: identifier 'ERROR' at <input>:22:43^M
      source:     %( arch == "ppc64le"            %? %: ERROR %)^M
                                                        ^^M
^M
1 parse error.^M
Pass 1: parse failed.  [man error::pass1]^M
FAIL: preprocessor basic ops
=========

This is because ppc64le is not added to arch list in systemtap.exp .
cmd_parse.exp also fails with similar error for arch.  Modifying the
code for ppc64le.

Signed-off-by: Athira Rajeev <atrajeev@in.ibm.com>
9 years agoSeveral small fixes in syscall tapset and related testcases.
Martin Cermak [Wed, 20 May 2015 12:16:09 +0000 (14:16 +0200)]
Several small fixes in syscall tapset and related testcases.

* tapset/linux/syscalls.stp: Fix s390x compat task pointer retrieval.
* tapset/linux/syscalls2.stp: Fix s390x compat task pointer retrieval,
    fix syscall.rt_sigsuspend compat probe
* testsuite/systemtap.syscall/getrandom.c: Fix compile time issues
* testsuite/systemtap.syscall/memfd_create.c: Fix compile time issues
* testsuite/systemtap.syscall/nfsservctl.c: Fix compile time issues
* testsuite/systemtap.syscall/ptrace.c: Fix concurrent inclusion of
    sys/ptrace.h and linux/ptrace.h for e.g. 3.13.9-200.fc20
* testsuite/systemtap.syscall/recv.c: Relax limit testing
* testsuite/systemtap.syscall/recvfrom.c: Likewise
* testsuite/systemtap.syscall/send.c: Likewise
* testsuite/systemtap.syscall/sendto.c: Likewise
* testsuite/systemtap.syscall/signalfd.c: Fix compile time issues

9 years agoman warning::debuginfo.7stap: tweak highlighting
Frank Ch. Eigler [Sat, 16 May 2015 11:54:32 +0000 (07:54 -0400)]
man warning::debuginfo.7stap: tweak highlighting

9 years agowarning::debuginfo page: elaborate on kernel-debug vs. kernel-debuginfo rpms
Frank Ch. Eigler [Sat, 16 May 2015 01:08:05 +0000 (21:08 -0400)]
warning::debuginfo page: elaborate on kernel-debug vs. kernel-debuginfo rpms

9 years agoAdd the JSON tapset and macros to the generated documentation.
David Smith [Thu, 14 May 2015 19:08:52 +0000 (14:08 -0500)]
Add the JSON tapset and macros to the generated documentation.

* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add JSON tapset chapter.
* tapset/linux/json.stp: Update documentation.
* tapset/linux/json.stpm: Ditto.

9 years agoAdd support for documenting systemtap macros.
David Smith [Thu, 14 May 2015 19:07:17 +0000 (14:07 -0500)]
Add support for documenting systemtap macros.

* scripts/kernel-doc (process_file): Add support for documenting systemtap
  macros.
* doc/SystemTap_Tapset_Reference/manpager: Ditto.

9 years agomake from_glob a per-component field rather than per-pp
Jonathan Lebon [Thu, 14 May 2015 14:29:50 +0000 (10:29 -0400)]
make from_glob a per-component field rather than per-pp

The original need for from_glob in probe_point was to distinguish
"specified" probe points from those that were still generic/globby. E.g.
so that we know to make function suggestions for
process("/usr/bin/ls").function("bad_func") but not yet for
process("/usr/bin/l*").function("bad_func").

The issue however is that there is no distinction between which
component is from a globby one. E.g. if we have
process("/usr/bin/l*").library("libc").function("bad_func"), which
becomes process("/usr/bin/ls").library("libc").function("bad_func"), we
won't know while resolving the library whether from_glob is true because
the process was globby or because the library was globby.

Thus, the 'from_globbiness' is a property of the component, not the
whole probe point. In this commit, we make from_glob instead a member of
probe_point::component. We then add a from_globby_comp() function which
can be used to determine if a specific component was derived from a
globby one.

9 years agoAdd a JSON tapset build test case.
David Smith [Thu, 14 May 2015 14:30:22 +0000 (09:30 -0500)]
Add a JSON tapset build test case.

* testsuite/buildok/json-detailed.stp: New test.

9 years agotracepoint_onthefly.exp: setup_kfail tests for now
Jonathan Lebon [Wed, 13 May 2015 21:37:18 +0000 (17:37 -0400)]
tracepoint_onthefly.exp: setup_kfail tests for now

At least until the patch in PR17256 is merged.

Also comment out the last stress-test, which uses process.end probes and
is subject to the effects in PR17461.

9 years agotracepoint_onthefly.exp: new testcase
Jonathan Lebon [Tue, 12 Aug 2014 21:48:50 +0000 (17:48 -0400)]
tracepoint_onthefly.exp: new testcase

This testcase will be useful when tracepoints will support on-the-fly
arming. See PR17256.

9 years agoAdd 2 JSON tapset examples.
David Smith [Wed, 13 May 2015 17:43:20 +0000 (12:43 -0500)]
Add 2 JSON tapset examples.

* testsuite/systemtap.examples/network/net_xmit_json.meta: New file.
* testsuite/systemtap.examples/network/net_xmit_json.stp: Ditto.
* testsuite/systemtap.examples/network/netfilter_summary_json.meta: Ditto.
* testsuite/systemtap.examples/network/netfilter_summary_json.stp: Ditto.

9 years agoPR18398: Tapset support for {get,set}_thread_area syscalls
Martin Cermak [Wed, 13 May 2015 15:06:34 +0000 (17:06 +0200)]
PR18398: Tapset support for {get,set}_thread_area syscalls

* tapset/linux/i386/aux_syscalls.stp: New function _struct_user_desc_u()
* tapset/linux/i386/nd_syscalls.stp: Decode struct user_desc
* tapset/linux/i386/syscalls.stp: Ditto
* tapset/linux/x86_64/aux_syscalls.stp: New function _struct_user_desc_u()
* tapset/linux/x86_64/nd_syscalls.stp: New probes nd_syscall.{get,set}_thread_area
* tapset/linux/x86_64/syscalls.stp: New probes syscall.{get,set}_thread_area
* testsuite/buildok/nd_syscalls-arch-detailed.stp: New subtests
* testsuite/buildok/syscalls-arch-detailed.stp: New subtests
* testsuite/systemtap.syscall/thread_area.c: New testcase

9 years agoAdd JSON tapset and macro file.
David Smith [Tue, 12 May 2015 21:36:36 +0000 (16:36 -0500)]
Add JSON tapset and macro file.

* tapset/linux/json.stp: New file.
* tapset/linux/json.stpm: Ditto.

9 years agoPR18395: New tapset handling {get,set}_robust_list syscalls.
Martin Cermak [Tue, 12 May 2015 05:23:49 +0000 (07:23 +0200)]
PR18395: New tapset handling {get,set}_robust_list syscalls.

* tapset/linux/nd_syscalls.stp: New probe nd_syscall.get_robust_list
* tapset/linux/nd_syscalls2.stp: New probe nd_syscall.set_robust_list
* tapset/linux/syscalls.stp: New probe syscall.get_robust_list
* tapset/linux/syscalls2.stp: New probe syscall.set_robust_list
* testsuite/buildok/nd_syscalls-detailed.stp: New subtest
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto
* testsuite/buildok/syscalls-detailed.stp: Ditto
* testsuite/buildok/syscalls2-detailed.stp: Ditto
* testsuite/systemtap.syscall/robust_list.c: New testcase

9 years agoPR18387: New tapset handling the setns syscall
Martin Cermak [Mon, 11 May 2015 06:46:37 +0000 (08:46 +0200)]
PR18387: New tapset handling the setns syscall

* tapset/linux/nd_syscalls2.stp: New nd_syscall.setns tapset
* tapset/linux/syscalls2.stp: New syscall.setns tapset
* testsuite/buildok/nd_syscalls2-detailed.stp: Add tests
* testsuite/buildok/syscalls2-detailed.stp: Add tests
* testsuite/systemtap.syscall/setns.c: New testcase

9 years agoPR18389: disable ICF on tracepoint queries
Josh Stone [Fri, 8 May 2015 20:17:36 +0000 (13:17 -0700)]
PR18389: disable ICF on tracepoint queries

We want distinct representation of every tracepoint, even if they happen
to look identical to GCC with the same function prototype.

9 years agotapsets.cxx: handle library globbing by path
Josh Stone [Fri, 1 May 2015 22:13:31 +0000 (15:13 -0700)]
tapsets.cxx: handle library globbing by path

Library globbing was working fine on DT_NEEDED matches, but would
infinitely recurse on path globs without expanding.

9 years agotestsuite: add prototypes to sdt_misc.c
Josh Stone [Fri, 1 May 2015 22:12:13 +0000 (15:12 -0700)]
testsuite: add prototypes to sdt_misc.c

GCC5 was failing on implicit functions with -DONLY_MAIN.  We can
unconditionally declare the functions to avoid this.

9 years agoFix PR18361 by supporting RHEL7's 'securelevel' feature.
David Smith [Thu, 30 Apr 2015 17:56:12 +0000 (12:56 -0500)]
Fix PR18361 by supporting RHEL7's 'securelevel' feature.

* session.cxx (modules_must_be_signed): Check the
  '/sys/kernel/security/securelevel' file for the value '1'. If so,
  modules must be signed.

9 years agoNEWS: retroactively add mention of STAP_ERROR() embedded-c code
Frank Ch. Eigler [Wed, 29 Apr 2015 14:36:45 +0000 (10:36 -0400)]
NEWS: retroactively add mention of STAP_ERROR() embedded-c code

(It was overlooked in the stap 2.5 block of release notes.)

9 years agoFix PR18309 by updating the syscall.sig{pending,suspend,altstack} probes.
David Smith [Tue, 28 Apr 2015 20:36:24 +0000 (15:36 -0500)]
Fix PR18309 by updating the syscall.sig{pending,suspend,altstack} probes.

* tapset/linux/syscalls2.stp (syscall.sigaltstack): Add 32-bit
  support. Also call _stp_sigaltstack_u() or _stp_compat_sigaltstack_u()
  to decode the uss.
  (syscall.sigpending): Add 32-bit support.
  (syscall.sigsuspend): Improve 32-bit support.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/i386/nd_syscalls.stp: Improve sigaltstack probe.
* tapset/linux/i386/syscalls.stp: Ditto.
* tapset/linux/ia64/nd_syscalls.stp: Ditto.
* tapset/linux/ia64/syscalls.stp: Ditto.
* tapset/linux/powerpc/nd_syscalls.stp: Ditto.
* tapset/linux/powerpc/syscalls.stp: Ditto.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp: Improve _stp_sigmask_str(). Add
  _stp_sigaltstack_u() and _stp_compat_sigaltstack_u().
* runtime/linux/compat_structs.h: Renamed from compat_siginfo.h and more
  compat structs added.
* testsuite/buildok/aux_syscalls-embedded.stp: Test new functions.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Moved sigaltstack
  testing to nd_syscalls2-detailed.stp.
* testsuite/buildok/syscalls-arch-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Always test sigaltstack.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/remap_file_pages.c: Tweaked test case.
* testsuite/systemtap.syscall/sigaltstack.c: New test case.
* testsuite/systemtap.syscall/signal.c: Added more tests.

9 years agoPR18343: New tapset handling the clock_adjtime syscall
Martin Cermak [Tue, 28 Apr 2015 16:23:24 +0000 (18:23 +0200)]
PR18343: New tapset handling the clock_adjtime syscall

* tapset/linux/nd_syscalls.stp: New nd_syscall.clock_adjtime
* tapset/linux/syscalls.stp: New syscall.clock_adjtime
* testsuite/buildok/nd_syscalls-detailed.stp: Test script level vars
* testsuite/buildok/syscalls-detailed.stp: Likewise
* testsuite/systemtap.syscall/clock.c: Syscall test coverage

9 years agoPR18337: Test coverage improvements, tapset extension.
Martin Cermak [Tue, 28 Apr 2015 04:45:02 +0000 (06:45 +0200)]
PR18337: Test coverage improvements, tapset extension.

* tapset/linux/aux_syscalls.stp: New auxiliary function _kexec_flags_str()
* tapset/linux/nd_syscalls.stp: Fix types and nesting for kexec_load
* tapset/linux/syscalls.stp: Likewise
* testsuite/buildok/nd_syscalls-detailed.stp: Test the flags_str variable
* testsuite/buildok/syscalls-detailed.stp: Likewise
* testsuite/systemtap.syscall/kexec_load.c: New testcase
* testsuite/systemtap.syscall/set_tid_address.c: New testcase

9 years agoAdd spawn_seeker.txt to example information.
William Cohen [Mon, 27 Apr 2015 19:10:33 +0000 (15:10 -0400)]
Add spawn_seeker.txt to example information.

9 years agoFix PR17986 by updating the unprivileged_probes.exp test case.
David Smith [Mon, 27 Apr 2015 18:21:50 +0000 (13:21 -0500)]
Fix PR17986 by updating the unprivileged_probes.exp test case.

* testsuite/systemtap.unprivileged/unprivileged_probes.exp: Run the loop
  executable in the background so that all 'process(number)' probes get a
  valid pid.
* testsuite/systemtap.unprivileged/foo.c: Deleted unused file.
* testsuite/systemtap.unprivileged/libfoo.c: Ditto.

9 years agoFilter out descriptor/SHN_UNDEF symbols in symbol_table::lookup_symbol.
Mark Wielaard [Fri, 24 Apr 2015 17:59:32 +0000 (19:59 +0200)]
Filter out descriptor/SHN_UNDEF symbols in symbol_table::lookup_symbol.

With newer elfutils (>= 0.158) function descriptor symbols get resolved
to their actual function entry address. With older elfutils we mark such
symbols as descriptor through reject_section (because their address will
match the .opd). Filter these symbols out in symbol_table::lookup_symbol
and symbol_table::lookup_symbol_address. None of the callers want these
SHN_UNDEF/descriptor symbol (addresses).

This solves another instance of Multiple 'sys_ni_syscall' symbols found
warning on ppc64[be] with older elfutils.

9 years agowhythefail.stp: typo fix in comments
Frank Ch. Eigler [Fri, 24 Apr 2015 15:30:08 +0000 (11:30 -0400)]
whythefail.stp: typo fix in comments

(Printing $return$ from a statement probe doesn't make any sense.)

9 years agonew example: whythefail.stp
Frank Ch. Eigler [Fri, 24 Apr 2015 15:11:20 +0000 (11:11 -0400)]
new example: whythefail.stp

Inspired by wcohen's speculate.stp tapset/testcase and cibegttd@irc's
needs, this script prints a statement-execution trace for a given
function, but only for those runs of the function that ended up with a
(configurable) post-return condition.  It turns out to be a neat
multipurpose widget, for random-sampled function tracing as well as
failure analysis.

9 years agoAdding ppc64le loader to interpreter list
Athira [Fri, 24 Apr 2015 11:50:51 +0000 (17:20 +0530)]
Adding ppc64le loader to interpreter list

listing_mode.exp tests using stap -l for process.library are failing on
ppc64le.

Using the liblisting_mode.so library and executable from the testsuite,
stap  -l is not listing any probe points.

#stap -l 'process.library("liblisting_mode.so").function("libfoo")' -c
listing_mode

Running with verbose mode:
"WARNING: module /usr/share/systemtap/testsuite/listing_mode --ldd
skipped: unsupported interpreter: /lib64/ld64.so.2"

This is because /lib64/ld64.so.2 is not added in the interpreter list.
So Adding the ppc64le loader to the code.

Signed-off-by: Athira Rajeev <atrajeev@in.ibm.com>
9 years agoPR18310: Test coverage improvements, tapset extension.
Martin Cermak [Fri, 24 Apr 2015 08:18:53 +0000 (10:18 +0200)]
PR18310: Test coverage improvements, tapset extension.

* tapset/linux/nd_syscalls2.stp: Improve argument decoding for
                                 remap_file_pages syscall.
* tapset/linux/syscalls2.stp: Likewise + fix types.
* testsuite/systemtap.syscall/remap_file_pages.c: New testcase.
* testsuite/systemtap.syscall/restart_syscall.c: New testcase.
* testsuite/systemtap.syscall/setsid.c: New testcase.
* testsuite/systemtap.syscall/uselib.c: New testcase.
* testsuite/systemtap.syscall/vhangup.c: New testcase.

9 years agosession.cxx: improve parse error token colorization
Frank Ch. Eigler [Fri, 24 Apr 2015 01:33:18 +0000 (21:33 -0400)]
session.cxx: improve parse error token colorization

Previous code had imperfect heuristics about cutting apart parts of
erroneous source lines, with a colorized token in the middle.  It
could occur that the token was synthetic, or cmd-line $/@ based,
in which case the srcline-cutting arithmetic could go off-end and
cause a basic_string::substr: exception.  New code dabbles less in
heuristics and confirms that the token content actually matches
the srcline content.  In case of a mismatch, the original srcline
around the token's location is transcribed verbatim (with ellipses).

9 years agotapset/speculative.stp: optimize
Frank Ch. Eigler [Fri, 24 Apr 2015 01:32:18 +0000 (21:32 -0400)]
tapset/speculative.stp: optimize

Replacing several explicit iterations with array slices
makes the code cleaner and faster.

9 years agotapsets.cxx: Respond to pending_interrupts during $var expansion loops.
Frank Ch. Eigler [Fri, 24 Apr 2015 01:31:13 +0000 (21:31 -0400)]
tapsets.cxx: Respond to pending_interrupts during $var expansion loops.

Otherwise, a giant stap job processing .statement("*") with $$vars
becomes hard-to-interrupt.

9 years agoman error::pass5: mention --suppress-time-limits
Frank Ch. Eigler [Thu, 23 Apr 2015 16:16:58 +0000 (12:16 -0400)]
man error::pass5: mention --suppress-time-limits

9 years agoFix tapsets.cxx double ->-> compile error.
Mark Wielaard [Thu, 23 Apr 2015 15:06:45 +0000 (17:06 +0200)]
Fix tapsets.cxx double ->-> compile error.

9 years agoppc64le doesn't have function descriptors. Remove __powerpc__ in tapsets.cxx.
Mark Wielaard [Thu, 23 Apr 2015 13:59:49 +0000 (15:59 +0200)]
ppc64le doesn't have function descriptors. Remove __powerpc__ in tapsets.cxx.

Only process the opd section and do function descriptor mangling when
the target is ppc64 ELFv1 ABI. Also filter out any duplicate func_infos.
When seeing a symbol with a name starting with '.' we assume it is a
regular function pointer and not a pointer to a function descriptor and
mangle its name. That might create duplicates if there is also a function
descriptor with that name (the address will already have been resolved to
the same address).

9 years agotapsets.cxx: fix symbol/address lookup returned-data to sets passed by value
Frank Ch. Eigler [Wed, 22 Apr 2015 20:53:51 +0000 (16:53 -0400)]
tapsets.cxx: fix symbol/address lookup returned-data to sets passed by value

The symbol_table lookup_symbol[_address] functions are safer if they
return their result-sets by value rather than by pointer.  The latter
in specific should be a set rather than a list, to properly eliminate
duplicates.

9 years agoPR18293: Test coverage improvements, tapset extension.
Martin Cermak [Wed, 22 Apr 2015 17:43:02 +0000 (19:43 +0200)]
PR18293: Test coverage improvements, tapset extension.

* tapset/linux/aux_syscalls.stp: Add auxiliary functions for times and sysinfo.
* tapset/linux/nd_syscalls2.stp: Extend argstr for sysinfo and times.
* tapset/linux/syscalls2.stp: Likewise.
* testsuite/buildok/nd_syscalls2-detailed.stp: New convenience var for times syscall.
* testsuite/buildok/syscalls2-detailed.stp: Likewise for nd_syscall.times.
* testsuite/systemtap.syscall/clock.c: Addo coverage for stime syscall.
* testsuite/systemtap.syscall/syncfs.c: Extend and fix the testcase.
* testsuite/systemtap.syscall/sysctl.c: New testcase.
* testsuite/systemtap.syscall/sysinfo.c: Likewise.
* testsuite/systemtap.syscall/times.c: Likewise.
* testsuite/systemtap.syscall/unshare.c: Likewise.

9 years agoRevert "Turn prologue searching on by default for ppc64le in the testsuite."
Mark Wielaard [Wed, 22 Apr 2015 13:55:38 +0000 (15:55 +0200)]
Revert "Turn prologue searching on by default for ppc64le in the testsuite."

This reverts commit 958356595c659111a5494b05feea125444de2ecc.

No longer necessary after Bug 17638 - Symbol resolution broken for PPC64
ABIv2 was fixed with commit b4c6a4.

9 years agoPrioritize symbol table lookup for ppc64le
Hemant Kumar [Mon, 20 Apr 2015 10:29:24 +0000 (15:59 +0530)]
Prioritize symbol table lookup for ppc64le

PPC64 ELF ABI v2 has a Global entry point and a local entry point
for the functions. We need the Local entry point in order to probe
these functions. However, the DIE for these functions in debuginfo
return the function.entrypc which is same as the global entry point.
The local entry point is not encoded in the debuginfo of the ELFs. The
offset to local entry point is however encoded in the st_other field
of these symbols in the symbol table.
We need to use this field to adjust the sym.st_value to actually point
to the local entry point instead of the global entry point.

This patch is in relation to this bug :
https://sourceware.org/bugzilla/show_bug.cgi?id=17638

So, while adding symbols to the sym_table, we add an offset of
PPC64_LOCAL_ENTRY_OFFSET(sym.st_other) to st_value.
And when the function address is queried in query_dwarf_func(), we give
priority to the cached sym_table, where we can retrieve the adjusted
entry address of the function. If we don't get any address from the
symbol table, then we proceed to get from the debuginfo.

Macro definition PPC64_LOCAL_ENTRY_OFFSET has been picked up from glibc.
It won't be defined if we are building systemtap on a machine having
older elf.h and hence, won't recognize PPC64_LOCAL_ENTRY_OFFSET.

Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
9 years agoTest dwarfless probes on multiple static functions
Hemant Kumar [Mon, 20 Apr 2015 10:29:23 +0000 (15:59 +0530)]
Test dwarfless probes on multiple static functions

This patch checks how many symbols were resolved instead of probing on
them which won't require us to go till pass 5. It runs the .stp script
till pass 2. This test can be run with:
make check RUNTESTFLAGS=multisym.exp

Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
9 years agosystemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions
Hemant Kumar [Mon, 20 Apr 2015 10:29:22 +0000 (15:59 +0530)]
systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions

With multiple static functions with same names in an ELF and in absence
of dwarf, if we probe on one of the functions, then systemtap places
probe only on one static function ignoring the rest. This is because the
mapping between the symbol names and their func_info is a simple map
which doesn't allow insertion of another symbol with the same name.

This patch fixes this issue by changing this map to a multimap which
allows duplicate entries for the same symbol name. lookup_symbol code
will return a set of func_info * instead of a single descriptor for a
function name.

We also need to fix other areas in the code where lookup_symbol() and
lookup_symbol_address() are being called so as to look for a set of
func_info's and a list of Dwarf_Addr's respectively, instead of a single
descriptor.

Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
9 years agoioperm.c: Fix COVERAGE.
Martin Cermak [Wed, 22 Apr 2015 07:37:25 +0000 (09:37 +0200)]
ioperm.c: Fix COVERAGE.

9 years agoPR18184: Test coverage improvements, tapset extension.
Martin Cermak [Wed, 22 Apr 2015 06:10:46 +0000 (08:10 +0200)]
PR18184: Test coverage improvements, tapset extension.

* tapset/linux/aux_syscalls.stp: Add auxiliary functions for quotactl tapset.
* tapset/linux/nd_syscalls2.stp: Fix types for personality tapset,
                                 extend argstr for quotactl.
* tapset/linux/syscalls2.stp: Ditto.
* tapset/linux/syscalls.stpm: New macro @__quotactl_argstr().
* testsuite/systemtap.syscall/personality.c: New testcase.
* testsuite/systemtap.syscall/pivot_root.c: New testcase.
* testsuite/systemtap.syscall/quotactl.c: Testcase extension.

9 years agoUpdated coverage comment in testsuite/systemtap.syscall/handle_at.c.
David Smith [Tue, 21 Apr 2015 15:08:10 +0000 (10:08 -0500)]
Updated coverage comment in testsuite/systemtap.syscall/handle_at.c.

9 years agoUpdate coverage list in testsuite/systemtap.syscall/rt_signal.c.
David Smith [Tue, 21 Apr 2015 15:05:51 +0000 (10:05 -0500)]
Update coverage list in testsuite/systemtap.syscall/rt_signal.c.

9 years agoFixed typos in tapset/linux/tty.stp.
David Smith [Tue, 21 Apr 2015 14:44:54 +0000 (09:44 -0500)]
Fixed typos in tapset/linux/tty.stp.

9 years agoFix PR18263 by avoiding kernel string copy fault errors in tty.stp.
David Smith [Tue, 21 Apr 2015 14:31:25 +0000 (09:31 -0500)]
Fix PR18263 by avoiding kernel string copy fault errors in tty.stp.

* tapset/linux/tty.stp: Replace all kernel_string() calls with
  kernel_string_quoted(). Fall back on old behavior if '--compatible=2.7'
  is specified.

9 years agoFix PR18264 by adding support for the {name_to,open_by}_handle_at syscalls.
David Smith [Mon, 20 Apr 2015 21:33:55 +0000 (16:33 -0500)]
Fix PR18264 by adding support for the {name_to,open_by}_handle_at syscalls.

* tapset/linux/syscalls2.stp: Add new 'name_to_handle_at' and
  'open_by_handle_at' probes.
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Add new tests.
* testsuite/systemtap.syscall/handle_at.c: New test case.

9 years agoFix PR18284 by improving support/testing for some rt_* syscalls.
David Smith [Mon, 20 Apr 2015 21:28:04 +0000 (16:28 -0500)]
Fix PR18284 by improving support/testing for some rt_* syscalls.

* tapset/linux/syscalls2.stp (rt_sigqueueinfo): Import argstr formatting
  by decoding siginfo structure.
  (rt_sigsuspend): Add argstr formatting of new 'set_uaddr' and
  'sigsetsize' convenience variables.
  (rt_sigtimedwait): Add s390x fix and decode sigset, siginfo, and
  timespec structures in argstr.
  (rt_tgsigqueueinfo): New probe.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_stp_siginfo_u): New function.
  (_stp_compat_siginfo_u): Ditto.
* runtime/linux/compat_siginfo.h: New file.
* testsuite/buildok/syscalls2-detailed.stp: Test new syscall probe
  features.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/aux-syscalls-embedded.stp: Add tests for new
  functions.
* testsuite/systemtap.syscall/coverage.tcl: Add rt_sigreturn as an
  untestable syscall.
* testsuite/systemtap.syscall/rt_signal.c: Improve testing and add testing
  for rt_sigsuspend() and rt_tgsigqueueinfo().

9 years agoChange aux_syscalls.stp to print the failing address instead of "UNKNOWN".
David Smith [Mon, 20 Apr 2015 21:07:53 +0000 (16:07 -0500)]
Change aux_syscalls.stp to print the failing address instead of "UNKNOWN".

* tapset/linux/aux_syscalls.stp (_struct_rlimit_u): Instead of "UNKNOWN",
  print the address when memory can't be read.
  (_stp_sigset_u): Ditto.
  (_stp_compat_sigset_u): Ditto.
  (get_mmap_args): Ditto.
  (_struct_sigaction_u): Ditto.
  (_struct_sigaction32_u): Ditto.
  (_struct_old_sigaction32_u): Ditto.
  (_sync_file_range_flags_str): Make "pure".
* tapset/linux/syscalls2.stp: Adjust argstr formatting in several probes.
* tapset/linux/nd_syscalls2.stp: Adjust argstr formatting in several
  probes. Also add an s390 fix in nd_syscall.sync_file_range and an i686
  fix to nd_syscall.syncfs.
* testsuite/systemtap.syscall/accept.c: Expect new output.
* testsuite/systemtap.syscall/alarm.c: Ditto.
* testsuite/systemtap.syscall/chroot.c: Ditto.
* testsuite/systemtap.syscall/dcookie.c: Ditto.
* testsuite/systemtap.syscall/getrlimit.c: Ditto.
* testsuite/systemtap.syscall/ioperm.c: Ditto.
* testsuite/systemtap.syscall/signal.c: Ditto.

9 years agoman error::dwarf, add CONFIG_DEBUG_INFO_SPLIT caution
Frank Ch. Eigler [Sun, 19 Apr 2015 23:58:06 +0000 (19:58 -0400)]
man error::dwarf, add CONFIG_DEBUG_INFO_SPLIT caution

9 years agoAddress bz1111106 comments 5 and 6.
Martin Cermak [Wed, 15 Apr 2015 11:34:19 +0000 (13:34 +0200)]
Address bz1111106 comments 5 and 6.

9 years agoFixed PR18262 by adding support for the sync_file_range/syncfs syscalls.
David Smith [Tue, 14 Apr 2015 15:30:13 +0000 (10:30 -0500)]
Fixed PR18262 by adding support for the sync_file_range/syncfs syscalls.

* tapset/linux/syscalls2.stp: Add support for 'sync_file_range' and
  'syncfs'.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_sync_file_range_flags_str): New function.
* tapset/arm/registers.stp (_stp_arg): Allow argument 7 to be fetched.
* testsuite/systemtap.syscall/sync_file_range.c: New test case.
* testsuite/systemtap.syscall/syncfs.c: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Added build test cases for
  'sync_file_range' and 'syncfs'.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added build test case for
  _sync_file_range_flags_str().

9 years agoImprove testsuite/buildok/map_probe_cond.stp.
David Smith [Tue, 14 Apr 2015 15:20:45 +0000 (10:20 -0500)]
Improve testsuite/buildok/map_probe_cond.stp.

* testsuite/buildok/map_probe_cond.stp: Instead of depending on the
debuginfo for 'ls' to be installed, just probe 'stap'.

9 years agoman stapprobes: emphasize that dwarf debuginfo is probe-point-specific
Frank Ch. Eigler [Tue, 14 Apr 2015 01:04:40 +0000 (21:04 -0400)]
man stapprobes: emphasize that dwarf debuginfo is probe-point-specific

(This is to further disabuse folks of the notion that kernel-debuginfo
is always needed.)

9 years agoAdd some syscall test case tweaks for arm.
David Smith [Mon, 13 Apr 2015 16:21:26 +0000 (11:21 -0500)]
Add some syscall test case tweaks for arm.

* testsuite/systemtap.syscall/keyctl.c: Small fix to get test working on
  arm kernel.
* testsuite/systemtap.syscall/shmat.c: Ditto.

9 years agoAdd some arm-specific syscall tapset fixes.
David Smith [Fri, 10 Apr 2015 20:36:46 +0000 (15:36 -0500)]
Add some arm-specific syscall tapset fixes.

* tapset/linux/syscalls.stp (syscall.fadvise64_64): Add arm fix.
* tapset/linux/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/keyctl.c: Ditto.
* testsuite/systemtap.syscall/shmat.c: Small expected output fix.

9 years agoRHBZ1121363: make dracut module directory configurable
Frank Ch. Eigler [Fri, 10 Apr 2015 18:46:10 +0000 (14:46 -0400)]
RHBZ1121363: make dracut module directory configurable

The place where dracut loads modules for the "service systemtap onboot ..."
facility is fixed, but we want its subdirectory to be configurable,
so that different stap installations can avoid stepping on each other.
So now "configure --with-dracutstap=DRACUT_D/MODULEDIR" is available.

9 years agoFix PR13481 by handling arguments passed on the arm stack.
David Smith [Fri, 10 Apr 2015 16:06:09 +0000 (11:06 -0500)]
Fix PR13481 by handling arguments passed on the arm stack.

* tapset/arm/registers.stp (_stp_get_stack_nth): New function to get
  arguments from the stack.
  (_stp_arg): Add support for getting arguments 5 and 6.
  (longlong_arg): Adjust argument numbers when needed.
* tapset/linux/nd_syscalls2.stp (nd_syscall.readahead): Add fix for arm.

9 years agoAdd fallback to line table and low_pc for function source file/line.
Mark Wielaard [Fri, 10 Apr 2015 15:53:08 +0000 (17:53 +0200)]
Add fallback to line table and low_pc for function source file/line.

Some DWARF producers (golang) don't emit any decl_file/line/col information.
For function DIEs we can sometimes still retrieve that information based on
the low_pc address the debug line table. Add a new fallback function
dwflpp::pc_line that returns file/line/col information based on pc address
in the current CU.

9 years agoImprove dwflpp::loc2c_error semantic error.
Mark Wielaard [Fri, 10 Apr 2015 13:09:31 +0000 (15:09 +0200)]
Improve dwflpp::loc2c_error semantic error.

When the dwflpp::loc2c callback was called from loc2c.c code on failure
to translate a location to a C expression we would loose all context.
Keep track of the pc location and context DIE we are trying to translate
so we can add more details to the error message shown to the user.

9 years agoCannot create noncontig union type larger than 64 bits.
Mark Wielaard [Fri, 10 Apr 2015 13:04:17 +0000 (15:04 +0200)]
Cannot create noncontig union type larger than 64 bits.

We only can handle integral types of sizes up to 64 bits.
When we see a complex location description like:

location             (exprloc)
[   0] reg0
[   1] piece 8
[   3] reg1
[   4] piece 8

For a type like:

base_type
byte_size            (data1) 16
encoding             (data1) signed (5)
name                 (strp) "__int128"

We'll have to give up, otherwise we'll try to reconstruct the pieces
into a (non-existing) uint128_t type union.

9 years agoFix incorrect calls to @choose_defined in the syscall tapsets.
David Smith [Thu, 9 Apr 2015 20:41:50 +0000 (15:41 -0500)]
Fix incorrect calls to @choose_defined in the syscall tapsets.

9 years agoPR17958 escape DWARF names that aren't C identifier strings.
Mark Wielaard [Thu, 9 Apr 2015 20:17:21 +0000 (22:17 +0200)]
PR17958 escape DWARF names that aren't C identifier strings.

Some language compilers (golang) might output DWARF names that are not
valid C identifier strings. Provide a escaped_indentifier_string ()
function to turn those into valid C identifier strings so the generated
C code compiles cleanly.

9 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Thu, 9 Apr 2015 17:52:55 +0000 (12:52 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

9 years agoUpdated syscall coverage script and COVERAGE comments in syscall test cases.
David Smith [Thu, 9 Apr 2015 17:52:10 +0000 (12:52 -0500)]
Updated syscall coverage script and COVERAGE comments in syscall test cases.

* testsuite/systemtap.syscall/coverage.tcl: Made a couple of small fixes.
* testsuite/systemtap.syscall/dcookie.c: Updated COVERAGE comment.
* testsuite/systemtap.syscall/mmap.c: Ditto.
* testsuite/systemtap.syscall/quotactl.c: Ditto.
* testsuite/systemtap.syscall/stat.c: Ditto.
* testsuite/systemtap.syscall/uname.c: Ditto.

9 years agoPR17959 Allow size-less pointer types.
Mark Wielaard [Thu, 9 Apr 2015 14:51:56 +0000 (16:51 +0200)]
PR17959 Allow size-less pointer types.

golang might produce a DW_TAG_pointer_type without any size. Assume
the size of the pointer is equal to the address size of the DWARF CU
in that case. Otherwise we might try to create values of type uint0_t.

9 years agoAdd a definition of _stp_syscall_get_nr for arm64
William Cohen [Thu, 9 Apr 2015 14:20:50 +0000 (10:20 -0400)]
Add a definition of _stp_syscall_get_nr for arm64

Commit 07cecda4dc to fix the syscall_get_nr for 32-bit arm exposed that
there wasn't a definition of _stp_syscall_get_nr for arm64.  This adds
the needed definition for arm64.

9 years agoPR17957 Allow "raw" DW_OP_call_frame_cfa in location expressions.
Mark Wielaard [Thu, 9 Apr 2015 13:44:26 +0000 (15:44 +0200)]
PR17957 Allow "raw" DW_OP_call_frame_cfa in location expressions.

golang will produce DW_OP_call_frame_cfa; DW_OP_consts: 8; DW_OP_plus
location expressions instead of a simple DW_OP_fbreg 8. It will also not
set DW_AT_frame_base, so the frame base/call frame address isn't really
known.

Accept that pattern by signalling we need the frame base in loc2c.c
translate () if we see any DW_OP_call_frame_cfa and just push the
frame_base onto the expression stack. And in location_from_address ()
assume that if no DW_AT_frame_base is given it was implicitly defined
with an DW_OP_call_frame_cfa (so we'll use the CFA as calculated by the
CFI to define the frame base).

9 years agoFixed PR18213 by fixing getting the syscall number on arm kernels.
David Smith [Wed, 8 Apr 2015 17:01:10 +0000 (12:01 -0500)]
Fixed PR18213 by fixing getting the syscall number on arm kernels.

* runtime/syscall.h: For arm, use our own syscall_get_nr(), since the
  kernel supplied one doesn't work well. Rename all uses of
  syscall_get_nr() to _stp_syscall_get_nr().
* runtime/linux/task_finder.c: Rename  all uses of syscall_get_nr() to
  _stp_syscall_get_nr().
* runtime/linux/task_finder2.c: Ditto.
* tapset/linux/aux_syscalls.stp: Ditto.
* tapset/linux/utrace.stp: Ditto.

9 years agoFix another d_type problem on XFS.
Qiao Nuohan [Tue, 7 Apr 2015 15:33:09 +0000 (10:33 -0500)]
Fix another d_type problem on XFS.

* stap-serverd.cxx (get_server_mok_fingerprints): Call stat() if readdir()
  returns 'DT_UNKNOWN'. Certain filesystems like XFS don't implement
  returning the file type.

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