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

12 years agoREADME: note uprobes in 3.5ish area kernels
Frank Ch. Eigler [Sun, 17 Jun 2012 18:45:32 +0000 (14:45 -0400)]
README: note uprobes in 3.5ish area kernels

12 years agoconfigury: version 2.0 bump throughout
Frank Ch. Eigler [Sun, 17 Jun 2012 18:40:59 +0000 (14:40 -0400)]
configury: version 2.0 bump throughout

12 years agosystemtap.spec: prep for release with %changelog release-1.8
Frank Ch. Eigler [Sun, 17 Jun 2012 16:27:54 +0000 (12:27 -0400)]
systemtap.spec: prep for release with %changelog

Also, move some BuildRequire: lines, as per Peter Robinson's
suggested fedora changes.

12 years agoPR14168: Let stap_system() callers describe the command
Josh Stone [Fri, 15 Jun 2012 21:16:27 +0000 (14:16 -0700)]
PR14168: Let stap_system() callers describe the command

This fixes the gripe of commit 42da159, that error codes from
"env ... make" were identified as env failures.

* util.cxx (stap_system): Add a "description" parameter that names the
  command for the WARNING message.
* util.h (stap_system): Keep the old form as a wrapper which uses
  args[0] as the description.
* buildrun.cxx (run_make_cmd): Now more descriptive than ever before,
  pass the name "kbuild" to stap_system().

12 years agoPR14168: note an adverse effect in diagnostics: WARNING: env vs. make exited with...
Frank Ch. Eigler [Fri, 15 Jun 2012 19:47:38 +0000 (15:47 -0400)]
PR14168: note an adverse effect in diagnostics: WARNING: env vs. make exited with status

12 years agoconfigury: in bundled-elfutils mode, pass -fexceptions to elfutils CFLAGS
Frank Ch. Eigler [Fri, 15 Jun 2012 19:42:22 +0000 (15:42 -0400)]
configury: in bundled-elfutils mode, pass -fexceptions to elfutils CFLAGS

12 years agoPR13516: tweak interrupt catching
Frank Ch. Eigler [Fri, 15 Jun 2012 19:37:40 +0000 (15:37 -0400)]
PR13516: tweak interrupt catching

* main.cxx (main): Catch exceptions by const-ref to avoid
  possibly problematic copy.

12 years agoPR14240: Fixed netfilter hookfunction for RHEL5
Chris Meek [Fri, 15 Jun 2012 19:21:16 +0000 (15:21 -0400)]
PR14240: Fixed netfilter hookfunction for RHEL5

Previous to kernel 2.6.22 (linux commit 3db05fe), the hook function
definition takes a **skb whereas currently it uses *skb. We need to
emit the right version for this to compile on RHEL5.

12 years agodocs: tweak wording on tapsets in pass 2
Frank Ch. Eigler [Fri, 15 Jun 2012 17:12:54 +0000 (13:12 -0400)]
docs: tweak wording on tapsets in pass 2

12 years agodocs: tweak stappaths & stapprobes man pages
Frank Ch. Eigler [Fri, 15 Jun 2012 17:06:28 +0000 (13:06 -0400)]
docs: tweak stappaths & stapprobes man pages

* stappaths.7.in: Better explain what tapsets are.
* stapprobes.3stap: Clarification tweak.

12 years agoPR10299: commented-out example of possible alternate mangling scheme.
Serguei Makarov [Fri, 15 Jun 2012 15:23:28 +0000 (11:23 -0400)]
PR10299: commented-out example of possible alternate mangling scheme.

12 years agoPR14244: Assert that the real UID has access to debugfs
Josh Stone [Thu, 14 Jun 2012 23:52:28 +0000 (16:52 -0700)]
PR14244: Assert that the real UID has access to debugfs

Some systems are now defaulting debugfs to mode 0700.  If the user has
no access to debugfs, then they won't be able to communicate with the
systemtap module.  Thus, this should be a non-starter, before even
loading the module at all.

