]> sourceware.org Git - systemtap.git/log
systemtap.git
12 years agoRange-check _fildes_index_u and test it
Josh Stone [Tue, 31 Jul 2012 02:56:18 +0000 (19:56 -0700)]
Range-check _fildes_index_u and test it

* tapset/linux/aux_syscalls.stp: Make sure the index is 0 or 1.
* testsuite/buildok/aux_syscalls-embedded.stp: Test _fildes_index_u()
  rather than the old, removed _fildes_u().

12 years agoPR14180: Move all syscall tapsets to linux/
Josh Stone [Tue, 31 Jul 2012 02:34:43 +0000 (19:34 -0700)]
PR14180: Move all syscall tapsets to linux/

Moving basically all *syscall*.stp into tapset/linux/. These are all
implemented from a kernel assumption, using either kernel.function or
kprobe.function, and the supporting functions also assume that they're
being called from a kernel environment.

12 years agoPR14180: Search for tapset in additional backend-specific paths
Josh Stone [Tue, 31 Jul 2012 00:34:02 +0000 (17:34 -0700)]
PR14180: Search for tapset in additional backend-specific paths

We already search paths in many combinations of kernel version and arch.
For each of these, search also in runtime-specific prefixes, "linux/..."
for kernel mode, and "dyninst/..." for dyninst mode.  (And while we're
at it, only do kernel versioning for kernel mode.)

12 years agoPR11207: Add a space to a macro error string
Josh Stone [Mon, 30 Jul 2012 18:43:00 +0000 (11:43 -0700)]
PR11207: Add a space to a macro error string

12 years agoPR11207: fix segfault in macro invocation parser.
Serguei Makarov [Mon, 30 Jul 2012 18:38:27 +0000 (14:38 -0400)]
PR11207: fix segfault in macro invocation parser.

12 years agoRevert "PR11207: testsuite for oneline macros feature."
Serguei Makarov [Mon, 30 Jul 2012 18:36:26 +0000 (14:36 -0400)]
Revert "PR11207: testsuite for oneline macros feature."

This reverts commit 05b137ec05922db854429770f96ce6a4a1501347.

12 years agoRevert "PR11207: support for one-line @define in macroprocessor."
Serguei Makarov [Mon, 30 Jul 2012 18:36:15 +0000 (14:36 -0400)]
Revert "PR11207: support for one-line @define in macroprocessor."

This reverts commit 2a82bed6eced5bd3634acd82eb440d46ab8206f4.

12 years agoPR11207: support for one-line @define in macroprocessor.
Serguei Makarov [Mon, 30 Jul 2012 15:18:16 +0000 (11:18 -0400)]
PR11207: support for one-line @define in macroprocessor.

Current logic for determining whether to grab a one-line or
a multi-line macro is a bit hairy but well-tested. May go through
it later with a fresh eye to streamline at least the explanatory
comments.

12 years agoPR11207: testsuite for oneline macros feature.
Serguei Makarov [Mon, 30 Jul 2012 15:16:38 +0000 (11:16 -0400)]
PR11207: testsuite for oneline macros feature.

12 years agostap-report: set $PATH, tolerate failures better
Frank Ch. Eigler [Mon, 30 Jul 2012 14:01:45 +0000 (10:01 -0400)]
stap-report: set $PATH, tolerate failures better

12 years agoparse: Separate "empty or missing" file errors
Josh Stone [Sat, 28 Jul 2012 16:55:10 +0000 (09:55 -0700)]
parse: Separate "empty or missing" file errors

... especially since there's a third state too: unreadable.

* parse.cxx (parser::parser): Consolidate to a single ctor.
  (parse<istream>): Synthesize the name "<input>" to the parser from here.
  (parse<filename>): Open the file first, check its status, and if good
  only then pass the name and ifstream to the parser.
  (parser::parse): Now here the file is never missing, just empty.

12 years agostapdyn: Try to autodetect DYNINSTAPI_RT_LIB
Josh Stone [Fri, 27 Jul 2012 21:30:31 +0000 (14:30 -0700)]
stapdyn: Try to autodetect DYNINSTAPI_RT_LIB

* stapdyn/dynutil.cxx (check_dyninst_rt): New file; Check that env
  DYNINSTAPI_RT_LIB is well set, else guess a good value for it.
* stapdyn/stapdyn.cxx (main): Call check_dyninst_rt().
* stapdyn/dynsdt.cxx (main): Ditto.
* stapdyn/Makefile.am: Build dynutil.cxx and ../util.cxx.
* stapdyn/Makefile.in: Regenerate.

12 years agostapdyn: Build dyninst targets in their own subdirectory
Josh Stone [Fri, 27 Jul 2012 19:40:04 +0000 (12:40 -0700)]
stapdyn: Build dyninst targets in their own subdirectory

