]> sourceware.org Git - systemtap.git/log
systemtap.git
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 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

10 years agoadd DWARF_LINE* macros to help diagnosis
Jonathan Lebon [Thu, 17 Apr 2014 16:21:25 +0000 (12:21 -0400)]
add DWARF_LINE* macros to help diagnosis

Similarly to the previous commit, we modify the new safe_dwarf_line*()
functions so that they carry __FILE__ and __LINE__ information into the
error. This new information is filled in when using the new DWARF_LINE*
macros.

Before:

semantic error: libdw failure (dwarf_lineaddr): no error

After:

semantic error: libdw failure (dwarf_lineaddr): no error
   thrown from: ../systemtap/dwflpp.cxx:2242

10 years agoadd DWFL_ASSERT and DWARF_ASSERT to help diagnosis
Jonathan Lebon [Thu, 17 Apr 2014 16:08:00 +0000 (12:08 -0400)]
add DWFL_ASSERT and DWARF_ASSERT to help diagnosis

Semantic errors thrown from dwfl_assert() and dwarf_assert() lacked any
positional information to help track down where the assertion failed. We
create two new macros, DWFL_ASSERT and DWARF_ASSERT, which carry down
the __FILE__ and __LINE__ information so that the semantic_error created
contains that information, which can be printed out using -vv.

Before:

semantic error: libdwfl failure (asserting!): no error

After:

semantic error: libdwfl failure (asserting!): no error
   thrown from: ../systemtap/tapsets.cxx:7183

10 years agostatement.exp: rework and expand
Jonathan Lebon [Wed, 16 Apr 2014 18:02:21 +0000 (14:02 -0400)]
statement.exp: rework and expand

The statement.exp test case previously only tested a few specific cases.
We now introduce a new test program, 'statement.c', on which we can test
for all the things we previously tested, allowing us to remove the other
test programs. Furthermore, we extend coverage to test many other
possible combinations.

10 years agodwflpp::iterate_over_srcfile_lines: add suggestions
Jonathan Lebon [Wed, 16 Apr 2014 18:53:46 +0000 (14:53 -0400)]
dwflpp::iterate_over_srcfile_lines: add suggestions

As before, we suggest other linenos if the lineno the user specified
does not have any matching line records.

10 years agodwflpp: implement new iterate_over_srcfile_lines()
Jonathan Lebon [Wed, 16 Apr 2014 14:40:16 +0000 (10:40 -0400)]
dwflpp: implement new iterate_over_srcfile_lines()

We finally implement the new iterate_over_srcfile_lines(). The basic
strategy is to look at each matching DIE, rather than just the line
records matching the linenos so that we properly match, for example,
functions inlined multiple times (which can yield multiple sets of line
records for the same lineno but at the various addresses where inlined).

10 years agoadd dwarf_query::filtered_all
Jonathan Lebon [Wed, 16 Apr 2014 20:03:07 +0000 (16:03 -0400)]
add dwarf_query::filtered_all

In dwarf_query-related functions, we very often need to carry out the
same operation on both filtered_functions and filtered_inlines. Rather
than duplicating code, create a new dwarf_query function which creates a
temporary vector containing all of them.

10 years agodwflpp: add CU line caching
Jonathan Lebon [Wed, 16 Apr 2014 18:08:47 +0000 (14:08 -0400)]
dwflpp: add CU line caching

The upcoming patches re-implementing iterate_over_srcfile_lines() will
depend on the use of CU lines in lineno order. Since dwarf_getsrclines()
outputs them in addr order, it greatly helps performance to cache the
sorted version.

10 years agodwarf_wrappers: remove dwarf_line_t class
Jonathan Lebon [Wed, 16 Apr 2014 14:47:30 +0000 (10:47 -0400)]
dwarf_wrappers: remove dwarf_line_t class

In the coming patches, we will make liberal use of Dwarf_Line. Rather
than requiring conversion to dwarf_line_t, which is very often overkill
and too verbose, we introduce new helper functions which are safe
versions of their dwarf equivalent.