This was previously causing staprun to fail after loading the module,
when it checked R/W access to the module's .ctl file.  But since we also
restrict removing modules to those you can control, staprun would not
unload the new module either.

12 years agoFix uprobes detection when there's a loaded systemtap module.
David Smith [Thu, 14 Jun 2012 20:39:09 +0000 (15:39 -0500)]
Fix uprobes detection when there's a loaded systemtap module.

* testsuite/lib/systemtap.exp (uprobes_p): Make sure we find real uprobes,
  not just a symbol from a loaded systemtap module.

12 years agoPR14016: Fixed uncaught exceptions in stap-serverd
Chris Meek [Thu, 14 Jun 2012 19:38:36 +0000 (15:38 -0400)]
PR14016: Fixed uncaught exceptions in stap-serverd

After a run of coverity, there were a number of uncaught exception
warnings, among others. This fixes them.

12 years agoUpdate the Beginners Guide version information
William Cohen [Thu, 14 Jun 2012 16:02:21 +0000 (12:02 -0400)]
Update the Beginners Guide version information

The "version:" flag in publican.cfg does not really work the way
expected.  It will change the name of the generated pdf file during
the build, but it does not completely override the <productnumber> in
Book_Info.xml. Need manual fixing for the time being.

12 years agotapset/DEVGUIDE: blurb detailing current preferred embedded-C coding conventions.
Serguei Makarov [Thu, 14 Jun 2012 14:43:17 +0000 (10:43 -0400)]
tapset/DEVGUIDE: blurb detailing current preferred embedded-C coding conventions.

12 years agoPR10299: minor style tweak to existing code.
Serguei Makarov [Thu, 14 Jun 2012 14:27:04 +0000 (10:27 -0400)]
PR10299: minor style tweak to existing code.

12 years agoPR10299: Mangle kernel.mark arguments too
Josh Stone [Wed, 13 Jun 2012 20:27:27 +0000 (13:27 -0700)]
PR10299: Mangle kernel.mark arguments too

12 years agostaprun: Comment why access() is still needed after open()
Josh Stone [Wed, 13 Jun 2012 19:04:07 +0000 (12:04 -0700)]
staprun: Comment why access() is still needed after open()

12 years agoNEWS: describe the required changes to embedded-C functions.
Serguei Makarov [Wed, 13 Jun 2012 17:28:38 +0000 (13:28 -0400)]
NEWS: describe the required changes to embedded-C functions.

- SystemTap now mangles local variables to avoid collisions with C
  headers included by tapsets. This required a change in how
  embedded-C functions access local parameters and the return value slot.

  Instead of THIS->foo in an embedded-C function, please use the newly
  defined macro STAP_ARG_foo (substitute the actual name of the
  argument for 'foo'); instead of THIS->__retvalue, use the newly
  defined STAP_RETVALUE. All of the tapsets and test cases have been
  adapted to use this new notation.

  If you need to run code which uses the old THIS-> notation, run stap
  with the --compatible=1.7 option.

12 years agoPR10299: enable locals mangling in translate.cxx.
Serguei Makarov [Wed, 13 Jun 2012 17:21:31 +0000 (13:21 -0400)]
PR10299: enable locals mangling in translate.cxx.

It is now *required* to use STAP_ARG_* and STAP_RETVALUE to access
parameters in embedded-C functions -- the actual underlying names
and locations of the parameters are subject to be changed/renamed
arbitrarily.

12 years agoPR10299: migrated existing tapsets and tests to use new STAP_ARG_* macros.
Serguei Makarov [Wed, 13 Jun 2012 17:20:27 +0000 (13:20 -0400)]
PR10299: migrated existing tapsets and tests to use new STAP_ARG_* macros.

12 years agoPR10299: Basic documentation for the changes to embedded-C argument access.
Serguei Makarov [Wed, 13 Jun 2012 17:13:50 +0000 (13:13 -0400)]
PR10299: Basic documentation for the changes to embedded-C argument access.

12 years agoPR10299: minor fix to previous commit.
Serguei Makarov [Wed, 13 Jun 2012 14:45:31 +0000 (10:45 -0400)]
PR10299: minor fix to previous commit.

