]> sourceware.org Git - systemtap.git/log
systemtap.git
11 years agostapdyn: add stapdyn.8 man page
Frank Ch. Eigler [Thu, 20 Jun 2013 15:02:01 +0000 (11:02 -0400)]
stapdyn: add stapdyn.8 man page

11 years agoPR15656: Check allow_execmod for stapdyn attach
Josh Stone [Thu, 20 Jun 2013 01:23:24 +0000 (18:23 -0700)]
PR15656: Check allow_execmod for stapdyn attach

We already check for deny_ptrace and allow_execstack before stapdyn can
proceed, but it turns out that allow_execmod is also important for
Dyninst to attach to processes (e.g. stapdyn -x PID).

* stapdyn/dynutil.cxx (check_dyninst_sebools): If we're going to be
  attaching to a process, check allow_execmod too.
* stapdyn/stapdyn.cxx (main): Indicate whether we're attaching.

11 years agoAvoid uprobes crash on error.
Torsten Polle [Wed, 19 Jun 2013 21:05:48 +0000 (16:05 -0500)]
Avoid uprobes crash on error.

* runtime/linux/uprobes/uprobes.c (uprobe_free_process): Make sure the
  uprobe_proceess' hlist field is initialized before trying to deleted it,
  to avoid a NULL pointer dereference.
* runtime/linux/uprobes2/uprobes.c (uprobe_free_process): Ditto.

11 years agouprobes_filtering.exp: add dependency on inode-uprobes
Jonathan Lebon [Wed, 19 Jun 2013 20:09:23 +0000 (16:09 -0400)]
uprobes_filtering.exp: add dependency on inode-uprobes

Added a check for the presence of inode-based uprobes, otherwise this
test is irrelevant. Also changed behaviour to conform to other tests
by declaring as untested when installtest_p() is false, rather than
only returning.

Also removed an outdated comment about ignorestderr.

11 years agotestsuite/systemtap.base: add new testcase uprobes_filtering.exp
Jonathan Lebon [Wed, 19 Jun 2013 14:12:48 +0000 (10:12 -0400)]
testsuite/systemtap.base: add new testcase uprobes_filtering.exp

This new testcase uses the newly implemented define UPROBES_HITCOUNT
(see previous commit) to verify that uprobes filtering work as it
should.

If prefiltering is supported by the kernel (from 3.9), then it verifies
that UPROBE_HANDLER_REMOVE is obeyed and that the prehandler() is not
called over and over for unwanted processes, allowing the stap script
to run at full speed.

In both cases (whether or not prefiltering is supported), it also
verifies that the probe handlers are called only for the processes of
interest and no other (i.e. it makes sure that the filtering in
stapiu_probe_prehandler() works).

11 years agouprobes-inode.c: add UPROBES_HITCOUNT
Jonathan Lebon [Fri, 14 Jun 2013 19:06:46 +0000 (15:06 -0400)]
uprobes-inode.c: add UPROBES_HITCOUNT

Added a new directive 'UPROBES_HITCOUNT' which causes stapiu to keep
track of the number of times stapiu_probe_prehandler() and
stapiu_probe_handler() are called. Upon exiting, stapiu_exit() prints
these numbers.

These are important statistics which allow us to verify that uprobe
filtering is working as it should.

11 years agotranslator: for --vp 05, print log of dwarf module/filename matches during elfutils...
Frank Ch. Eigler [Wed, 19 Jun 2013 17:52:38 +0000 (13:52 -0400)]
translator: for --vp 05, print log of dwarf module/filename matches during elfutils search

11 years agoAnother 'as_non_root' improvement.
David Smith [Tue, 18 Jun 2013 20:46:48 +0000 (15:46 -0500)]
Another 'as_non_root' improvement.

11 years agoFix tcl and logic errors in rlimit.exp.
David Smith [Tue, 18 Jun 2013 19:18:47 +0000 (14:18 -0500)]
Fix tcl and logic errors in rlimit.exp.

* testsuite/systemtap.base/rlimit.exp: To make sure "sudo stap" works
  correctly, use the full path.
* testsuite/lib/systemtap.exp (as_non_root): If we're running as root, use
  user "nobody" to run commands.

11 years agoFix a tcl error in testsuite/systemtap.base/library.exp.
David Smith [Tue, 18 Jun 2013 17:32:06 +0000 (12:32 -0500)]
Fix a tcl error in testsuite/systemtap.base/library.exp.

* testsuite/systemtap.base/library.exp (globbing_test): When a timeout
  happens, fail properly.

11 years agoMade several parseko/semko tests executable.
David Smith [Tue, 18 Jun 2013 17:28:29 +0000 (12:28 -0500)]
Made several parseko/semko tests executable.

* testsuite/parseko/fiftyone.stp: Made executable.
* testsuite/parseko/perf03.stp: Ditto.
* testsuite/parseko/perf04.stp: Ditto.
* testsuite/parseko/regex_notlit.stp: Ditto.
* testsuite/parseko/twentyeight.stp: Ditto.
* testsuite/semko/badregex01.stp: Ditto.

11 years agoRevert use of -javaagent
Lukas Berk [Tue, 18 Jun 2013 16:20:34 +0000 (12:20 -0400)]
Revert use of -javaagent

There are two methods of invoking and running byteman operations on
java processes, modifying the java arguments to make use of -javaagent,
or utilizing byteman to use the VMAttach runtime libraries.  While
use of -javaagent may work in simple use cases, for our needs using
byteman operations should always be the preferred option.  This commit
also removes duplicate argument specifications (-Dorg.jboss-listener-port)