10 years agogut out dwflpp::iterate_over_srcfile_lines()
Jonathan Lebon [Wed, 16 Apr 2014 14:51:24 +0000 (10:51 -0400)]
gut out dwflpp::iterate_over_srcfile_lines()

To prepare for the new code, we empty out iterate_over_srcfile_lines()
and remove associated functions. This is also where we break the link
between dwflpp and dwarf_query (the original issue mentioned in
PR16615).

10 years agodwarf_query: rename line to linenos
Jonathan Lebon [Fri, 4 Apr 2014 17:47:54 +0000 (13:47 -0400)]
dwarf_query: rename line to linenos

Rename both the dwarf_query 'line' member to 'linenos' as well as the
enum type 'line_t' to 'lineno_t'. This more accurately reflects line
numbers, as opposed to Dwarf_Line or dwarf_line_t objects, which are
often simply named 'line' in other contexts.

10 years agotapsets.cxx: simplify query_srcfile_label
Jonathan Lebon [Fri, 4 Apr 2014 17:25:07 +0000 (13:25 -0400)]
tapsets.cxx: simplify query_srcfile_label

The query_srcfile_line() callback checked if the query had a
statement(str). This could have evaluated to false in the past (when
query_cu() treated both .statement(str) and .statement(num)), but now
query_srcfile_line() is only used for statement/function(func@file:N)
probes, so we can simplify it.

10 years agosession.cxx: tweak semantic_error errsrc printing
Jonathan Lebon [Fri, 4 Apr 2014 15:36:38 +0000 (11:36 -0400)]
session.cxx: tweak semantic_error errsrc printing

10 years agoresolve_prologue_endings: clarify comment re. alloc
Jonathan Lebon [Wed, 2 Apr 2014 21:48:01 +0000 (17:48 -0400)]
resolve_prologue_endings: clarify comment re. alloc

10 years agoFixed PR16806 by improving task_finder/utrace shutdown.
David Smith [Thu, 17 Apr 2014 19:39:39 +0000 (14:39 -0500)]
Fixed PR16806 by improving task_finder/utrace shutdown.

* runtime/stp_utrace.c (utrace_init): Clear out the kmem cache pointers
  after destroying the caches.
  (utrace_exit): Ditto.
  (utrace_shutdown): Updated comments.
  (utrace_free): Lock the utrace structure while cleaning up.
* runtime/linux/task_finder2.c (stap_task_finder_post_init): If the
  task_finder state isn't 'running', quit early.
  (stap_stop_task_finder): Call stp_task_work_exit() to wait on any
  remaining task_work items.
  (utrace_report_exec): If the utrace state isn't registered, quit.
  (utrace_report_syscall_entry): Ditto.
  (utrace_report_syscall_exit): Ditto.
  (utrace_report_clone): Ditto.
  (utrace_report_death): Ditto.

10 years agoPR16829 rework, have staprun export verbosity flag
Lukas Berk [Thu, 17 Apr 2014 15:17:32 +0000 (11:17 -0400)]
PR16829 rework, have staprun export verbosity flag

*java/stapbm.in - rename STAPBM_VERBOSE to general SYSTEMTAP_VERBOSE
flag
*staprun/staprun.8 - note new SYSTEMTAP_VERBOSE env variable
*staprun/staprun.c - set SYSTEMTAP_VERBOSE env var from -v's passed to
   staprun
*tapset-method.cxx - revert leftbits string to previous assignment

10 years agoPR16829 - trigger STAPBM_VERBOSE=true with two or more -v flags
Lukas Berk [Wed, 16 Apr 2014 13:45:20 +0000 (09:45 -0400)]
PR16829 - trigger STAPBM_VERBOSE=true with two or more -v flags

*tapset-method.cxx - pass STAPBM_VERBOSE=true automatically when -vv or
     higher is specified to make debugging setup issues
     easier

10 years agoAUTHORS bump
Josh Stone [Tue, 15 Apr 2014 23:38:33 +0000 (16:38 -0700)]
AUTHORS bump

10 years agoUse pid2task when passing pid to task_execname(v2)
Masatake YAMATO [Mon, 14 Apr 2014 05:58:39 +0000 (14:58 +0900)]
Use pid2task when passing pid to task_execname(v2)