12 years agoPR10299: enable support for arbitrary mangling (first without breaking existing behav...
Serguei Makarov [Wed, 13 Jun 2012 14:40:03 +0000 (10:40 -0400)]
PR10299: enable support for arbitrary mangling (first without breaking existing behaviour).

12 years agoPR10299 groundwork: tests to check old and new behaviour.
Serguei Makarov [Wed, 13 Jun 2012 14:33:17 +0000 (10:33 -0400)]
PR10299 groundwork: tests to check old and new behaviour.

12 years agoAdd perf probe memory access tests.
David Smith [Tue, 12 Jun 2012 21:48:56 +0000 (16:48 -0500)]
Add perf probe memory access tests.

* testsuite/systemtap.stress/conversions.exp (run_conv_test): Add perf
  probe memory access test.
* testsuite/systemtap.stress/conversions_perf.stp: New file.

12 years agoFix perf probe registration (PR14224) so that multiple probes work.
David Smith [Tue, 12 Jun 2012 20:22:21 +0000 (15:22 -0500)]
Fix perf probe registration (PR14224) so that multiple probes work.

* tapset-perfmon.cxx (perf_derived_probe_group::emit_module_init): Fix
  code generation for perf probe registration.

12 years agoImprove conversions.exp testcase logic for detecting tracepoint support.
David Smith [Tue, 12 Jun 2012 19:04:15 +0000 (14:04 -0500)]
Improve conversions.exp testcase logic for detecting tracepoint support.

* testsuite/systemtap.stress/conversions.exp: Better test for
  "sched_switch" tracepoint. The original method failed on ia64.

12 years agoNEWS: move around & compact the inode-uprobes-related linux commit# list
Frank Ch. Eigler [Tue, 12 Jun 2012 17:31:52 +0000 (13:31 -0400)]
NEWS: move around & compact the inode-uprobes-related linux commit# list

12 years agoImprove conversions.exp test by also testing tracepoint/timer.profile probes.
David Smith [Tue, 12 Jun 2012 13:28:52 +0000 (08:28 -0500)]
Improve conversions.exp test by also testing tracepoint/timer.profile probes.

* testsuite/systemtap.stress/conversions.exp: Move main logic into a
  procedure so that more than begin probes can be tested.  Add tracepoint
  and timer.profile testing.
* testsuite/systemtap.stress/conversions_profile.stp: New file.
* testsuite/systemtap.stress/conversions_trace.stp: New file.

12 years agoMerge remote-tracking branch 'origin/master' into jistone/pr14179
Josh Stone [Mon, 11 Jun 2012 22:28:39 +0000 (15:28 -0700)]
Merge remote-tracking branch 'origin/master' into jistone/pr14179

12 years agoTypo fixes in utrace_p().
David Smith [Mon, 11 Jun 2012 21:43:23 +0000 (16:43 -0500)]
Typo fixes in utrace_p().

12 years agoFix PR14221 by correcting timer.profile probe unregistration.
David Smith [Mon, 11 Jun 2012 16:38:22 +0000 (11:38 -0500)]
Fix PR14221 by correcting timer.profile probe unregistration.

* tapset-timers.cxx (profile_derived_probe_group::emit_module_exit): Only
  unregister profile timer hook once, instead of once per probe.

12 years agoAdd notes to NEWS about needed kernel patches to get inode-uprobes support.
David Smith [Fri, 8 Jun 2012 19:49:58 +0000 (14:49 -0500)]
Add notes to NEWS about needed kernel patches to get inode-uprobes support.

12 years agotestsuite: Fix check.exp to work with relative paths
Chris Meek [Fri, 8 Jun 2012 19:01:23 +0000 (15:01 -0400)]
testsuite: Fix check.exp to work with relative paths

Another fix for the autoconf (commit c66be968a4ea) related
testsuite issues.

12 years agotestsuite: Fix library.exp to work with relative paths
Chris Meek [Fri, 8 Jun 2012 17:58:53 +0000 (13:58 -0400)]
testsuite: Fix library.exp to work with relative paths

More fixes for the issues caused by the automake
changes in commit c66be968a4ea.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
David Smith [Fri, 8 Jun 2012 17:40:26 +0000 (12:40 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agodocs: let xmlto --with-fop checking be a little more chatty
Frank Ch. Eigler [Fri, 8 Jun 2012 17:39:14 +0000 (13:39 -0400)]
docs: let xmlto --with-fop checking be a little more chatty

12 years agoRemove STAPCONF_UTRACE_VIA_FTRACE.
David Smith [Fri, 8 Jun 2012 17:38:57 +0000 (12:38 -0500)]
Remove STAPCONF_UTRACE_VIA_FTRACE.

* buildrun.cxx (compile_pass): Removed autoconf-utrace-via-ftrace.c test
  compilation.
* runtime/autoconf-utrace-via-ftrace.c: Removed.
* tapsets.cxx (check_process_probe_kernel_support): Updated comment to
  remove mention of STAPCONF_UTRACE_VIA_FTRACE.
* runtime/task_finder.c: Ditto.
* runtime/runtime.h: Removed STAPCONF_UTRACE_VIA_FTRACE reference.
* runtime/stp_utrace.c: Removed all STAPCONF_UTRACE_VIA_FTRACE code.
* testsuite/lib/systemtap.exp (utrace_p): Updated requirement list for
  utrace-via-tracepoints.

12 years agodocs: only use working xmlto --with-fop
Frank Ch. Eigler [Fri, 8 Jun 2012 17:31:09 +0000 (13:31 -0400)]
docs: only use working xmlto --with-fop

There are configurations in the wild that only endavour to work.

* configure.ac: Re. fop, trust but VERIFY, with "xmlto --with-fop".

12 years agodocs: tighten up generated tapset.pdf formatting
Frank Ch. Eigler [Fri, 8 Jun 2012 16:38:38 +0000 (12:38 -0400)]
docs: tighten up generated tapset.pdf formatting

Studying docbook-style-xsl in Fedora, and the corresponding xslt-fo
stylesheets on the web, found some xsl:param options that make the
tapsets.pdf a little more lean and a touch more mean.  See also
http://snapshots.docbook.org/xsl/doc/fo/

* doc/SystemTap_Tapset_Reference/Makefile.am: Pass some powerful
  stringparams to xmlto.

12 years agodocumentation: generate tapset reference pdf with fop if available
Frank Ch. Eigler [Fri, 8 Jun 2012 16:37:06 +0000 (12:37 -0400)]
documentation: generate tapset reference pdf with fop if available

* configure.ac: Look for fop program.  It runs much faster than
  pdfdblatex or whatnot.
* doc/SystemTap_Tapset_Reference/Makefile.am: Pass --with-fop to
  xmlto if fop was found.

12 years agoBump xmlto memory limits to handle extra documentation from PR14208.
Serguei Makarov [Fri, 8 Jun 2012 15:05:30 +0000 (11:05 -0400)]
Bump xmlto memory limits to handle extra documentation from PR14208.

12 years agoFix rawhide crashes by using kernel's own strncpy_from_user().
David Smith [Fri, 8 Jun 2012 14:46:13 +0000 (09:46 -0500)]
Fix rawhide crashes by using kernel's own strncpy_from_user().

* runtime/copy.c: Use the kernel's generic strncpy_from_user()
  function when available.

12 years agotestsuite: Fix pretty-bits/char to work with relative paths
Josh Stone [Thu, 7 Jun 2012 20:46:38 +0000 (13:46 -0700)]
testsuite: Fix pretty-bits/char to work with relative paths

This is more fallout from the automake update (commit c66be968a4ea)
which led to relative $srcdir.  The pretty-bits and pretty-char tests
are passing $srcdir headers to @cast kernel types.  That gets compiled
with Kbuild, with the working directory is changed to the kernel root,
so we need to give full paths for those headers.

This adds a new tcl proc "fullpath" which inserts [pwd]/ on relative
paths, and updates those pretty tests to use it.

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