*java/stapbm.in - remove use of -javaagent and revert to byteman operations

11 years agoAdd the dyninst include path to the cscope target
Josh Stone [Fri, 14 Jun 2013 20:51:08 +0000 (13:51 -0700)]
Add the dyninst include path to the cscope target

11 years agoconfigure.ac: change `sqlite3' to straight 'sqlite3'
Josh Stone [Fri, 14 Jun 2013 20:40:01 +0000 (13:40 -0700)]
configure.ac: change `sqlite3' to straight 'sqlite3'

Vim syntax highlighting gets confused by the unpaired "`", and this
string is only used for a config.h comment, so just use plain "'".

11 years agoPlace HelperSDT in its own package, use -javaagent for byteman invocation
Lukas Berk [Fri, 14 Jun 2013 19:46:06 +0000 (15:46 -0400)]
Place HelperSDT in its own package, use -javaagent for byteman invocation

In order to use stapbm with jboss-as, we need to package our HelperSDT class
along with this we need to use -javaagent to invoke the byteman commands (simply
a syntax change, actual functionality from our persepctive remains the same)
Due to the package name (org.systemtap.byteman.helper) we need to change the
directory HelperSDT.java is located in and autoreconf the makefile changes

*java/HelperSDT.c: change class name to include full package name
*java/HelperSDT.h: likewise
*java/Makefile.am: change location of HelperSDT.java to match package name
*java/Makefile.in: likewise
*java/HelperSDT.java: move to org/systemtap/byteman/helper to match package name
*java/stapbm.in: alter helper name to include package and invoke byteman operations
 using the -javaagent syntax
*Makefile.in: Regnerate with autoconf 2.69
*aclocal.m4: likewise
*config.in: likewise
*configure: likewise
*doc/Makefile.in: likewise
*doc/SystemTap_Tapset_Reference/Makefile.in: likewise
*doc/beginners/Makefile.in: likewise
*man/Makefile.in: likewise
*re2c-migrate/Makefile.in: likewise
*stapdyn/Makefile.in: likewise
*staprun/Makefile.in: likewise
*testsuite/Makefile.in: likewise
*testsuite/aclocal.m4: likewise
*testsuite/configure: likewise

11 years agoPR15619: Check prior stapdyn signals while waiting to exit
Josh Stone [Thu, 13 Jun 2013 22:21:42 +0000 (15:21 -0700)]
PR15619: Check prior stapdyn signals while waiting to exit

* stapdyn/mutator.cxx (mutator::run): When running without mutatees
  (which is really only done by the testsuite), use a proper signal mask
  and check for signals that may have already arrived.

11 years agoPR15624: Use 64-bit offsets in stapdyn modules
Josh Stone [Thu, 13 Jun 2013 22:14:05 +0000 (15:14 -0700)]
PR15624: Use 64-bit offsets in stapdyn modules

This is important for our memory deref functions, which could very well
try to pread/pwrite an "offset" which is greater than INT32_MAX.  Such
signed overflow results in EINVAL from the kernel.

* runtime/dyninst/runtime_defines.h: #define _FILE_OFFSET_BITS 64.
* runtime/dyninst/copy.c (__copy_from_user, __copy_to_user): Cast
  void* to off_t through uintptr_t for size and sign correctness.
* testsuite/systemtap.printf/pretty-bits.exp: Don't use kernel<header>
  for userspace, although this requires a trick to deal with tcl exec.
* testsuite/systemtap.printf/pretty-char.exp: Ditto.