In v2 the case when pid2task returns NULL is handled.
Suggested by Josh Stone <jistone@redhat.com>.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agosystemtap.exp: make kill proc smarter
Jonathan Lebon [Tue, 15 Apr 2014 16:24:54 +0000 (12:24 -0400)]
systemtap.exp: make kill proc smarter

Rather than waiting the full timeout, check in between whether the
process has exited, in which case there's no need to send SIGKILL.

10 years agoruntime: linux 3.14 porting: case when CONFIG_USER_NS not defined
Victor Kamensky [Tue, 8 Apr 2014 05:23:39 +0000 (22:23 -0700)]
runtime: linux 3.14 porting: case when CONFIG_USER_NS not defined

Fix build problem for linux-3.14 case with config where
CONFIG_USER_NS is not defined. With CONFIG_UIDGID_STRICT_TYPE_CHECKS
removed (261000a56b6382f597bcb12000f55c9ff26a1efb) access to
kuid_t and kgid_t should happen through from_k?uid_munged call.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
10 years agoNEWS: note improvements in stap --use-server=ADDRESS:PORT support
Frank Ch. Eigler [Tue, 15 Apr 2014 00:16:12 +0000 (20:16 -0400)]
NEWS: note improvements in stap --use-server=ADDRESS:PORT support

10 years agowarning::debuginfo man page: xref stap-prep more
Frank Ch. Eigler [Sun, 13 Apr 2014 20:10:55 +0000 (16:10 -0400)]
warning::debuginfo man page: xref stap-prep more

10 years agoRemove a mis-added file
Josh Stone [Sat, 12 Apr 2014 00:13:20 +0000 (17:13 -0700)]
Remove a mis-added file

10 years agotestsuite: send stress invocation notices to the log
Josh Stone [Sat, 12 Apr 2014 00:10:16 +0000 (17:10 -0700)]
testsuite: send stress invocation notices to the log

10 years agostaprun: Add one slot to stapio's argv[]
Josh Stone [Fri, 11 Apr 2014 23:50:37 +0000 (16:50 -0700)]
staprun: Add one slot to stapio's argv[]

It needs argc+2 to add one argument and allow for the uncounted NULL.

10 years agoMake sure print_format::format_component starts clear
Josh Stone [Fri, 11 Apr 2014 23:42:12 +0000 (16:42 -0700)]
Make sure print_format::format_component starts clear

10 years agostap-report: also report lockdep-related kernel config items
Frank Ch. Eigler [Thu, 10 Apr 2014 22:26:00 +0000 (18:26 -0400)]
stap-report: also report lockdep-related kernel config items

10 years agoi18n po update
Frank Ch. Eigler [Thu, 10 Apr 2014 14:14:40 +0000 (10:14 -0400)]
i18n po update

10 years agoPR16719: Fix a couple leaked Dwfl instances
Josh Stone [Thu, 10 Apr 2014 00:27:13 +0000 (17:27 -0700)]
PR16719: Fix a couple leaked Dwfl instances

* setupdwfl.cxx (setup_dwfl_kernel): When recursing into another round
  after downloading, call dwfl_end on the Dwfl that we already started.
* tapset.cxx (tracepoint_builder::init_dw): Call dwfl_end on the Dwfl
  used to fill in the s.kernel_source_tree.
* testsuite/systemtap.base/pr16719.exp: Add a tracepoint subtest.

10 years agoPR16716: Fix types in syscall.sched_{getscheduler,setscheduler,rr_get_interval}
David Smith [Wed, 9 Apr 2014 17:00:05 +0000 (12:00 -0500)]
PR16716: Fix types in syscall.sched_{getscheduler,setscheduler,rr_get_interval}

* tapset/linux/syscalls2.stp (syscall.sched_getscheduler): Fixed types.
  (syscall.sched_setscheduler): Ditto.
  (syscall.sched_rr_get_interval): Fixed nesting and types. Also change
  'argstr' to just have a pointer to the 'struct timespec' value, since
  that is an output parameter and decoding it on input won't produce
  anything of value.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_sched_policy_str): Updated to handle new
  values, including the new SCHED_RESET_ON_FORK flag.