* Makefile.am: Remove dyninst targets; add stapdyn/ to SUBDIRS.
* stapdyn/Makefile.am: Add dyninst targets. (base copied from staprun.)
* configure.ac: Process stapdyn/Makefile.
* run-stap.in: Adapt to stapdyn's new location.

* stapdyn/Makefile.in: Generate.
* Makefile.in, configure: Regenerate.

12 years agostapdyn: Use PRIx64 when printing GElf_Addr (uint64_t)
Josh Stone [Fri, 27 Jul 2012 19:18:25 +0000 (12:18 -0700)]
stapdyn: Use PRIx64 when printing GElf_Addr (uint64_t)

12 years agoPR11207: correctly initialize lexer::saw_tokens.
Serguei Makarov [Fri, 27 Jul 2012 19:10:38 +0000 (15:10 -0400)]
PR11207: correctly initialize lexer::saw_tokens.

12 years agoDyninst compile fixes for 32-bit systems.
David Smith [Fri, 27 Jul 2012 17:54:54 +0000 (12:54 -0500)]
Dyninst compile fixes for 32-bit systems.

* stapdyn/dynsdt.cxx (find_sdt): Fix printf types for 64-bit longs.
  (instrument_sdt): Ditto.
* stapdyn/stapdyn.cxx (instrument_uprobes): Change type from 'uint64' to
  'int64', since there are only signed 64-bit long BPatch_constExpr
  constructors.

12 years agostapdyn: Use an explicit BINDIR path to stapdyn
Josh Stone [Fri, 27 Jul 2012 17:45:36 +0000 (10:45 -0700)]
stapdyn: Use an explicit BINDIR path to stapdyn

12 years agoAdded include path to be able to compile for ARM.
Torsten Polle [Thu, 26 Jul 2012 18:40:12 +0000 (20:40 +0200)]
Added include path to be able to compile for ARM.

Compiling a script against a 3.4 ARM kerne with uprobes support results in a
compile error because struct linux_binprm is not defined. Including
linux/binfmts.h fixes the issue.

Signed-off-by: Torsten Polle <Torsten.Polle@gmx.de>
12 years agoPR14360: support old behaviour with --compatible.
Serguei Makarov [Thu, 26 Jul 2012 19:01:01 +0000 (15:01 -0400)]
PR14360: support old behaviour with --compatible.

12 years agoPR14360: document string literal concatenation in language reference.
Serguei Makarov [Thu, 26 Jul 2012 18:00:30 +0000 (14:00 -0400)]
PR14360: document string literal concatenation in language reference.

12 years agoPR11210: NEWS entry for alias suffixes feature.
Serguei Makarov [Thu, 26 Jul 2012 16:14:34 +0000 (12:14 -0400)]
PR11210: NEWS entry for alias suffixes feature.

12 years agoPR12210: couple additional recursive-expansion tests for semko.
Serguei Makarov [Thu, 26 Jul 2012 15:57:46 +0000 (11:57 -0400)]
PR12210: couple additional recursive-expansion tests for semko.

12 years agoFix permissions for testsuite/parseko/at_operators.stp.
Serguei Makarov [Thu, 26 Jul 2012 15:56:05 +0000 (11:56 -0400)]
Fix permissions for testsuite/parseko/at_operators.stp.

12 years agoStarting to populate NEWS -- describe string gluing change due to PR14360.
Serguei Makarov [Thu, 26 Jul 2012 15:54:05 +0000 (11:54 -0400)]
Starting to populate NEWS -- describe string gluing change due to PR14360.

12 years agoPR11207: initial implementation of macros (definitions visible in same file).
Serguei Makarov [Thu, 26 Jul 2012 15:02:42 +0000 (11:02 -0400)]
PR11207: initial implementation of macros (definitions visible in same file).

This patch augments systemtap's preprocessor with a simple macro facility,
as follows:

@define add(a,b) %( ((@a)+(@b)) %)
x = add(2,2)

Further details are available in the comments on the preprocessor code,
or in the proposal posted earlier on the mailing list.

12 years agoPR11207: initial testsuite for macro feature.
Serguei Makarov [Thu, 26 Jul 2012 15:00:01 +0000 (11:00 -0400)]
PR11207: initial testsuite for macro feature.

12 years agostapdyn: Don't check groups for --runtime=dyninst
Josh Stone [Tue, 24 Jul 2012 22:02:13 +0000 (15:02 -0700)]
stapdyn: Don't check groups for --runtime=dyninst

We don't need to assert stapdev/stapusr group membership for the dyninst
mode, as users are simply allowed to probe anything ptrace-able.  The
groups only apply to our kernel runtime.

12 years agoExplain add_block_tid and add_call_probe_tid
Josh Stone [Tue, 24 Jul 2012 21:07:30 +0000 (14:07 -0700)]
Explain add_block_tid and add_call_probe_tid