11 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Thu, 13 Jun 2013 20:41:22 +0000 (15:41 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

11 years agoSmall initializion code fix needed for PR14791.
David Smith [Thu, 13 Jun 2013 20:39:42 +0000 (15:39 -0500)]
Small initializion code fix needed for PR14791.

* runtime/dyninst/session_attributes.c (_stp_init_session_attributes):
  Initialize 'outfile_name'.

11 years agonew test case for user_string_n_quoted()
Jonathan Lebon [Thu, 13 Jun 2013 20:32:20 +0000 (16:32 -0400)]
new test case for user_string_n_quoted()

This test case ensures that user_string_n_quoted() truncates strings
properly and without an off-by-one error. Also see PR15617.

11 years agouconversions.stp: fix pointer cast to be 32-bit compatible
Jonathan Lebon [Thu, 13 Jun 2013 20:21:54 +0000 (16:21 -0400)]
uconversions.stp: fix pointer cast to be 32-bit compatible

Reported-by: Josh Stone <jistone@redhat.com>
11 years ago(nd_)syscall.exp: adapt tests and fix umask test failure
Jonathan Lebon [Thu, 13 Jun 2013 15:02:29 +0000 (11:02 -0400)]
(nd_)syscall.exp: adapt tests and fix umask test failure

The recent changes in the *syscall tapsets were causing failures in a
few of the C files tested as part of nd_syscall.exp and syscall.exp.
These files had their expected output changed to match what is now
output.

Also, umask.c had been failing from before only because a '0' is
printed, not '00' as expected.

11 years agofix clamp_t arguments in user_string_n_quoted()
Jonathan Lebon [Thu, 13 Jun 2013 14:20:45 +0000 (10:20 -0400)]
fix clamp_t arguments in user_string_n_quoted()

The 'len' parameter passed to _stp_text_str() was incorrectly set to
1 higher than need be. The function _stp_text_str() does not count the
trailing NULL. In contrast, the function _stp_strncpy_from_user() does,
which is also used in this tapset, in which case 'len' should indeed be
incremented (see e.g. user_string_n()). This may have been the source
of the confusion.

11 years agoUse user_string_n_quoted() instead of text_strn() to truncate
Jonathan Lebon [Thu, 13 Jun 2013 13:07:54 +0000 (09:07 -0400)]
Use user_string_n_quoted() instead of text_strn() to truncate

Using text_strn() outside of user_string_quoted() resulted in having
two sets of surrounding quotes added. This did not occur before commit
2f65948, in which all user_string() calls were changed to
user_string_quoted(). So instead of using text_strn(), we can directly
use user_string_n_quoted(), which takes care of both quoting and
truncating in one place.

11 years agoPR15044: update testsuite to conform to uconversions.stp
Jonathan Lebon [Tue, 11 Jun 2013 18:47:34 +0000 (14:47 -0400)]
PR15044: update testsuite to conform to uconversions.stp

Due to user_string_quoted() now returning strings surrounded by quotes,
the test scripts utrace_syscall_args.stp and memory1.stp were updated.

Also, the try/catch block around user_string_n() in conversions.stp
were removed so that it counts instead as one more ERROR. Changed the
number of expected errors/warnings from 20 to 22 to account for the
error we now get from user_string_n() as well as from user_string(),
which now throws an error (see previous commit).

Updated all the other conversions_*.stp scripts so that they include
the two new functions. Also, they all had a duplicate probe for
user_string_n(), which messed up the count.

11 years agouconversions.stp: make use of similar funcs to promote code re-use
Jonathan Lebon [Tue, 11 Jun 2013 16:07:35 +0000 (12:07 -0400)]
uconversions.stp: make use of similar funcs to promote code re-use

Multiple functions were changes so that they now just call a more
generic function. The functions changed are: user_string(),
user_string2(), user_string2_warn(), and user_string_quoted().

11 years agoPR15044: make probe aliases use user_string_quoted()
Jonathan Lebon [Mon, 10 Jun 2013 20:05:03 +0000 (16:05 -0400)]
PR15044: make probe aliases use user_string_quoted()

Many probe aliases previously used user_string(). Now, they all use
user_string_quoted(), which never raises an error. Thus, the function
user_string() has been modified to throw an error if an address can't
be read.

By contrast, user_string_quoted() (and also user_string_n_quoted()) now
return the pointer itself as a string in case of failure, whereas
successfully retrieved strings are surrounded by double-quotes.

11 years agoReformat and add to stapdyn/README presentation list
Josh Stone [Wed, 12 Jun 2013 21:22:22 +0000 (14:22 -0700)]
Reformat and add to stapdyn/README presentation list

11 years agoNote the PR15614 limitation in stapdyn/README
Josh Stone [Wed, 12 Jun 2013 21:21:32 +0000 (14:21 -0700)]
Note the PR15614 limitation in stapdyn/README

11 years agoFix PR14791 by adding a '-o FILE' option to stapdyn.
David Smith [Wed, 12 Jun 2013 18:42:45 +0000 (13:42 -0500)]
Fix PR14791 by adding a '-o FILE' option to stapdyn.

* stapdyn/stapdyn.cxx (usage): Add '-o FILE' description (and better
  descriptions in general).
  (main): Add '-o' option support.
* stapdyn/mutator.cxx (init_session_attributes): If output file name was
  specified, set it with global_setter().
* stapdyn/dynutil.cxx: Add 'stapdyn_outfile_name' global.
* stapdyn/dynutil.h: Ditto.
* runtime/dyninst/transport.c (stap_strfloctime): New function (copied
  from staprun/common.c).
  (_stp_dyninst_transport_thread_func): Add output file support.
* buildrun.cxx (make_dyninst_run_command): Add '-o' output file name
  option.
* runtime/dyninst/session_attributes.c (stp_session_attribute_setter):
  Handle '@outfile_name' session attribute.
* runtime/dyninst/session_attributes.h: Added 'outfile_name' to
  _stp_session_attributes.
* testsuite/systemtap.base/strftime.exp: Add dyninst support.
* testsuite/systemtap.printf/end1.exp: Ditto.
* testsuite/systemtap.printf/mixed_out.exp: Ditto.
* testsuite/systemtap.printf/out1.exp: Ditto.
* testsuite/systemtap.printf/out2.exp: Ditto.
* testsuite/systemtap.printf/out3.exp: Ditto.

11 years agoPR14573: Add stapdyn register support for powerpc
Josh Stone [Wed, 12 Jun 2013 00:26:07 +0000 (17:26 -0700)]
PR14573: Add stapdyn register support for powerpc

* runtime/dyninst/regs.c (_stp_print_regs): Add a ppc version.
* runtime/dyninst/uprobes.c (stapdu_dummy_uregs): Just use {} to
  initialize, because {0} doesn't work for ->gpr[].
* runtime/dyninst/uprobes-regs.c (enter_dyninst_uprobe_regs): Ditto on
  initializing pt_regs, and add a loop to fill ppc dwarf registers.
* stapdyn/mutatee.cxx (get_dwarf_registers): Add ppc registers, but note
  that only 6 can be passed thanks to a Dyninst argument limitation.

11 years agoPR15029: Reflect script errors in stapdyn's exit status
Josh Stone [Tue, 11 Jun 2013 22:03:43 +0000 (15:03 -0700)]
PR15029: Reflect script errors in stapdyn's exit status

This adds a new stapdyn.h function to query the script/module's exit
status.  One wishes session_exit had returned this in the first place...

Tests beginenderror.exp and trycatch.exp were failing on dyninst, and
are now working with this fix.

* runtime/dyninst/stapdyn.h: Declare stp_dyninst_exit_status();
* runtime/dyninst/runtime.h: Implement it from a static global.
* runtime/dyninst/transport.c: Set that global on "ERROR:" messages,
  like stapio does with its error_detected flag.
* stapdyn/mutator.cxx (mutator::exit_status): New, looks for the new
  function in the module to get status.
* stapdyn/stapdyn.cxx (main): Call mutator::exit_status().

11 years agostapdyn: Let the module request to exit
Josh Stone [Tue, 11 Jun 2013 01:50:06 +0000 (18:50 -0700)]
stapdyn: Let the module request to exit

This adds a transport message STP_DYN_REQUEST_EXIT, on which the module
within stapdyn will signal stapdyn that we want to exit.  This also lets
stapdyn without any -c cmd work better, as it can wait around for the
exit signal.

11 years agoPR14665: improve stapdyn's signal handling
Josh Stone [Wed, 5 Jun 2013 19:52:39 +0000 (12:52 -0700)]
PR14665: improve stapdyn's signal handling

This changes stapdyn's signal handling to be a bit more like staprun's.
The signals considered now are SIGHUP, SIGINT, SIGTERM, and SIGQUIT,
with the latter being a more immediate exit.  The others will wait
around for any created process to finish, but this is debatable.

The heuristic of counting signals is gone, as it just didn't work very
well.  Instead this just tracks a mask of signals we've seen.  We also
don't try to kill the target process anymore, since staprun doesn't do
that either.  If a user hits CTRL-C on the command line, that will go
to the whole process group which includes the target.

11 years agoSimplify testsuite/systemtap.base/list.exp with procs
Josh Stone [Mon, 10 Jun 2013 23:18:24 +0000 (16:18 -0700)]
Simplify testsuite/systemtap.base/list.exp with procs

11 years agoPR15587: fix inline statement line numbers
Josh Stone [Mon, 10 Jun 2013 22:59:52 +0000 (15:59 -0700)]
PR15587: fix inline statement line numbers

* tapsets.cxx (query_srcfile_line): As with full function statements,
  use the destination lineno for inline statment probes, rather than the
  q->line from the user (which is 0 for wildcards).
* list.exp: Test probe listing for statements in an inline function.

11 years agoPR15278: Make use of UPROBE_HANDLER_REMOVE
Josh Stone [Mon, 10 Jun 2013 21:13:23 +0000 (14:13 -0700)]
PR15278: Make use of UPROBE_HANDLER_REMOVE

When a uprobe handler is called in a process we didn't want (thanks to
shared inodes), we already skip it if it's not in our process list.  Now
we also return UPROBE_HANDLER_REMOVE to let uprobes know the probe can
be removed from this particular process, so only participating processes
will incur breakpoint overhead.  We do have to be careful that task
finder's process coverage is complete though, so we don't remove probes
from a process that just wasn't tracked yet.