* testsuite/systemtap.syscall/test.tcl (run_one_test): Since execname()
  only returns the first 15 characters of the test program name, truncate
  it.
* testsuite/systemtap.syscall/sched_getscheduler.c: New testcase
* testsuite/systemtap.syscall/sched_rr_get_interval.c: Ditto.
* testsuite/systemtap.syscall/sched_setscheduler.c: Ditto.

10 years agoBetter cleanup in testsuite/systemtap.base/callee.exp.
David Smith [Wed, 9 Apr 2014 16:35:06 +0000 (11:35 -0500)]
Better cleanup in testsuite/systemtap.base/callee.exp.

10 years agopublican docs: make buildable on f19 w/ fop
Frank Ch. Eigler [Wed, 9 Apr 2014 15:16:52 +0000 (11:16 -0400)]
publican docs: make buildable on f19 w/ fop

Some funky errors occur on some fedora installations featuring perhaps
only partial publican setup, or some other mysterious causes.  Add
some xml tags to hit the default ="common" case, and add a Makefile
conditional to have publican force --pdftool=fop rather than
wkhtmltopdf, which fails in entertaining ways sometimes.

10 years agoPR16716 partial fix: Better types in 'syscall.madvise'.
David Smith [Mon, 7 Apr 2014 16:44:16 +0000 (11:44 -0500)]
PR16716 partial fix: Better types in 'syscall.madvise'.

* tapset/linux/syscalls.stp (syscall.madvise): Fixed types.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_madvice_advice_str): Update.
* testsuite/systemtap.syscall/madvise.c: New testcase.
* testsuite/systemtap.syscall/sendfile.c: Update "COVERAGE" comment.

10 years agoBZ1084692: adapt to kernel droppage of CPUFREQ_RESUMECHANGE
Frank Ch. Eigler [Sat, 5 Apr 2014 16:19:19 +0000 (12:19 -0400)]
BZ1084692: adapt to kernel droppage of CPUFREQ_RESUMECHANGE

Just #ifdef the bad boy.

10 years agotestsuite: tighten the verbosity of at_var_void_stmt
Josh Stone [Fri, 4 Apr 2014 22:04:48 +0000 (15:04 -0700)]
testsuite: tighten the verbosity of at_var_void_stmt

This test is only looking for specific "Eliding..." messages, so it
doesn't really need everything to be verbose, just pass-2.

10 years agotestsuite: perf counter test improvements
Josh Stone [Fri, 4 Apr 2014 21:14:41 +0000 (14:14 -0700)]
testsuite: perf counter test improvements

- Use anchored -re patterns for more precise matching.
- Remove unused counter_a/b that caused unmatched warnings.
- Allow "max towers" to be one digit less.

10 years agoparse: note "@perf" as a built-in
Josh Stone [Thu, 3 Apr 2014 00:32:05 +0000 (17:32 -0700)]
parse: note "@perf" as a built-in

- Add "@perf" to lexer::atwords for macro-conflict warnings.
- Don't bother with any --compatible check.

10 years agoAUTHORS update
Frank Ch. Eigler [Fri, 4 Apr 2014 19:43:21 +0000 (15:43 -0400)]
AUTHORS update

10 years agonew sample: 2048 game
NeoCat [Fri, 4 Apr 2014 19:32:35 +0000 (15:32 -0400)]
new sample: 2048 game

Kindly donated from its original home at:
https://gist.github.com/NeoCat/9947862

10 years agoPR16307: testsuite: use new kill proc
Jonathan Lebon [Wed, 2 Apr 2014 20:24:08 +0000 (16:24 -0400)]
PR16307: testsuite: use new kill proc

Replace 'exec kill' by a call to the new kill proc, which accounts for
double-dashing as necessary. Where it makes sense, the timeout argument
was also used so that a SIGKILL was also sent after a few seconds.

10 years agoPR16307: proc kill: new proc for safer killing
Jonathan Lebon [Wed, 2 Apr 2014 16:31:36 +0000 (12:31 -0400)]
PR16307: proc kill: new proc for safer killing