Commit 8cc799a5d mentioned their need, but it should be commented.

12 years agotapset/registers.stp: drop inadverdent / incomplete kerneldoc for __asmlinkage_int_arg
Frank Ch. Eigler [Tue, 24 Jul 2012 20:29:17 +0000 (16:29 -0400)]
tapset/registers.stp: drop inadverdent / incomplete kerneldoc for __asmlinkage_int_arg

12 years agoFixed PR14394 by adding compat_sys_sigprocmask() support.
David Smith [Tue, 24 Jul 2012 19:53:33 +0000 (14:53 -0500)]
Fixed PR14394 by adding compat_sys_sigprocmask() support.

* tapset/syscalls2.stp: Add compat_sys_sigprocmask() support.
* tapset/nd_syscalls2.stp: Ditto.

12 years agoMore PR13455 (signalfd/compat_signalfd support in nd_syscalls2.stp) fixes.
David Smith [Tue, 24 Jul 2012 14:54:51 +0000 (09:54 -0500)]
More PR13455 (signalfd/compat_signalfd support in nd_syscalls2.stp) fixes.

* tapset/nd_syscalls2.stp: Fix nd_syscall.compat_signalfd probe
  alias. Also fixed a dwarf variable reference in the
  __nd_syscall.compat_signalfd4 probe alias.

12 years agoFixed nd_syscall.sigaction32.return.
David Smith [Tue, 24 Jul 2012 13:36:30 +0000 (08:36 -0500)]
Fixed nd_syscall.sigaction32.return.

* tapset/nd_syscalls2.stp: Fix nd_syscall.sigaction32.return to add the
  missing '.return' to the probe alias.

12 years agoFixed PR13454 by updating pipe/pipe2 support in nd_syscalls.stp.
David Smith [Tue, 24 Jul 2012 13:13:56 +0000 (08:13 -0500)]
Fixed PR13454 by updating pipe/pipe2 support in nd_syscalls.stp.

* tapset/aux_syscalls.stp (_fildes_index_u): Renamed from _fildes_u() and
  reworked to return pipe fd values (instead of a string).
* tapset/nd_syscalls2.stp: Updated nd_syscall.pipe probe alias to handle
  sys_pipe2().
* testsuite/systemtap.syscall/nd_syscall.exp (syscall_kfails): Removed
  kfail for pipe test.

12 years agostapdyn: update configury for newer dyninst master
Josh Stone [Mon, 23 Jul 2012 22:28:48 +0000 (15:28 -0700)]
stapdyn: update configury for newer dyninst master

- Dyninst install path now uses plain $prefix/lib
- More libraries are now required in linking

12 years agostapdyn: include limits.h for PATH_MAX
Josh Stone [Mon, 23 Jul 2012 19:31:05 +0000 (15:31 -0400)]
stapdyn: include limits.h for PATH_MAX

12 years agoMerge branch 'jistone/stapdyn'
Josh Stone [Mon, 23 Jul 2012 21:56:54 +0000 (14:56 -0700)]
Merge branch 'jistone/stapdyn'

12 years agoFix @operator parsing -- special print(@hist_op(...)) case
Serguei Makarov [Mon, 23 Jul 2012 21:49:10 +0000 (17:49 -0400)]
Fix @operator parsing -- special print(@hist_op(...)) case

12 years agoAnother PR13456 fix by removing the kfail.
David Smith [Mon, 23 Jul 2012 19:39:07 +0000 (14:39 -0500)]
Another PR13456 fix by removing the kfail.

* testsuite/systemtap.syscall/nd_syscall.exp (syscall_kfails): Removed
  kfail for poll test.

12 years agoFixed PR13455 by updating signalfd/compat_signalfd support in nd_syscalls2.stp.
David Smith [Mon, 23 Jul 2012 19:20:38 +0000 (14:20 -0500)]
Fixed PR13455 by updating signalfd/compat_signalfd support in nd_syscalls2.stp.

* tapset/nd_syscalls2.stp: Updated nd_syscall.signalfd probe alias to
  handle sys_signalfd4().  Updated nd_syscall.compat_signalfd probe alias
  to handle compat_sys_signalfd4().
* testsuite/systemtap.syscall/nd_syscall.exp (syscall_kfails): Removed
  kfail for signalfd test.

12 years agoSmall fix to syscalls2.stp.
David Smith [Mon, 23 Jul 2012 19:15:38 +0000 (14:15 -0500)]
Small fix to syscalls2.stp.

* tapset/syscalls2.stp: Make syscall.compat_signalfd.return probe alias
  match syscall.compat_signalfd probe alias.

12 years agoFix use of 'kernel.function' in nd_syscalls2.stp.
David Smith [Mon, 23 Jul 2012 19:12:56 +0000 (14:12 -0500)]
Fix use of 'kernel.function' in nd_syscalls2.stp.