* runtime/linux/task_finder2.c (stap_task_finder_complete): New test to
  see if task_finder has hooked all processes yet; set after post_init.
* runtime/linux/uprobes-inode.c (stapiu_probe_prehandler): In processes
  which we're about to skip, use UPROBE_HANDLER_REMOVE if task finder
  says it has complete coverage.

11 years agoPR15044: modified and added tests in conversions.stp test script
Jonathan Lebon [Mon, 10 Jun 2013 13:40:12 +0000 (09:40 -0400)]
PR15044: modified and added tests in conversions.stp test script

Added a test for user_string2_warn() and user_string2_n_warn().
Modified Expect script to allow for 2 more errors and warnings, which
correspond to the two functions added. Also modified user_string_n()
test to use try/catch blocks.

11 years agoPR15044: rewrite the vma_vdso.stp test
Jonathan Lebon [Thu, 6 Jun 2013 17:24:13 +0000 (13:24 -0400)]
PR15044: rewrite the vma_vdso.stp test

The new vma_vdso.stp test script now uses the try/catch blocks to
determine whether umodname() failed or not.

11 years agoPR15044: keep cute return val and conditional check for last_error only
Jonathan Lebon [Mon, 10 Jun 2013 15:49:29 +0000 (11:49 -0400)]
PR15044: keep cute return val and conditional check for last_error only

In order to avoid the kernel panic which occurred due to a null pointer
(see previous commit), all patches in PR15044 were rechecked so that
the return value is always valid (by keeping its cute message) and the
conditional version check is done solely for assigning to last_error.

11 years agoPR15044: ucontext.stp: fix name == NULL bug on error
Jonathan Lebon [Fri, 7 Jun 2013 20:19:23 +0000 (16:19 -0400)]
PR15044: ucontext.stp: fix name == NULL bug on error

The 'name' variable was not assigned a value if _stp_umod_lookup()
failed. This means the call to strlcpy() happened even though 'name'
was NULL. Now, name is always assigned a value, even if
_stp_umod_lookup() fails.

11 years agoPR15044: added error-checking in string.stp
Jonathan Lebon [Thu, 6 Jun 2013 18:35:28 +0000 (14:35 -0400)]
PR15044: added error-checking in string.stp

Since commit 14138e5 changed the return value of _stp_text_str() from
void to int, other functions that use it, such as text_str() and
text_strn(), can make use of the return value to set their own return
strings to an empty string.