During setup, check what kind of kill executable we're dealing with to
find out whether we'll need to use double dashes when calling it. We
also create a new kill proc that takes this into account when calling
kill.

10 years agoPR16716 partial fix: Better types in 'syscall.shutdown'.
David Smith [Thu, 3 Apr 2014 20:08:56 +0000 (15:08 -0500)]
PR16716 partial fix: Better types in 'syscall.shutdown'.

* tapset/linux/syscalls2.stp: Fix types in syscall.shutdown.
* tapset/linux/aux_syscalls.stp: Convert _shutdown_how_str() to use
  _stp_lookup_str().
* runtime/linux/compat_net.h: Define SHUT_* for RHEL5.
* testsuite/systemtap.syscall/shutdown.c: New testcase.

10 years agoPR16716 partial fix: Better types in 'syscall.{accept,accept4}'.
David Smith [Thu, 3 Apr 2014 18:58:00 +0000 (13:58 -0500)]
PR16716 partial fix: Better types in 'syscall.{accept,accept4}'.

* tapset/linux/syscalls.stp (syscall.accept): Split into 'syscall.accept'
  and 'syscall.accept4'. Fix types and nesting. Deprecate 'flags' and
  'flags_str'
  (syscall.accept4): New probe alias.
* tapset/linux/nd_syscalls.stp: Ditto.
* runtime/linux/compat_unistd.h: Add __NR_accept and __NR_accept4 defines.
* testsuite/systemtap.syscall/accept.c: New testcase.
* testsuite/systemtap.syscall/accept4.c: Ditto.
* testsuite/buildok/syscalls-detailed.stp: Updated with accept/accept4
  changes.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* NEWS: Mention variable deprecations.
* testsuite/systemtap.syscall/net1.c: Minor update.
* testsuite/systemtap.syscall/sendmmsg.c: Check for SYS_SENDMSG.

10 years agoMake _sock_type_str() and _sock_flags_str() handle undefined values properly.
David Smith [Thu, 3 Apr 2014 16:28:26 +0000 (11:28 -0500)]
Make _sock_type_str() and _sock_flags_str() handle undefined values properly.

* tapset/linux/aux_syscalls.stp: Update _sock_type_str() and
  _sock_flags_str() to handle undefined values properly.
* testsuite/systemtap.syscall/socket.c: Update expected output.
* testsuite/systemtap.syscall/socketpair.c: Ditto.

10 years agoMake vm.pagefault and vm.pagefault.return probe only one real function
William Cohen [Wed, 2 Apr 2014 20:16:21 +0000 (16:16 -0400)]
Make vm.pagefault and vm.pagefault.return probe only one real function

Newer versions of the kernel have both __handle_mm_fault and
handle_mm_fault functions.  The __handle_mm_fault may be inlined for
some kernel causing some arguments and the return probe to be
unavailable.  The memory tapset should just watch one of these
functions to instrument.

10 years agoload/stress generation for examples: followup
Frank Ch. Eigler [Wed, 2 Apr 2014 18:36:28 +0000 (14:36 -0400)]
load/stress generation for examples: followup

Changed all remaining "sleep 0.2" test cases to "sleep 1", so that the
check.exp mapping to "/usr/bin/stress ...." is triggered.  Further,
made the stress a little more stressy with more i/o workload.

10 years agoAdjust the output of sched_switch.stp to be more readable
William Cohen [Wed, 2 Apr 2014 19:50:23 +0000 (15:50 -0400)]
Adjust the output of sched_switch.stp to be more readable

Several numerical values were printed as one string of digits.  Placed
spaces between the numbers and adjusted to formatting so that the output
is easier to read.

10 years agoPR16716 partial fix: Better types in 'syscall.{sendmsg,sendmmsg}'.
David Smith [Wed, 2 Apr 2014 19:22:55 +0000 (14:22 -0500)]
PR16716 partial fix: Better types in 'syscall.{sendmsg,sendmmsg}'.

* tapset/linux/syscalls2.stp: Fixed types and nesting in
  'syscall.{sendmsg,sendmmsg}.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/syscalls.stpm: Added __compat_syscall() macro.