* tapset/nd_syscalls2.stp: Fix the nd_syscall.compat_pselect7 probe alias
  using 'kernel.function' instead of 'kprobe.function'.

12 years agostap-report: also report kernel+module build-ids
Frank Ch. Eigler [Mon, 23 Jul 2012 19:03:04 +0000 (15:03 -0400)]
stap-report: also report kernel+module build-ids

12 years agoAnother PR11424 fix: For ppc64, map ".sys_foo" to "sys_foo".
David Smith [Mon, 23 Jul 2012 18:30:31 +0000 (13:30 -0500)]
Another PR11424 fix: For ppc64, map ".sys_foo" to "sys_foo".

* tapsets.cxx (load_function_name_cache): For ppc64, map ".sys_foo"
  symbols to "sys_foo".

12 years agoCleanup comments, consistent use of 'atword' terminology.
Serguei Makarov [Mon, 23 Jul 2012 17:54:40 +0000 (13:54 -0400)]
Cleanup comments, consistent use of 'atword' terminology.

12 years agoPR11207 groundwork: lexer::scan() produces tok_junk instead of throwing errors.
Serguei Makarov [Mon, 23 Jul 2012 16:30:46 +0000 (12:30 -0400)]
PR11207 groundwork: lexer::scan() produces tok_junk instead of throwing errors.

Handling parse_errors at scan time would get too complicated when there's
a preprocessing stage between the lexer and parser (and it's no longer
clear whether a given token will be used). Hence we produce specially marked
tok_junk which store a message to use when the token is encountered at
print_error() time.

12 years agoPR11207 groundwork: add a list of @words to check macro names against.
Serguei Makarov [Mon, 23 Jul 2012 13:41:50 +0000 (09:41 -0400)]
PR11207 groundwork: add a list of @words to check macro names against.

12 years agoconfigure: look for distro-installed dyninst too
Josh Stone [Sat, 21 Jul 2012 01:20:37 +0000 (18:20 -0700)]
configure: look for distro-installed dyninst too

12 years agoPR14179: Adapt stapdyn runtime to the new layout
Josh Stone [Sat, 21 Jul 2012 00:19:00 +0000 (17:19 -0700)]
PR14179: Adapt stapdyn runtime to the new layout

There still remains more to be done to really separate kernel-specific
code in the runtime, but both kernel and stapdyn modes do work now.

12 years agoFixed PR13453 by updating inotify support in nd_syscalls.stp.
David Smith [Fri, 20 Jul 2012 20:45:39 +0000 (15:45 -0500)]
Fixed PR13453 by updating inotify support in nd_syscalls.stp.

* tapset/nd_syscalls.stp: Updated nd_syscall.inotify_add_watch() to print
  the mask argument as a string. Updated nd_syscall.inotify_init probe
  alias to handle sys_inotify_init1().
* testsuite/systemtap.syscall/nd_syscall.exp (syscall_kfails): Removed
  inotify kfail.

12 years agoFixed PR13451 by updating eventfd support in nd_syscalls.stp.
David Smith [Fri, 20 Jul 2012 19:46:42 +0000 (14:46 -0500)]
Fixed PR13451 by updating eventfd support in nd_syscalls.stp.

* tapset/nd_syscalls.stp: Updated nd_syscall.eventfd probe aliase to handle
  sys_eventfd2().
* testsuite/systemtap.syscall/nd_syscall.exp (syscall_kfails): Removed
  eventfd kfail.

12 years agoMinor fix to PR13456 epoll_create1 nd_syscalls.stp support.
David Smith [Fri, 20 Jul 2012 19:33:39 +0000 (14:33 -0500)]
Minor fix to PR13456 epoll_create1 nd_syscalls.stp support.

12 years agoFixed PR13456 by adding epoll_create1 support to nd_syscalls.stp.
David Smith [Fri, 20 Jul 2012 19:24:03 +0000 (14:24 -0500)]
Fixed PR13456 by adding epoll_create1 support to nd_syscalls.stp.

* tapset/nd_syscalls.stp: Updated nd_syscall.epoll_create probe aliase to
  handle epoll_create1.

12 years agoFixed PR13451 by updating dup2/dup3 support in nd_syscalls.stp.
David Smith [Fri, 20 Jul 2012 18:57:48 +0000 (13:57 -0500)]
Fixed PR13451 by updating dup2/dup3 support in nd_syscalls.stp.

* tapset/nd_syscalls.stp: Updated dup2/dup3 probe aliases.
* tapset/registers.stp: Removed dummy function and added
  __asmlinkage_int_arg(), needed by nd_syscall.return functions to grab
  entry values when asmlinkage() is needed.
* testsuite/systemtap.syscall/nd_syscall.exp (syscall_kfails): Removed dup
  kfail.