11 years agoPR15044: reversed patches in functions too popular in probe aliases
Jonathan Lebon [Thu, 6 Jun 2013 16:03:54 +0000 (12:03 -0400)]
PR15044: reversed patches in functions too popular in probe aliases

The following functions had their cutesy errors restored:
    - tapset/linux/ip.stp: format_ipaddr()
    - tapset/errno.stp: returnstr()
    - tapset/uconversions.stp: user_string()

These functions are used by many probe aliases, especially in the
*syscall* tapsets and for format_ipaddr(), in the network-related
tapsets, such as rpc.stp, tcp.stp, and netfilter.stp. Thus, it is not
ideal to throw an error in case of failure. See the discussion in the
associated bug report for more information.

11 years agoPR15044: hardcoded version 2.3
Jonathan Lebon [Wed, 5 Jun 2013 20:00:21 +0000 (16:00 -0400)]
PR15044: hardcoded version 2.3

Replaced all the snippets flagged with "PR15044" containing
STAP_COMPAT_VERSION to version 2.3.

11 years agoFix 'nd_syscall.io_getevents' probe.
David Smith [Mon, 10 Jun 2013 16:15:13 +0000 (11:15 -0500)]
Fix 'nd_syscall.io_getevents' probe.

* tapset/linux/nd_syscalls.stp: Split 'nd_syscall.io_getevents' into
  'nd_syscall.io_getevents' and 'nd_syscall.compat_io_getevents', since
  the kernel function 'compat_sys_io_getevents' gets a 'struct
  compat_timespec', not a 'struct timespec'.
* testsuite/buildok/nd_syscalls-details.stp: Add
  'nd_syscall.compat_io_getevents' and
  'nd_syscall.compat_io_getevents.return' tests.

11 years agoFix 'syscall.io_getevents' probe.
David Smith [Mon, 10 Jun 2013 16:06:27 +0000 (11:06 -0500)]
Fix 'syscall.io_getevents' probe.

* tapset/linux/syscalls.stp: Split 'syscall.io_getevents' into
  'syscall.io_getevents' and 'compat_syscall.io_getevents', since the
  kernel function 'compat_sys_io_getevents' gets a 'struct
  compat_timespec', not a 'struct timespec'.
* testsuite/buildok/syscalls-details.stp: Add
  'compat_syscall.io_getevents' and 'compat_syscall.io_getevents.return'
  tests.

11 years agoFixed s390x utrace_syscall_args.exp test failure.
David Smith [Fri, 7 Jun 2013 18:24:54 +0000 (13:24 -0500)]
Fixed s390x utrace_syscall_args.exp test failure.

* testsuite/systemtap.base/utrace_syscall_args.stp: Correctly handle odd
  s390x mmap() arguments in a structure.

11 years agoImprove buildok.exp by kfailing the unwind tests on ia64.
David Smith [Thu, 6 Jun 2013 21:13:17 +0000 (16:13 -0500)]
Improve buildok.exp by kfailing the unwind tests on ia64.

* testsuite/systemtap.pass1-4/buildok.exp: Mark the unwind tests as kfails
  on ia64, since the dwarf unwinder isn't ported there.

11 years agoFix multiple inclusion guard macro in runtime/compatdefs.h.
David Smith [Thu, 6 Jun 2013 21:04:56 +0000 (16:04 -0500)]
Fix multiple inclusion guard macro in runtime/compatdefs.h.

11 years agoFix uconversion.stp function summaries to be a single line
William Cohen [Thu, 6 Jun 2013 16:10:22 +0000 (12:10 -0400)]
Fix uconversion.stp function summaries to be a single line

The tool that extracts the information from the comments for the
tapset documentation needs the summary to be on a single line.  If the
summary continues to another line, the tool thinks the second line is
part of the description and will fail generating output because there
are multiple description for the same function.

11 years agoPR15575: Remove now-unnecessary ntohs() in a few places
Josh Stone [Wed, 5 Jun 2013 21:08:22 +0000 (14:08 -0700)]
PR15575: Remove now-unnecessary ntohs() in a few places

Now that __tcp_sock_dport/sport return host order, there are a few
related places which no longer need their own ntohs().

Reported-by: Jonathan Lebon <jlebon@redhat.com>
11 years agoPR15044: replaced error return by catchable exception in ucontext.stp
Jonathan Lebon [Tue, 4 Jun 2013 16:08:49 +0000 (12:08 -0400)]
PR15044: replaced error return by catchable exception in ucontext.stp

11 years agomemory.stp: fix documentation typo
Jonathan Lebon [Mon, 3 Jun 2013 18:21:05 +0000 (14:21 -0400)]
memory.stp: fix documentation typo

11 years agoPR15044: remove error return string in ip.stp
Jonathan Lebon [Mon, 3 Jun 2013 18:13:06 +0000 (14:13 -0400)]
PR15044: remove error return string in ip.stp

11 years agolinux/context-symbols: fix small typo in cutesy error return
Jonathan Lebon [Mon, 3 Jun 2013 17:51:06 +0000 (13:51 -0400)]
linux/context-symbols: fix small typo in cutesy error return

Fixes a typo in the return value which could affect backwards
compatibility with versions <= 2.2.

11 years agoPR15044: change _stp_text_str() from void to int and clean up tapset
Jonathan Lebon [Fri, 31 May 2013 18:38:02 +0000 (14:38 -0400)]
PR15044: change _stp_text_str() from void to int and clean up tapset