* tapset/linux/aux_syscalls.stp: Includes compat_net.h.
* runtime/linux/compat_net.h: New file.
* runtime/linux/compat_unistd.h: Added defines.
* testsuite/systemtap.syscall/sendmmsg.c: New test.
* testsuite/systemtap.syscall/sendmsg.c: Ditto.

10 years agotestsuite: recvmsg.c don't use unitialized bytes.
Mark Wielaard [Wed, 2 Apr 2014 13:01:43 +0000 (15:01 +0200)]
testsuite: recvmsg.c don't use unitialized bytes.

valgrind flags the buffer as containing random bytes when the read call
fails.

10 years agoproc stap_run_error: also use -KILL in case -INT fails
Jonathan Lebon [Tue, 1 Apr 2014 21:18:52 +0000 (17:18 -0400)]
proc stap_run_error: also use -KILL in case -INT fails

Just like the previous commit, but for stap_run_error.

It can happen that a stap session started with stap_run_error ignores
-INT, in which case we need to be a little meaner and use -KILL.

10 years agoproc stap_run: also use -KILL in case -INT fails
Jonathan Lebon [Tue, 1 Apr 2014 20:48:03 +0000 (16:48 -0400)]
proc stap_run: also use -KILL in case -INT fails

It can happen that a stap session started with stap_run ignores -INT, in
which case we need to be a little meaner and use -KILL.

10 years agolisting_mode.exp: new testcase for -l/-L
Jonathan Lebon [Tue, 1 Apr 2014 19:35:43 +0000 (15:35 -0400)]
listing_mode.exp: new testcase for -l/-L

The -l and -L switches of stap are extensively used throughout the
testsuite. However, there were no testcases explicitly testing them.

10 years agodump_probe_aliases.exp: new testcase for --dump-probe-aliases
Jonathan Lebon [Tue, 1 Apr 2014 15:41:39 +0000 (11:41 -0400)]
dump_probe_aliases.exp: new testcase for --dump-probe-aliases

10 years agostap: unite all dumping modes into s.dump_mode
Jonathan Lebon [Mon, 31 Mar 2014 20:11:27 +0000 (16:11 -0400)]
stap: unite all dumping modes into s.dump_mode

Clean up the way dumping modes are implement. We create a new enum
member which tracks the type of dumping wanted. This enum handles all
stap invocations which do not directly handle a user-script:
-l/-L/--dump-probe-types/--dump-probe-aliases/--dump-functions. It also
allows us to clean up the cmdline_script/have_script hacks previously
used in switch handling.

The trickiest part about this patch is to now allow for the possibility
of s.user_file to be NULL throughout passes 1 and 2, which previously
always assumed a script was present.

10 years agoNEWS: add blurb about new dump switches
Jonathan Lebon [Mon, 31 Mar 2014 21:15:16 +0000 (17:15 -0400)]
NEWS: add blurb about new dump switches

10 years agostap: add --dump-probe-aliases
Jonathan Lebon [Fri, 28 Mar 2014 22:02:20 +0000 (18:02 -0400)]
stap: add --dump-probe-aliases

We add a new --dump-probe-aliases switch, which dumps all the aliases
picked up in library files after pass 1 and then exits. Aliases whose
names don't start with '_' are hidden behind a -v.

Also change probe_alias::printsig() so that epilogue-style aliases are
printed properly.

10 years agoMake _struct_sockaddr_u_impl() tapset function output more consistent.
David Smith [Tue, 1 Apr 2014 19:01:16 +0000 (14:01 -0500)]
Make _struct_sockaddr_u_impl() tapset function output more consistent.

* tapset/linux/aux_syscalls.stp (_struct_sockaddr_u_impl): Make output
  more consistent. When _struct_sockaddr_u_impl() succeeds, it returns
  '{INFO}'. When it failed, it returned '[...]'. Now when it fails it
  returns '{...}'.
* testsuite/systemtap.syscall/bind.c: Updated expected test output.
* testsuite/systemtap.syscall/connect.c: Updated expected test output.
* testsuite/systemtap.syscall/sendto.c: Updated expected test output.