12 years agoMade gen_mapped_saved_return() static.
David Smith [Fri, 20 Jul 2012 15:52:43 +0000 (10:52 -0500)]
Made gen_mapped_saved_return() static.

12 years agoFixed PR14378 by supporting @entry() in kprobe.function().return probes.
David Smith [Fri, 20 Jul 2012 15:33:06 +0000 (10:33 -0500)]
Fixed PR14378 by supporting @entry() in kprobe.function().return probes.

* tapsets.cxx (gen_mapped_saved_return): Removed from the
  dwarf_var_expanding_visitor class.  Also renamed the global variables
  prefix from '_dwarf' to '_entry' (since now dwarfless kprobe probes
  support @entry()).
  (dwarf_var_expanding_visitor::gen_mapped_saved_return): Just calls
  gen_mapped_saved_return().
  (kprobe_var_expanding_visitor): New class.
  (kprobe_derived_probe::kprobe_derived_probe): Uses
  kprobe_var_expanding_visitor to support @entry().
* testsuite/semko/entry04.stp: New test.
* testsuite/semok/entry04.stp: Ditto.

12 years agoMore lexer cleanup: comment on @words change, add gettext calls..
Serguei Makarov [Fri, 20 Jul 2012 14:59:02 +0000 (10:59 -0400)]
More lexer cleanup: comment on @words change, add gettext calls..

12 years agoFix '@operator' parsing -- strictly enforce use of '@' in identifiers.
Serguei Makarov [Fri, 20 Jul 2012 14:26:40 +0000 (10:26 -0400)]
Fix '@operator' parsing -- strictly enforce use of '@' in identifiers.

Generally, the language makes a policy of not allowing people to use '@'
inside arbitrary identifiers. The new test case gives an example of
behaviour that was still allowed by the parser's older scheme for
preventing this.

Identifiers beginning in '@' are now reclassified as tok_operator by the lexer.

12 years agoAdded a comment explaining why there are 2 syscall.dup2 aliases (PR14353).
David Smith [Fri, 20 Jul 2012 13:42:28 +0000 (08:42 -0500)]
Added a comment explaining why there are 2 syscall.dup2 aliases (PR14353).

* tapset/syscalls.stp: Added comment.

12 years agoEven further tweak to glibc/kernel-headers workaround.
David Smith [Thu, 19 Jul 2012 20:45:22 +0000 (15:45 -0500)]
Even further tweak to glibc/kernel-headers workaround.

* staprun/staprun.h: Change inclusion of linux/types.h for
  linux/posix_types.h, since the former didn't work with RHEL5.

12 years agoStop expecting registration errors on non-existent kprobe.function probes (PR11424).
David Smith [Thu, 19 Jul 2012 20:29:47 +0000 (15:29 -0500)]
Stop expecting registration errors on non-existent kprobe.function probes (PR11424).

* testsuite/systemtap.base/badkprobe.exp: Remove invalid tests.

12 years agoFurther tweak to glibc/kernel-headers workaround
Josh Stone [Thu, 19 Jul 2012 01:33:12 +0000 (18:33 -0700)]
Further tweak to glibc/kernel-headers workaround

... following commit 037853b4644bb6ebd68e2f1fac11c3636f551d8e, for
https://bugzilla.redhat.com/show_bug.cgi?id=840902

Seems it's not always possible to avoid linux/types.h for the conflict
it presents with sys/select.h.  Now include linux/types.h very early, so
glibc can stomp over it with #undef and #define, rather than vice versa.

12 years agoPR14369: Fix locating SDT w/ $vars, w/o debuginfo
Josh Stone [Wed, 18 Jul 2012 22:05:59 +0000 (15:05 -0700)]
PR14369: Fix locating SDT w/ $vars, w/o debuginfo

While current SDT can work without debuginfo, trying to use local $vars
still requires a look into DWARF.  If that debuginfo is broken or
missing (as with asm probes), then we were reporting the probe entirely
absent, instead of just the $var broken.

This is undesirable if the $var access might have been optimized away,
or was part of a @defined check that should just get 0.  So now we try
using debuginfo first, but if that fails go the direct route, and bad
$vars can be resolved or error in the normal way.

12 years agoPR13934: When SDT args don't use N@OP, split on spaces
Josh Stone [Wed, 18 Jul 2012 21:09:05 +0000 (14:09 -0700)]
PR13934: When SDT args don't use N@OP, split on spaces

Assembly probes are not forced to use the N@OP form.  In this case, N is
inferred to be the native word size.  Since we don't have a nice
delimiter, just split it on spaces.  SDT-asm authors then must not put
any spaces in arguments, to avoid ambiguity.

12 years agoFixed PR11424 by using System.map data to validate dwarfless kprobe probes.
David Smith [Wed, 18 Jul 2012 18:30:59 +0000 (13:30 -0500)]
Fixed PR11424 by using System.map data to validate dwarfless kprobe probes.