The tapset functions user_string_quoted() and user_string_n_quoted()
now no longer return "NULL" and _stp_text_str() in stp_string.c no
longer returns "<unknown>". Instead, _stp_text_str() was changed to
return an int which the tapset checks for to detect an error.

11 years agoPR15044: cleaned up functions in uconversions.stp
Jonathan Lebon [Thu, 30 May 2013 19:59:02 +0000 (15:59 -0400)]
PR15044: cleaned up functions in uconversions.stp

Made multiple changes to the way functions report errors. Also added
two new functions to help the cause: user_string2_warn() and
user_string2_n_warn().

11 years agoPR15044: clean up funcs in errno.stp and string.stp
Jonathan Lebon [Thu, 30 May 2013 19:11:44 +0000 (15:11 -0400)]
PR15044: clean up funcs in errno.stp and string.stp

In errno.stp, made returnstr() report an error if there are no
registers available rather than returning 0. In string.stp, changed
stringat() to report an error if pos is out of bounds.

Minor typo fix in logging.stp.

11 years agostapregex PR15064: update docs
Serguei Makarov [Wed, 5 Jun 2013 19:38:56 +0000 (15:38 -0400)]
stapregex PR15064: update docs

11 years agoPR15575: Return host order in __tcp_sock_dport/sport
Josh Stone [Wed, 5 Jun 2013 01:23:41 +0000 (18:23 -0700)]
PR15575: Return host order in __tcp_sock_dport/sport

The dport and sport are in network order in inet_sock.  When these
tapset functions extract them, they should convert to host order.

Reported-by: "bcall" on freenode #systemtap
11 years agoerrsnoop sample: reduce memory consumption
Frank Ch. Eigler [Tue, 4 Jun 2013 20:49:33 +0000 (16:49 -0400)]
errsnoop sample: reduce memory consumption

The previous version of the code used a stats- (per-cpu-) array with a
5-tuple of index keys, three of them strings.  Multiplying all that
out could could yield several hundred MB of requested kernel RAM at
startup.  Not that anything's wrong with that, but let's not be so
gluttinous.

The new code uses one formatted string as the key column.

11 years agostapregex PR15064: additional testsuite for chr classes
Serguei Makarov [Tue, 4 Jun 2013 18:14:41 +0000 (14:14 -0400)]
stapregex PR15064: additional testsuite for chr classes

11 years agostapregex PR15064 oops: actual proper \ escaping in chr class
Serguei Makarov [Tue, 4 Jun 2013 17:03:36 +0000 (13:03 -0400)]
stapregex PR15064 oops: actual proper \ escaping in chr class

11 years agostapregex PR15064: add remaining essential character classes
Serguei Makarov [Mon, 3 Jun 2013 21:04:06 +0000 (17:04 -0400)]
stapregex PR15064: add remaining essential character classes

This completes POSIX ERE support (ostensibly), but the chr classes
are largely untested at the moment; future commits will add testcases.

11 years agostapregex PR15064 testsuite OOPS: escaping support for ':' in testcase format
Serguei Makarov [Mon, 3 Jun 2013 21:03:38 +0000 (17:03 -0400)]
stapregex PR15064 testsuite OOPS: escaping support for ':' in testcase format

11 years agostapregex PR15064: groundwork for named chr class support
Serguei Makarov [Mon, 3 Jun 2013 18:45:31 +0000 (14:45 -0400)]
stapregex PR15064: groundwork for named chr class support

Current support is missing most of the standard chr classes,
need to find a good and proper reference for them.

* stapregex.cxx (regex_parser::parse_char_range): respect [: :] brackets
  when slurping character classes.
* re2c-regex.h (Range::Range): fix lack of deep-copy in copy constructor
  for ranges.
* re2c-regex.cxx (namedCharacterClasses): new global table of char ranges.
  (Scanner::namedChrClass): new function.
  (Scanner::ranToRA): new function.
  (Scanner::ranToRE): change to use ranToRA.
  (Scanner::getRange): check for '[:' digraph and replace named chr class.

11 years agostapregex: fix spacing in re2c_error message
Serguei Makarov [Mon, 3 Jun 2013 17:12:48 +0000 (13:12 -0400)]
stapregex: fix spacing in re2c_error message

11 years agoPR15064: re-enable basic testcases
Serguei Makarov [Mon, 3 Jun 2013 14:56:40 +0000 (10:56 -0400)]
PR15064: re-enable basic testcases

11 years ago(Re)Fix BZ15198 by updating syscall.sigaltstack probe.
David Smith [Tue, 4 Jun 2013 19:26:30 +0000 (14:26 -0500)]
(Re)Fix BZ15198 by updating syscall.sigaltstack probe.

* tapset/linux/syscalls2.stp: Use generic 'sigaltstack' probe alias when
  CONFIG_GENERIC_SIGALTSTACK is set or we're running on a 3.9 (or higher)
  kernel (where CONFIG_GENERIC_SIGALTSTACK is the default).
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/i386/nd_syscalls.stp: Only use arch-specific 'sigaltstack'
  probe alias if CONFIG_GENERIC_SIGALTSTACK isn't set or we're running on
  a earlier kernel than 3.8.
* 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.

11 years agoEliminate the possibility of ioblktime.stp global array overflow
William Cohen [Tue, 4 Jun 2013 16:05:12 +0000 (12:05 -0400)]
Eliminate the possibility of ioblktime.stp global array overflow

In some cases the global array tracking IO operations in flight could
overflow when the machine is doing many IO operations (RHBZ743591).
The possiblity of overflow is addressed by increasing the amount of
space allocated for the global array and using the '%' specifier for
the global array.