10 years agoPR16716 partial fix: Better types in 'syscall.{send,sendto}'.
David Smith [Tue, 1 Apr 2014 18:30:06 +0000 (13:30 -0500)]
PR16716 partial fix: Better types in 'syscall.{send,sendto}'.

* tapset/linux/syscalls2.stp: Fixed types and nesting in
  'syscall.{send,sendto}'. Fixed a few more types in
  'syscall.{recv,recvfrom}'.
* tapset/linux/nd_syscalls2.stp: Ditto.
* runtime/linux/compat_unistd.h: Added __NR_sendto.
* tapset/linux/aux_syscalls.stp: Be sure we have the SYS_* defines by
  including '<linux/net.h>'.
* testsuite/systemtap.syscall/send.c: New testcase.
* testsuite/systemtap.syscall/sendto.c: New testcase.
* testsuite/systemtap.syscall/recv.c: Added more testing of the 'flags'
  parameter.
* testsuite/systemtap.syscall/recvfrom.c: Ditto.
* testsuite/systemtap.syscall/recvmmsg.c: Ditto.
* testsuite/systemtap.syscall/recvmsg.c: Ditto.

10 years agoUse FD_SETSIZE for select() in other syscall tests.
David Smith [Tue, 1 Apr 2014 13:54:52 +0000 (08:54 -0500)]
Use FD_SETSIZE for select() in other syscall tests.

* testsuite/systemtap.syscall/connect.c: Use FD_SETSIZE for select()
  parameter.
* testsuite/systemtap.syscall/recv.c: Ditto.
* testsuite/systemtap.syscall/recvfrom.c: Ditto.

10 years agoruntime: Use INIT_WORK_ONSTACK for perf
Josh Stone [Tue, 1 Apr 2014 00:33:36 +0000 (17:33 -0700)]
runtime: Use INIT_WORK_ONSTACK for perf

This only appears to matter for debug kernels, but rawhide is such.

10 years agoPR16665: Tweak buildok/task_rlimit_test.stp
Josh Stone [Mon, 31 Mar 2014 21:54:03 +0000 (14:54 -0700)]
PR16665: Tweak buildok/task_rlimit_test.stp

- Add "#! stap -p4" for direct execution.
- Expect its failure in buildok-dyninst.exp, since it's kernel only.

10 years agosyscall recv*msg tests: use FD_SETSIZE for select(2) parameter 1
Frank Ch. Eigler [Mon, 31 Mar 2014 20:33:41 +0000 (16:33 -0400)]
syscall recv*msg tests: use FD_SETSIZE for select(2) parameter 1

10 years agoFix recvmmsg() testcase for kernels < 2.6.34.
David Smith [Mon, 31 Mar 2014 19:09:54 +0000 (14:09 -0500)]
Fix recvmmsg() testcase for kernels < 2.6.34.

* testsuite/systemtap.syscall/recvmmsg.c: Change MSG_WAITFORONE flag to
  MSG_DONTWAIT, since MSG_WAITFORONE is only supported since linux
  2.6.34.

10 years agoMake recvmmsg() testcase more robust.
David Smith [Mon, 31 Mar 2014 18:50:58 +0000 (13:50 -0500)]
Make recvmmsg() testcase more robust.

* testsuite/systemtap.syscall/recvmmsg.c: Make testcase more robust. It no
  longer waits forever for recvmmsg.c to receive a message.

10 years agoPR16766 cont'd: tolerate STAP_SESSION_ERROR in module_refresh callback
Frank Ch. Eigler [Sun, 30 Mar 2014 12:17:23 +0000 (08:17 -0400)]
PR16766 cont'd: tolerate STAP_SESSION_ERROR in module_refresh callback

If a systemtap module is in error state (but not yet shut down via
message from stapio/staprun), it may harmlessly continue receiving
and processing module-notification callbacks.

10 years agostap.1: document possible issues with --use-server --dump-functions
Jonathan Lebon [Fri, 28 Mar 2014 20:56:58 +0000 (16:56 -0400)]
stap.1: document possible issues with --use-server --dump-functions