* tapsets.cxx (kprobe_builder::load_function_name_cache): New function.
  (kprobe_builder::build): Use parsed System.map data to validate
  kprobe.function probe names.

12 years agoPR14360: update testsuite to reflect new string-gluing behaviour.
Serguei Makarov [Thu, 12 Jul 2012 20:35:35 +0000 (16:35 -0400)]
PR14360: update testsuite to reflect new string-gluing behaviour.

12 years agoPR14360, PR11207: clean up wildcard code in preparation for token-based macros.
Serguei Makarov [Thu, 12 Jul 2012 20:27:38 +0000 (16:27 -0400)]
PR14360, PR11207: clean up wildcard code in preparation for token-based macros.

in parse.cxx:
- get rid of ate_comment, enable "a" /* comment */ "b" string gluing
- add ate_whitespace to keep track of token adjacency
- restrict wildcard handling code to parse_probe_point()
  - this is now handled by keeping the component tokens of the wildcard
    separate, and gluing them together (conditional on adjacency)

12 years agoBZ802380: Fixed logic issue and resource leak - Coverity
Chris Meek [Thu, 12 Jul 2012 14:14:48 +0000 (10:14 -0400)]
BZ802380: Fixed logic issue and resource leak - Coverity

Coverity issues caught:

REVERSE_INULL
There were some logic issues in sdt_query::setup_note_probe_entry()
with a check for whether "name" was NULL after it was dereferenced,
as well as copying a couple possibly not '\0' terminated char *'s to
strings. These should now be fixed, and work as intended.

RESOURCE_LEAK
Also, there was a resource leak with ai_tvar_base in
dwarf_var_expanding_visitor::gen_mapped_saved_return(). That should
now also be fixed.

12 years agoexamples: have pf2/pf3 use wrapping stats arrays
Frank Ch. Eigler [Wed, 11 Jul 2012 13:27:05 +0000 (09:27 -0400)]
examples: have pf2/pf3 use wrapping stats arrays

12 years agoAdd code to keep track of task_work callbacks to avoid a possible crash.
David Smith [Mon, 9 Jul 2012 21:07:22 +0000 (16:07 -0500)]
Add code to keep track of task_work callbacks to avoid a possible crash.

* runtime/stp_task_work.c: New file.
* runtime/stp_utrace.c (utrace_init): Move STAPCONF_TASK_WORK_ADD_EXPORTED
  code to stp_task_work_init().
  (utrace_exit): Call stp_task_work_exit().
  (utrace_cleanup): Call task_work_cancel() wrapper function.
  (utrace_free): Ditto.
  (utrace_do_stop): Call task_work_add() wrapper function.
  (utrace_control): Ditto.
  (finish_report): Ditto.
  (utrace_resume): Call stp_task_work_func_done().
* runtime/linux/task_finder2.c (__stp_tf_cancel_task_work): Call
  task_work_cancel() wrapper function.
  (__stp_tf_quiesce_worker): Call stp_task_work_func_done().
  (__stp_utrace_task_finder_target_quiesce): Call task_work_add() wrapper
  function.
  (__stp_tf_mmap_worker): Call stp_task_work_func_done().
  (__stp_utrace_task_finder_target_syscall_exit): Call task_work_add() wrapper
  function.

12 years agoFix the build with glibc 2.16
Josh Stone [Mon, 9 Jul 2012 19:07:48 +0000 (12:07 -0700)]
Fix the build with glibc 2.16

With our elevated compiler warnings as errors, we got:

  mainloop.c: In function 'stp_main_loop':
  mainloop.c:581:3: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
  mainloop.c:581:3: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
  mainloop.c:583:35: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
  mainloop.c:583:35: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
  mainloop.c:631:2: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
  mainloop.c:631:2: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
  cc1: all warnings being treated as errors

This turns out to be a macro fight between glibc-2.16 and
kernel-headers, via including linux/types.h.  We apparently don't
even need that header, so removing it lets us proceed normally.

Those curious can watch this bug to see how the conflict is resolved:
https://bugzilla.redhat.com/show_bug.cgi?id=837641

12 years agoFix up buildid.exp to avoid testcase hangs.
David Smith [Tue, 3 Jul 2012 18:00:35 +0000 (13:00 -0500)]
Fix up buildid.exp to avoid testcase hangs.

* testsuite/systemtap.base/buildid.exp: Properly call "close" and "wait"
  after all "spawn" calls.  Otherwise test can hang.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