11 years agoFixed PR15572 by updating the ipmip.stp tapset.
David Smith [Tue, 4 Jun 2013 16:06:33 +0000 (11:06 -0500)]
Fixed PR15572 by updating the ipmip.stp tapset.

* tapset/linux/ipmib.stp: Updated the 'ipmib.InNoRoutes' and
  'ipmib.InAddrErrors' probe aliases for the 3.10 kernel. Those probe
  aliases now probe the return of the ip_route_input_noref() kernel
  function.

11 years agoUpdate testsuite/buildok/nfs_proc-embedded.stp for nfs_proc.stp changes.
David Smith [Tue, 4 Jun 2013 13:36:12 +0000 (08:36 -0500)]
Update testsuite/buildok/nfs_proc-embedded.stp for nfs_proc.stp changes.

11 years agoFixed PR15523 by updating the socket.stp tapset.
David Smith [Tue, 4 Jun 2013 13:31:48 +0000 (08:31 -0500)]
Fixed PR15523 by updating the socket.stp tapset.

* tapset/linux/socket.stp: Reimplemented functions as macros. The old
  functions were deprecated. Used those new macros throughout the tapset,
  to avoid trying to use NULL pointers.
* NEWS: Mentioned function deprecations.
* testsuite/buildok/socket-embedded.stp: No longer test deprecated
  functions.

11 years agoFixed readability issues in tapset/linux/socket.stp. No code change.
David Smith [Mon, 3 Jun 2013 16:35:12 +0000 (11:35 -0500)]
Fixed readability issues in tapset/linux/socket.stp. No code change.

11 years agoActually deprecate items marked as deprecated in nfs_proc.stp.
David Smith [Mon, 3 Jun 2013 16:23:53 +0000 (11:23 -0500)]
Actually deprecate items marked as deprecated in nfs_proc.stp.

* tapset/linux/nfs_proc.stp: The 'stap_NFS_CLIENT' and '__getfh_inode'
  functions had a comment stating they were deprecated. Actually make it
  happen.
* NEWS: Mentioned function deprecations.

11 years agoHandle CONFIG_USER_NS/CONFIG_UIDGID_STRICT_TYPE_CHECKS in the runtime.
Alexander Y. Fomichev [Fri, 31 May 2013 19:46:56 +0000 (14:46 -0500)]
Handle CONFIG_USER_NS/CONFIG_UIDGID_STRICT_TYPE_CHECKS in the runtime.

* runtime/linux/task_finder.c: Add CONFIG_UIDGID_STRICT_TYPE_CHECKS code.
* runtime/linux/task_finder2.c: Ditto.
* runtime/transport/control.c: Ditto.
* runtime/transport/transport.c: Ditto.
* runtime/linux/autoconf-uidgid.c: New autoconf test.
* buildrun.cxx (compile_pass): Add STAPCONF_LINUX_UIDGID_H autoconf test.
* runtime/procfs.c: Include uidgid_compatibility.h.
* runtime/proc_fs_compatibility.h: Move KUIDT_INIT()/KGIDT_INIT() macros
  to uidgid_compatibility.h.
* runtime/transport/debugfs.c: Use KUIDT_INIT/KGIDT_INIT macros.
* runtime/transport/relay_v2.c: Ditto
* runtime/uidgid_compatibility.h: New file.