10 years agomain(): print e.what() for exceptions
Jonathan Lebon [Fri, 28 Mar 2014 20:10:22 +0000 (16:10 -0400)]
main(): print e.what() for exceptions

Instead of catching just runtime_errors in the outermost handler, use
exception to catch all ranges of printable exceptions.

10 years agoruntime: improve the preempt_enable_no_resched copy
Josh Stone [Fri, 28 Mar 2014 20:53:15 +0000 (13:53 -0700)]
runtime: improve the preempt_enable_no_resched copy

The variant introduced in commit 651a87924c22 only handled the
CONFIG_PREEMPT_COUNT side of things, which causes mayhem when that's not
set, as with kernel-3.14.0-0.rc8.git0.1.fc21.x86_64.  The #else case just
needs a barrier().  The former "TODO rethink" still stands.

10 years agoPR16766 cont'd: unbreak --runtime=dyninst
Frank Ch. Eigler [Fri, 28 Mar 2014 19:24:19 +0000 (15:24 -0400)]
PR16766 cont'd: unbreak --runtime=dyninst

* translate.cxx: While emitting systemtap_module_refresh(), protect
  the printk diagnostics with #if defined(__KERNEL__).

10 years agoPR16716 partial fix: Fix 'syscall.{recv,recvfrom}' on 32-bit platforms.
David Smith [Fri, 28 Mar 2014 19:10:01 +0000 (14:10 -0500)]
PR16716 partial fix: Fix 'syscall.{recv,recvfrom}' on 32-bit platforms.

* tapset/uconversions.stp (user_ulong): New function.
  (user_ulong_warn): Ditto.
* tapset/linux/syscalls2.stp: Change all calls to user_uint64() to
  user_ulong(), so that 32-bit platforms are handled correctly.
* tapset/linux/nd_syscalls2.stp: Ditto. Also added asmlinkage() calls to
  'nd_syscall.{recv,recvfrom}'.
* testsuite/buildok/conversions-embedded.stp: Added build tests for
  user_ulong() and user_ulong_warn().
* testsuite/buildok/conversions.stp: Ditto.

10 years agoPR16665: fix generated doc directory
Frank Ch. Eigler [Fri, 28 Mar 2014 16:16:30 +0000 (12:16 -0400)]
PR16665: fix generated doc directory

10 years agoPR16665: new tapset for task resource limit queries + demo script
Robin Hack [Fri, 28 Mar 2014 15:52:10 +0000 (11:52 -0400)]
PR16665: new tapset for task resource limit queries + demo script

* tapset/linux/rlimit.stp, task.stp: New function task_rlimit() and
  assistants.
* testsuite/systemtap.examples/process/rlimit_nofile.*: New sample.

10 years agoRemove outdated comments from nd_syscalls.stp and nd_syscalls2.stp.
David Smith [Fri, 28 Mar 2014 15:49:04 +0000 (10:49 -0500)]
Remove outdated comments from nd_syscalls.stp and nd_syscalls2.stp.

* tapset/linux/nd_syscalls.stp: No actual code change. Remove old comments
  showing the syscall variant of the probe. These comments have gotten out
  of date, and it isn't that hard to lookup the syscall variant of the
  probe. In addition, having these comments present prevents easily
  looking for actual '$var' references that shouldn't be there.
* tapset/linux/nd_syscalls2.stp: Ditto.

10 years agoPR16716 partial fix: Better types in 'syscall.{recvmsg,recvmmsg}'
David Smith [Fri, 28 Mar 2014 15:17:24 +0000 (10:17 -0500)]
PR16716 partial fix: Better types in 'syscall.{recvmsg,recvmmsg}'

* tapset/linux/syscalls2.stp: Fix types and nesting in
  'syscall.{recvmsg,compat_sys_recvmsg,recvmmsg,compat_recvmmsg}'.
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/systemtap.syscall/recvmmsg.c: New test.
* testsuite/systemtap.syscall/recvmsg.c: Ditto.
* testsuite/systemtap.syscall/connect.c: Updated.
* testsuite/systemtap.syscall/recv.c: Ditto.
* testsuite/systemtap.syscall/recvfrom.c: Ditto.

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