David Smith [Mon, 2 Jul 2012 20:48:03 +0000 (15:48 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agoImprove nd_syscall testsuite for s390x.
David Smith [Mon, 2 Jul 2012 20:47:31 +0000 (15:47 -0500)]
Improve nd_syscall testsuite for s390x.

* tapset/nd_syscalls2.stp (nd_syscall.pselect7): For s390x, don't try to
  get argument 7 since it will never succeed.
  (nd_syscall.compat_pselect7): Ditto.

12 years agoPR12210: documentation and examples for alias suffix enhancement.
Serguei Makarov [Thu, 28 Jun 2012 21:23:34 +0000 (17:23 -0400)]
PR12210: documentation and examples for alias suffix enhancement.

12 years agoPR12210: testsuite for alias suffix enhancement.
Serguei Makarov [Thu, 28 Jun 2012 21:18:41 +0000 (17:18 -0400)]
PR12210: testsuite for alias suffix enhancement.

12 years agoPR12210: Basic implementation of alias suffixes.
Serguei Makarov [Thu, 28 Jun 2012 21:07:01 +0000 (17:07 -0400)]
PR12210: Basic implementation of alias suffixes.

This enhancement permits the script writer to attach a suffix when
invoking a probe alias. The components in the suffix are passed on
to the underlying probe point.

e.g. syscall.read.maxactive(10) expands to something like
kernel.function("sys_read").return.maxactive(10); the
maxactive(10) part is a suffix that is attached to the
alias expansion of syscall.read.return.

At this stage, the interaction of the feature with wildcards
is somewhat limited. Namely, alias suffixes appear in wildcard
expansions only when the old implementation would signal an
error due to lack of expansions (see documentation in the next
commit for details). This minimizes the impact on existing code,
but the restriction should be removed as soon as we figure out
a way to make the available suffixes reliably discoverable in
error messages, features such as stap -l, etc.

12 years agoMerge remote-tracking branch 'origin/master' into jistone/stapdyn
Josh Stone [Thu, 28 Jun 2012 00:12:26 +0000 (17:12 -0700)]
Merge remote-tracking branch 'origin/master' into jistone/stapdyn

Conflicts:
Makefile.in

12 years agoPR14016: Fixed VARARGS coverity warning
Chris Meek [Wed, 27 Jun 2012 20:34:51 +0000 (16:34 -0400)]
PR14016: Fixed VARARGS coverity warning

va_end was not called on args in the case of a
vaspritf error.

12 years agoPR14016: Fixed UNREACHABLE coverity warnings
Chris Meek [Wed, 27 Jun 2012 20:33:24 +0000 (16:33 -0400)]
PR14016: Fixed UNREACHABLE coverity warnings

In these three cases, the return "" can never
be reached.

12 years agoPR14016: Fixed UNCAUGHT_EXCEPT coverity warning
Chris Meek [Wed, 27 Jun 2012 20:29:30 +0000 (16:29 -0400)]
PR14016: Fixed UNCAUGHT_EXCEPT coverity warning

Since lex_cast can throw an exception, we just need
to catch it.

12 years agoPR14016: Fixed REVERSE_INULL coverity warnings
Chris Meek [Wed, 27 Jun 2012 20:25:40 +0000 (16:25 -0400)]
PR14016: Fixed REVERSE_INULL coverity warnings

In both cases we dereference a pointer, then
proceed to compare the pointer to NULL. This means
the pointer could, potentially have been NULL when
we dereference it.

12 years agoPR14016: Fixed FORWARD_NULL coverity warnings
Chris Meek [Wed, 27 Jun 2012 20:20:49 +0000 (16:20 -0400)]
PR14016: Fixed FORWARD_NULL coverity warnings

In all these cases, we compare a variable to NULL,
but don't exit, then proceed to dereference that
variable. This has the potential to cause problems,
so in each case assert the variable is not NULL
before dereferencing.

12 years agoPR14016: Fixed DEADCODE coverity warnings
Chris Meek [Wed, 27 Jun 2012 20:08:20 +0000 (16:08 -0400)]
PR14016: Fixed DEADCODE coverity warnings

csclient.cxx:
  CERTS will always be NULL when it reaches the
  cleanup. Added an assert, just for clarity
  and as an extra check.

staprun.c
  r is no longer used in the for loop, so comparing it
  against 0 will always fail, as its explicitly set
  to 0 before the loop, and never changed. Safe to
  just remove it.

translate.cxx
  Since eh_frame_*_seen variables were set to false
  within the loop, and only one could be changed to
  true on a given itteration, they could never be
  true at the same time. This would just cause the
  loop to continue execution longer than needed. By
  initializing them outside the loop, we can exit
  as soon as we've found what we need.

12 years agoPR14016: Fixed CHECKED_RETURN coverity warnings
Chris Meek [Wed, 27 Jun 2012 19:56:50 +0000 (15:56 -0400)]
PR14016: Fixed CHECKED_RETURN coverity warnings

tapsets.cxx:
  Return value "r" of glob was not checked.

tapset-netfilter.cxx:
  Return value of get_param was not checked.
  We should have checked this one, since the
  protocol family is now required.

12 years agoPR14179: Install the new runtime/linux/ path too
Josh Stone [Tue, 26 Jun 2012 23:49:29 +0000 (16:49 -0700)]
PR14179: Install the new runtime/linux/ path too

12 years agoMerge remote-tracking branch 'origin/master' into jistone/pr14179
Josh Stone [Tue, 26 Jun 2012 23:33:35 +0000 (16:33 -0700)]
Merge remote-tracking branch 'origin/master' into jistone/pr14179

Conflicts:
configure.ac
runtime/staprun/configure
runtime/staprun/configure.ac

12 years agoPR14179: Start the runtime shuffle
Josh Stone [Tue, 19 Jun 2012 22:22:08 +0000 (15:22 -0700)]
PR14179: Start the runtime shuffle

To aid in code sharing with the dyninst backend, the runtime is being
split into neutral and kernel-specific parts.  Runtime code that depends
on running within the kernel should move to runtime/linux/.

*****
* This is still a work in progress, but it remains functional enough
* that normal kernel use should be unaffected.  The separation is not
* complete enough yet for the dyninst branch...
*****

12 years agoFurther tweaks to bkl.stp example
Josh Stone [Tue, 26 Jun 2012 19:50:21 +0000 (12:50 -0700)]
Further tweaks to bkl.stp example

- Use .call for entering lock_kernel, to make sure we pair with .return.
- Remove "holder", as it should always be the current unlocker anyway.

12 years agoFixed PR14296 by improving bkl.stp error handling.
David Smith [Mon, 25 Jun 2012 22:08:31 +0000 (17:08 -0500)]
Fixed PR14296 by improving bkl.stp error handling.

* testsuite/systemtap.examples/locks/bkl.stp: Better error handling.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
David Smith [Mon, 25 Jun 2012 20:14:42 +0000 (15:14 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agoFixed PR14230 by disabling pagefaulting on ia64 when in an atomic context.
David Smith [Mon, 25 Jun 2012 20:14:00 +0000 (15:14 -0500)]
Fixed PR14230 by disabling pagefaulting on ia64 when in an atomic context.

* runtime/copy.c (__stp_strncpy_from_user): On ia64, disable pagefaulting
  if we're in an atomic context.
* runtime/loc2c-runtime.h (uderef): Ditto.
* runtime/string.h (__stp_get_user): Ditto.

12 years agoPR10299: fix additional cases of variables emitted without a mangler.
Serguei Makarov [Mon, 25 Jun 2012 17:20:48 +0000 (13:20 -0400)]
PR10299: fix additional cases of variables emitted without a mangler.

12 years agoFix typos.
Stan Cox [Thu, 21 Jun 2012 16:25:14 +0000 (12:25 -0400)]
Fix typos.

12 years agotweak authorship credits
Jiri Slaby [Wed, 20 Jun 2012 13:47:41 +0000 (09:47 -0400)]
tweak authorship credits

The little commit f7707c31 was also previously produced by Jiry Slaby.

12 years agoRegenerate examples index.
Mark Wielaard [Wed, 20 Jun 2012 10:52:25 +0000 (12:52 +0200)]
Regenerate examples index.

Adds process/psig.stp and network/netfilter_drop.stp.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
12 years agoAdd -lpthread to stap_serverd_LDADD.
Mark Wielaard [Wed, 20 Jun 2012 10:46:14 +0000 (12:46 +0200)]
Add -lpthread to stap_serverd_LDADD.

Since we use sem_getvalue () in stap-serverd.cxx we should explicitly
link against libpthread.so.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
12 years agotapset: panic() and friends
Frank Ch. Eigler [Mon, 18 Jun 2012 19:42:24 +0000 (15:42 -0400)]
tapset: panic() and friends

* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Pull in panic.stp.
* tapset/guru-delay.stp: Fix typo.
* tapset/panic.stp: Fix 'nother super important typo.
* testsuite/buildok/guru.stp: Build-test the bad boys.

12 years agotestsuite: activate buildok/pretty-uprobes.stp test
Frank Ch. Eigler [Mon, 18 Jun 2012 19:41:29 +0000 (15:41 -0400)]
testsuite: activate buildok/pretty-uprobes.stp test

Its permissions needed +x.

12 years agoAdd panic tapset
Bryn M. Reeves [Mon, 18 Jun 2012 18:02:53 +0000 (19:02 +0100)]
Add panic tapset

Add a tapset to expose the kernel's panic() routine.

12 years agoPR14240: Fixed another uncaught exception warning
Chris Meek [Mon, 18 Jun 2012 15:12:26 +0000 (11:12 -0400)]
PR14240: Fixed another uncaught exception warning

lex_cast throws an exception, so calling it in autosprinf() caused
an uncaught exception. We really didn't need to cast the rc as a string
just to print it out.

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