11 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Lukas Berk [Fri, 31 May 2013 15:37:05 +0000 (11:37 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

11 years agoAdjust stapbm.in and docs to avoid recurssion
Lukas Berk [Fri, 31 May 2013 15:33:03 +0000 (11:33 -0400)]
Adjust stapbm.in and docs to avoid recurssion

*NEWS: added news blurb
*java/stapbm.in: due to change in tapset-method.cxx and only probing
 probe begin, we're able to remove java recursion gaurds
 and simply
*main/stapprobes.3stap: update docs reflecting requirement of jvm pid's
to be prexisting and if a string is passed for
process name, it needs to be listed in a jps -l
invocation
*tapset-method.cxx: switch process("java").begin probe to probe begin
    in order to avoid recurssion due to byteman operations

11 years agoFixed BZ920444 by using macros to handle nfs parameter changes.
David Smith [Fri, 31 May 2013 14:05:23 +0000 (09:05 -0500)]
Fixed BZ920444 by using macros to handle nfs parameter changes.

* tapset/linux/nfs_proc.stpm: New file.
* tapset/linux/nfs_proc.stp: Remove __i2n_ip_proto(),
  __nfs_read_data_info(), and __nfs_write_data_info() functions. Callers
  of those functions now use new macros in nfs_proc.stpm. The advantage
  the macros have, besides clarity, is that they preserve type
  information. Kernel commit 0b7c01533aa9f4a228d07d2768d084acb3a387bc
  changed the commit functions to take a nfs_commit_data structure instead
  of a nfs_write_data_structure. Because functions lose type information,
  systemtap didn't notice this change.

11 years agoFixed readability issues in tapset/linux/nfs_proc.stp. No actual code change.
David Smith [Thu, 30 May 2013 14:49:19 +0000 (09:49 -0500)]
Fixed readability issues in tapset/linux/nfs_proc.stp. No actual code change.

11 years agoDouble-check DW_AT_comp_dir before we try to use it
Josh Stone [Wed, 29 May 2013 20:52:58 +0000 (13:52 -0700)]
Double-check DW_AT_comp_dir before we try to use it

In building tracepoints, we try a late search for the kernel source tree
using DW_AT_comp_dir, and add extra includes based on that path.  That
comp_dir is not always reliable though; for instance, Ubuntu leaves it
something like "/build/buildd/linux...", which is not an installed path.

(See also http://brainstorm.ubuntu.com/idea/11327)

* tapsets.cxx (tracepoint_builder::init_dw): Verify that the given
  DW_AT_comp_dir actually exists before we use it.

11 years agoRemove redundant assert_is_myproc from utf functions
Josh Stone [Wed, 29 May 2013 19:53:59 +0000 (12:53 -0700)]
Remove redundant assert_is_myproc from utf functions

* tapset/uconversions.stp (user_string_utf16, user_string_utf32): These
  are marked "/* myproc-unprivileged */", so the translator will insert
  the necessary assert_is_myproc() already.  Having a redundant check
  doesn't actually hurt, except it adds confusion by implying that other
  similar functions are in error for not having this too.

11 years agoFix PR15549 by updating the 'sunrpc.clnt.create_client' probe alias.
David Smith [Wed, 29 May 2013 18:53:59 +0000 (13:53 -0500)]
Fix PR15549 by updating the 'sunrpc.clnt.create_client' probe alias.

* tapset/linux/rpc.stp: Fix the 'sunrpc.clnt.create_client' probe alias by
  updating the '_sunrpc.clnt.create_client.rpc_new_client' probe alias.

11 years agosemop-watch: add some goofy <2.3 compatibility
Frank Ch. Eigler [Wed, 29 May 2013 16:45:49 +0000 (12:45 -0400)]
semop-watch: add some goofy <2.3 compatibility

11 years agonew sample: semop-watch.stp
Casey Dahlin [Wed, 29 May 2013 16:34:41 +0000 (12:34 -0400)]
new sample: semop-watch.stp

This sample demonstrates pulling apart userspace struct/array
parameters from syscall.* probe context.

11 years agotapset: standardize sem*op(2) sops_uaddr variable
Frank Ch. Eigler [Wed, 29 May 2013 15:52:23 +0000 (11:52 -0400)]
tapset: standardize sem*op(2) sops_uaddr variable

* tapset/linux/syscalls2.stp, nd_syscalls2.stp (semops): Use
  sops_uaddr, deprecate tsops_uaddr.
* testsuite/buildok/*syscalls2*: Corresponding changes.

11 years agostap.1: drop deprecation history details
Frank Ch. Eigler [Tue, 28 May 2013 22:21:15 +0000 (18:21 -0400)]
stap.1: drop deprecation history details

11 years agofix thread-business.stp sample permissions
Frank Ch. Eigler [Tue, 28 May 2013 20:39:24 +0000 (16:39 -0400)]
fix thread-business.stp sample permissions

11 years agostapregex: ditch dynamic_cast<> use for regex_query->right
Serguei Makarov [Wed, 29 May 2013 16:14:35 +0000 (12:14 -0400)]
stapregex: ditch dynamic_cast<> use for regex_query->right

11 years agofix build failure after stapregex merge
Serguei Makarov [Wed, 29 May 2013 15:55:47 +0000 (11:55 -0400)]
fix build failure after stapregex merge

11 years agoAlways grab the rcu read lock in rcu_dereference().
David Smith [Wed, 29 May 2013 15:28:14 +0000 (10:28 -0500)]
Always grab the rcu read lock in rcu_dereference().

11 years agostapregex testsuite fails: add chr range order check to fix 2:a[b-a]:-
Serguei Makarov [Wed, 29 May 2013 14:27:25 +0000 (10:27 -0400)]
stapregex testsuite fails: add chr range order check to fix 2:a[b-a]:-

11 years agoPR15063: enable additional testcases for ^$ oddities
Serguei Makarov [Tue, 28 May 2013 15:39:21 +0000 (11:39 -0400)]
PR15063: enable additional testcases for ^$ oddities

11 years agoPR15063 cleanup: mark extra pinpointing-tests as successful
Serguei Makarov [Tue, 28 May 2013 14:35:40 +0000 (10:35 -0400)]
PR15063 cleanup: mark extra pinpointing-tests as successful

11 years agoPR15063 quickfix: just disable the whole YYFILL mechanism
Serguei Makarov [Mon, 27 May 2013 21:58:26 +0000 (17:58 -0400)]
PR15063 quickfix: just disable the whole YYFILL mechanism

11 years agostapregex cleanup: move maxFill inside of class DFA
Serguei Makarov [Mon, 27 May 2013 21:56:33 +0000 (17:56 -0400)]
stapregex cleanup: move maxFill inside of class DFA

11 years agoPR15063 (additional debugging statements)
Serguei Makarov [Fri, 24 May 2013 18:04:59 +0000 (14:04 -0400)]
PR15063 (additional debugging statements)

11 years agostapregex testsuite fails: fix 1:a\x:a\x
Serguei Makarov [Wed, 22 May 2013 15:01:01 +0000 (11:01 -0400)]
stapregex testsuite fails: fix 1:a\x:a\x

11 years agostapregex cleanup: get through some minor TODOXXX
Serguei Makarov [Tue, 9 Apr 2013 20:54:27 +0000 (16:54 -0400)]
stapregex cleanup: get through some minor TODOXXX

11 years agostapregex cleanup: error checking in numberical parsing
Serguei Makarov [Tue, 9 Apr 2013 20:53:14 +0000 (16:53 -0400)]
stapregex cleanup: error checking in numberical parsing

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