]> sourceware.org Git - systemtap.git/log
systemtap.git
12 years agoFixed PR13745 by updating memory tracepoint examples.
David Smith [Thu, 12 Apr 2012 18:05:25 +0000 (13:05 -0500)]
Fixed PR13745 by updating memory tracepoint examples.

* testsuite/systemtap.examples/memory/mmanonpage.stp: Updated tracepoints
  for RHEL6 and upstream kernels.
* testsuite/systemtap.examples/memory/mmanonpage.stp: Ditto.
* testsuite/systemtap.examples/memory/mmfilepage.stp: Ditto.
* testsuite/systemtap.examples/memory/mmwriteback.stp: Ditto.
* testsuite/systemtap.examples/memory/mmanonpage.meta: Updated script
  tracepoint dependencies in 'test_support' section.
* testsuite/systemtap.examples/memory/mmfilepage.meta: Ditto.
* testsuite/systemtap.examples/memory/mmwriteback.meta: Ditto.

12 years agotest at_var_mark.exp requires uprobes
Josh Stone [Thu, 12 Apr 2012 00:25:30 +0000 (17:25 -0700)]
test at_var_mark.exp requires uprobes

12 years agoFix compile problem by changing 'stp_for_each_cpu' to 'for_each_possible_cpu'.
David Smith [Wed, 11 Apr 2012 20:01:02 +0000 (15:01 -0500)]
Fix compile problem by changing 'stp_for_each_cpu' to 'for_each_possible_cpu'.

* runtime/runtime.h: Removed stp_for_each_cpu() macro definition, since no
  longer needed (and 'cpu_possible_map' has been removed from the upstream
  kernel).
* runtime/map-stat.c: Replaced 'stp_for_each_cpu()' with
  'for_each_possible_cpu()'.
* runtime/map.c: Ditto.
* runtime/perf.c: Ditto.
* runtime/pmap-gen.c: Ditto.
* runtime/stat.c: Ditto.
* runtime/transport/procfs.c: Ditto.
* translate.cxx: Ditto.

12 years agoClarify that resource limits are imposed on stap-server requests and not on stap...
Dave Brolley [Tue, 10 Apr 2012 18:32:24 +0000 (14:32 -0400)]
Clarify that resource limits are imposed on stap-server requests and not on stap-server itself.

12 years agoDon't compile csclient.cxx and cscommon.cxx when HAVE_NSS is false.
Dave Brolley [Tue, 10 Apr 2012 18:14:24 +0000 (14:14 -0400)]
Don't compile csclient.cxx and cscommon.cxx when HAVE_NSS is false.

- Don't compile the files at all (Makefile.am)
- #if HAVE_NSS added to the files in case another distro compiles
  them anyway.
- Don't call functions in these files from elsewhere.

12 years agoruntime/autoconf: compensate for missing <linux/wait.h> in some inode-uprobes versions
Negreanu Marius [Tue, 10 Apr 2012 15:07:29 +0000 (11:07 -0400)]
runtime/autoconf: compensate for missing <linux/wait.h> in some inode-uprobes versions

12 years agoImproved nfsdtop.stp by using aggregates.
David Smith [Thu, 5 Apr 2012 19:35:08 +0000 (14:35 -0500)]
Improved nfsdtop.stp by using aggregates.

* testsuite/systemtap.examples/network/nfsdtop.stp: Use aggregates to
  optimize a bit and reduce the number of global variables.

12 years agoAdded meta file for nfsdtop.stp and regenerated example index files.
David Smith [Thu, 5 Apr 2012 19:27:51 +0000 (14:27 -0500)]
Added meta file for nfsdtop.stp and regenerated example index files.

* testsuite/systemtap.examples/network/nfsdtop.meta: New file.
* testsuite/systemtap.examples/network/nfsdtop.stp: Made executable and
  added '#! /usr/bin/env stap' line at the top.
* testsuite/systemtap.examples/index.html: Regenerated.
* testsuite/systemtap.examples/index.txt: Ditto.
* testsuite/systemtap.examples/keyword-index.html: Ditto.
* testsuite/systemtap.examples/keyword-index.txt: Ditto.

12 years agoAdded new NFS server example script.
Bryn M. Reeves [Thu, 5 Apr 2012 18:49:11 +0000 (13:49 -0500)]
Added new NFS server example script.

12 years agopf3.stp sample: and regenerate the examples index
Frank Ch. Eigler [Thu, 5 Apr 2012 18:35:02 +0000 (14:35 -0400)]
pf3.stp sample: and regenerate the examples index

Next up, one thousand commits to add then subtract
whitespace.

12 years agopf3.stp sample: fix index title
Frank Ch. Eigler [Thu, 5 Apr 2012 18:34:31 +0000 (14:34 -0400)]
pf3.stp sample: fix index title

12 years agoexamples: add pf3.stp
Frank Ch. Eigler [Thu, 5 Apr 2012 18:21:38 +0000 (14:21 -0400)]
examples: add pf3.stp

* profiling/pf3.*: New example for combined kernel/user-space
  gross function profiling.

12 years agoMove pf2.* sample script from process/ to profiling/ subdirectory
Frank Ch. Eigler [Thu, 5 Apr 2012 18:06:05 +0000 (14:06 -0400)]
Move pf2.* sample script from process/ to profiling/ subdirectory

12 years agoFix module build problem on ARM.
David Smith [Wed, 4 Apr 2012 20:50:29 +0000 (15:50 -0500)]
Fix module build problem on ARM.

* runtime/vma.c (_stp_vma_match_vdso): Call __access_process_vm_noflush()
  instead of __access_process_vm().  When reading user memory, the
  __access_process_vm_noflush() and __access_process_vm() functions are
  fairly equivalent and we're only reading here.  (The write side of
  __access_process_vm() calls non-exported functions on ia64, mips,
  and arm.)
* runtime/sym.c (_stp_build_id_check): Ditto.

12 years agoFix module build problem on RHEL5 ia64.
David Smith [Mon, 2 Apr 2012 19:24:21 +0000 (14:24 -0500)]
Fix module build problem on RHEL5 ia64.

* runtime/sym.c (_stp_build_id_check): Only call __access_process_vm()
  when we're not using in-kernel utrace.  On RHEL5 ia64 calling
  __access_process_vm() doesn't work since it ends up calling
  flush_icache_range(), which isn't exported.
* runtime/vma.c (_stp_vma_match_vdso): Ditto.

12 years agoFix stapiu cleanup to not hold rcu lock while decrementing semaphores.
David Smith [Thu, 29 Mar 2012 20:31:33 +0000 (15:31 -0500)]
Fix stapiu cleanup to not hold rcu lock while decrementing semaphores.

* runtime/uprobes-inode.c (stapiu_decrement_process_semaphores): Unlock
  rcu while writing semaphores.  Otherwise we're atomic and we can't be in
  atomic context while writing semaphores.

12 years agoUpdate sdt_misc.exp testcase for ARM
Wade Farnsworth [Wed, 28 Mar 2012 14:47:06 +0000 (07:47 -0700)]
Update sdt_misc.exp testcase for ARM

* Omit -m64 switch for wildcard tests, as ARM does not implement this
switch
* Mark a subset of the V1 and V2 tests as XFAIL, as they are known to fail
due to broken operand parsing on ARM.  Note that this brokenness does
not affect V3.

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
12 years agoPR13475: Fix ARM SDT_V3 operand parsing
Wade Farnsworth [Wed, 28 Mar 2012 14:46:16 +0000 (07:46 -0700)]
PR13475: Fix ARM SDT_V3 operand parsing

* Include regular expressions to parse ARM operands
* Add ARM register data
* Allow for whitespace in ARM operands containing []'s

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
12 years agoPR 13370: Complete IPv6 support in the compile-server and client.
Dave Brolley [Tue, 27 Mar 2012 18:58:06 +0000 (14:58 -0400)]
PR 13370: Complete IPv6 support in the compile-server and client.

12 years agoPR13644: staprun -V (version) option
Frank Ch. Eigler [Mon, 26 Mar 2012 17:54:07 +0000 (13:54 -0400)]
PR13644: staprun -V (version) option

* common.c (parse_args): Add -V (version) support.  No long options
  already used, so --version is not immediately available.
  (usage): Document it.
* staprun.8: Ditto.
* Makefile.am: Build git_version.h.
* Makefile.in: Regenerated.

12 years agoruntime i18n: disable nonfunctional _F / _NF macros
Frank Ch. Eigler [Mon, 26 Mar 2012 17:47:06 +0000 (13:47 -0400)]
runtime i18n: disable nonfunctional _F / _NF macros

* staprun.h (_F, _NF): Disable them, noting why.

12 years agoverbosify NEWS blurbage regarding -fdebug-types-section
Frank Ch. Eigler [Sun, 25 Mar 2012 16:01:19 +0000 (12:01 -0400)]
verbosify NEWS blurbage regarding -fdebug-types-section

12 years agoImprove build-id checking when the task we're interested in isn't 'current'.
David Smith [Fri, 23 Mar 2012 20:52:01 +0000 (15:52 -0500)]
Improve build-id checking when the task we're interested in isn't 'current'.

* translate.cxx (emit_module_init): Moved include files to
  runtime/runtime.h.
* runtime/runtime.h: Moved includes here from translate.cxx.  Rearranged
  order a bit, to allow use of __access_process_vm() earlier.
* runtime/sym.c (_stp_build_id_check): Instead of passing in a flag to
  indicate build-id checking a user module, instead pass a task_struct
  pointer in.  If the task_struct pointer isn't 'current', use
  __access_process_vm() to read data.
  (_stp_module_check): Update _stp_build_id_check() call.
  (_stp_kmodule_check): Ditto.
  (_stp_usermodule_check): Ditto.
* runtime/vma.c (_stp_vma_match_vdso): If the task we're trying to match
  isn't 'current', use __access_process_vm() to read data.

12 years agoproc_mem.stp: Use PF_STARTING conditionally.
Mark Wielaard [Thu, 22 Mar 2012 14:16:22 +0000 (15:16 +0100)]
proc_mem.stp: Use PF_STARTING conditionally.

Use the PF_STARTING flag only conditionally on it being defined.
Kernel commit v3.3-rc6-27-g6e27f63 - vfork: kill PF_STARTING, removed it.

12 years agodebugtypes.exp: Remove verbose debug output.
Mark Wielaard [Thu, 22 Mar 2012 14:01:04 +0000 (15:01 +0100)]
debugtypes.exp: Remove verbose debug output.

12 years agoDepend on elfutils 0.148+, document debug_types support requires 0.154+.
Mark Wielaard [Wed, 21 Mar 2012 15:56:19 +0000 (16:56 +0100)]
Depend on elfutils 0.148+, document debug_types support requires 0.154+.

12 years agoPartial fix for PR12997 - support dwarf4 .debug_types
Tom Tromey [Fri, 16 Mar 2012 16:44:14 +0000 (10:44 -0600)]
Partial fix for PR12997 - support dwarf4 .debug_types

This fix does not solve the ET_REL case pointed out in the PR.
However, it does work ok for ordinary code.

    * dwflpp.cxx (dwflpp::iterate_over_cus): Add 'want_types' argument.
    Iterate over type units.
    (dwflpp::declaration_resolve_other_cus): Update.
    (dwflpp::iterate_single_function): Update.
    (dwflpp::iterate_over_globals): Also allow DW_TAG_type_unit.
    * dwflpp.h (module_tus_read_t): New typedef.
    (dwflpp::iterate_over_cus): Update.
    (dwflpp::module_tus_read): New member.
    * tapsets.cxx (dwarf_query::query_module_dwarf): Update.
    (tracepoint_query::handle_query_module): Update.
    * testsuite/systemtap.pass1-4/debugtypes.cxx: New file.
    * testsuite/systemtap.pass1-4/debugtypes.exp: New file.
    * testsuite/systemtap.pass1-4/debugtypes.stp: New file.

I built gdb with '-gdwarf-4 -fdebug-types-section'.
Then I tried this stap script:

probe process("/home/tromey/gnu/archer/build/gdb/gdb").function("dwarf2_attr") {
      println(@cast($dwarf2_per_objfile, "struct dwarf2_per_objfile")->objfile)
}

With Fedora 16 stap:

barimba. stap -p2 /tmp/q.stp
semantic error: type definition 'struct dwarf2_per_objfile' not found: identifier '@cast' at /tmp/q.stp:2:15
        source:       println(@cast($dwarf2_per_objfile, "struct dwarf2_per_objfile")->objfile)
                              ^
Pass 2: analysis failed.  Try again with another '--vp 01' option.

After the patch, this works.

12 years agoPR13876: same another test case
Frank Ch. Eigler [Wed, 21 Mar 2012 11:09:28 +0000 (07:09 -0400)]
PR13876: same another test case

* testsuite/semko/fifty.stp: Add /bin/sh shebang to guarantee -g propagation.

12 years agoPR13876: another test case
Frank Ch. Eigler [Wed, 21 Mar 2012 01:13:39 +0000 (21:13 -0400)]
PR13876: another test case

* testsuite/semko/fifty.stp: Add test case from report.

12 years agoPR13876: avoid miscompilation of duplicated tapset function
Frank Ch. Eigler [Wed, 21 Mar 2012 01:02:19 +0000 (21:02 -0400)]
PR13876: avoid miscompilation of duplicated tapset function

It was found that the translator got confused if the same function was
defined by the tapset and the end-user script.  The same problem can
also afflict global variables.  Along the way, clean up error
formatting.

* staptree.h (semantic_error): Drop msg2 field, which was only ever
  used for the perfunctory string "vs".
* elaborate.cxx (semantic_pass_symbols): Perform duplicate
  global-variable & function testing and rejection.
  (symresolution_info::find_function): Print an extra warning for
  the case of mismatched function callee/caller arities.
  (derive_probes): Prepare chained "while resolving
  probe point" semantic_error instead of msg2 based additions.
* session.cxx (register_library_aliases): Ditto.
  (print_error): Adjust to loss of msg2.  Print tok1 / tok2
  and source-context in a more readable way.
* tapsets.cxx (visit_target_symbol_context): Use const semantic_error*
  temps to adjust to chaining changes.
* testsuite/systemtap.base/statement.exp: Adjust to changed error message.
* translate.cxx (*): Adjust to loss of semantic_error msg2.

12 years agotestsuite: current.exp should tolerate run-time WARNINGs
Frank Ch. Eigler [Wed, 21 Mar 2012 01:00:38 +0000 (21:00 -0400)]
testsuite: current.exp should tolerate run-time WARNINGs

Pass -w to stap, so as to suppress kernel warnings, as per kprobes
-EINVAL registration errors.

12 years agotestsuite: don't run client.exp tests without installcheck
Frank Ch. Eigler [Wed, 21 Mar 2012 00:59:37 +0000 (20:59 -0400)]
testsuite: don't run client.exp tests without installcheck

This is since we wish to limit testsuite runs that use as_root to
installcheck/root runs.

12 years agotestuite: fix server_args.exp in filtering stap -v output
Frank Ch. Eigler [Wed, 21 Mar 2012 00:58:26 +0000 (20:58 -0400)]
testuite: fix server_args.exp in filtering stap -v output

Some of the help text contains ( ) chars, which need to be filtered
prior to them being accidentally passed to the regexp.

12 years agoPR11441 stop testing deprecated kernel.function(number).inline
Frank Ch. Eigler [Wed, 21 Mar 2012 00:49:42 +0000 (20:49 -0400)]
PR11441 stop testing deprecated kernel.function(number).inline

commit 440d9b00db23a1cb4b1 removed the code from the translator;
let's remove their tests from the testsuite.

12 years agotestsuite: disable rlimits test for !installtest_p
Frank Ch. Eigler [Tue, 20 Mar 2012 20:52:25 +0000 (16:52 -0400)]
testsuite: disable rlimits test for !installtest_p

12 years agoPR13878: Mention the module in @cast "not found" message
Josh Stone [Tue, 20 Mar 2012 20:04:18 +0000 (13:04 -0700)]
PR13878: Mention the module in @cast "not found" message

To help understand when @cast fails to find a type, mention the module
that was searched.  This may already hinted by the e->tok source
location, but stating the module explicitly is a useful hint if the user
left the module field to be implicitly filled in.

12 years agoMake uprobes_p() testsuite function find new inode-uprobes.
David Smith [Fri, 16 Mar 2012 19:11:04 +0000 (14:11 -0500)]
Make uprobes_p() testsuite function find new inode-uprobes.

* testsuite/lib/systemtap.exp (uprobes_p): Handle change in inode-uprobes
  registration function name.

12 years agostap.1: Document - (read from stdin) and -e SCRIPT.
Mark Wielaard [Fri, 16 Mar 2012 14:43:14 +0000 (15:43 +0100)]
stap.1: Document - (read from stdin) and -e SCRIPT.

12 years agoMove PERF probe family description before EXAMPLES section.
Mark Wielaard [Fri, 16 Mar 2012 14:41:28 +0000 (15:41 +0100)]
Move PERF probe family description before EXAMPLES section.

12 years agoFix PR13815 by fixing task_dentry_path() tapset function for RHEL5.
David Smith [Thu, 15 Mar 2012 18:04:35 +0000 (13:04 -0500)]
Fix PR13815 by fixing task_dentry_path() tapset function for RHEL5.

* tapset/dentry.stp (task_dentry_path): Fix for later RHEL5 kernels by
  handling 'struct path' renamed to 'struct vfs_path' (problem first
  noticed in kernel 2.6.18-308.el5).

12 years agoPR13847: simplify compiled-printf functions
Frank Ch. Eigler [Wed, 14 Mar 2012 19:16:37 +0000 (15:16 -0400)]
PR13847: simplify compiled-printf functions

* translate.cxx (emit_compiled_printfs): Emit flatter code, with
  fewer { variables; } that a bad compiler can translate to a large
  call frame.  This appears to allow normal (non-noinline) functions.

12 years agoPR13847: document CONFIG_DEBUG_INFO= default
Frank Ch. Eigler [Wed, 14 Mar 2012 17:16:46 +0000 (13:16 -0400)]
PR13847: document CONFIG_DEBUG_INFO= default

12 years agoPR13847: don't build debuginfo for stap modules
Frank Ch. Eigler [Wed, 14 Mar 2012 17:10:38 +0000 (13:10 -0400)]
PR13847: don't build debuginfo for stap modules

Suppressing the -g (by default) for stap_*.ko reduces compile time
and greatly reduces resulting .ko file size.  Since stap modules
are not usually probed themselves, this is a good default.

* buildrun.cxx (make_any_make_cmd): Prefix kbuildflags with CONFIG_DEBUG_INFO=.

12 years agoPR13661 - Added test cases
Chris Meek [Wed, 14 Mar 2012 15:59:15 +0000 (11:59 -0400)]
PR13661 - Added test cases

Also added a proc in testsuite/lib/systemtap.exp
to run as_non_root.

12 years agoAllow sysroot_sysenv.exp to run correct on machines without uprobes
William Cohen [Wed, 14 Mar 2012 15:43:50 +0000 (11:43 -0400)]
Allow sysroot_sysenv.exp to run correct on machines without uprobes

If the kernel does not have uprobes support, the sysroot_sysenv test
is untested. The catch and wait statements are only needed for the
case where the test is actually run. Having the catch statment run
when the test does not run causes an error.

12 years agoTest the .library modifier for RPATH awareness
Stan Cox [Wed, 14 Mar 2012 15:30:17 +0000 (11:30 -0400)]
Test the .library modifier for RPATH awareness

* library.exp (globbing_test):  Created from main for rpath testing.

12 years agoMake the .library modifier aware of RPATH
Stan Cox [Wed, 14 Mar 2012 01:54:15 +0000 (21:54 -0400)]
Make the .library modifier aware of RPATH

* tapsets.cxx (base_query): Treat .library("lib") as a wildcard if it
  isn't found in LD_LIBRARY_PATH
  (query_modue): Likewise.
  (query_one_library): Likewise.
  dwarf_builder::build): Likewise.

12 years agolangref.tex: Document foreach (value = key in array) variant.
Mark Wielaard [Tue, 13 Mar 2012 14:36:15 +0000 (15:36 +0100)]
langref.tex: Document foreach (value = key in array) variant.

12 years agolangref.tex: ref statement foreach subsection from arrays iteration section.
Mark Wielaard [Tue, 13 Mar 2012 14:05:54 +0000 (15:05 +0100)]
langref.tex: ref statement foreach subsection from arrays iteration section.

12 years agoAdapt to the inode-uprobes name change in tip
Josh Stone [Mon, 12 Mar 2012 21:42:28 +0000 (14:42 -0700)]
Adapt to the inode-uprobes name change in tip

We now have the functions register_uprobe -> uprobe_register and
unregister_uprobe -> uprobe_unregister.  The client API has otherwise
not changed.

I've made our code reflect the new names as much as possible, treating
the old names as the exceptional case, in case we ever want to remove
that compatibility.  For now, it should work in all cases, although I
don't have a full complement of old/new & exported/!exported kernels to
test with.

12 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Mark Wielaard [Mon, 12 Mar 2012 12:02:03 +0000 (13:02 +0100)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

12 years agoDocument new @var construct in NEWS, langref, beginners and stapprobes.
Mark Wielaard [Mon, 12 Mar 2012 12:00:40 +0000 (13:00 +0100)]
Document new @var construct in NEWS, langref, beginners and stapprobes.

12 years agoQuietly wget upstream sources.
Stan Cox [Mon, 12 Mar 2012 01:55:46 +0000 (21:55 -0400)]
Quietly wget upstream sources.

mysql.exp (wget): Add -q
postgres.exp (wget): Likewise
stap-tcl.sh (wget): Likewise
xulrunner.exp (wget): Likewise

12 years agotapset/guru-delay.stp (mdelay): Fix @us argument documentation typo.
Mark Wielaard [Sun, 11 Mar 2012 13:08:15 +0000 (14:08 +0100)]
tapset/guru-delay.stp (mdelay): Fix @us argument documentation typo.

12 years agotapset/dentry.stp (real_mount): Fix typo in @vfsmnt argument documentation.
Mark Wielaard [Sun, 11 Mar 2012 13:06:25 +0000 (14:06 +0100)]
tapset/dentry.stp (real_mount): Fix typo in @vfsmnt argument documentation.

12 years agoglobal_var_kernel.exp: tz_minuteswest can be negative.
Mark Wielaard [Sat, 10 Mar 2012 18:15:35 +0000 (19:15 +0100)]
global_var_kernel.exp: tz_minuteswest can be negative.

12 years agoPreliminary SDT semaphores with inode-uprobes
Josh Stone [Fri, 9 Dec 2011 17:24:31 +0000 (09:24 -0800)]
Preliminary SDT semaphores with inode-uprobes

This adds mmap tracking to our inode-uprobes client, so we may
manipulate SDT semaphores as modules come and go.  It seems to work ok,
though remaining sleepiness issues may need to be worked out in
task_finder2.

12 years agoGlobal vars don't need (cannot use) frame base in location descriptor.
Mark Wielaard [Fri, 9 Mar 2012 14:57:31 +0000 (15:57 +0100)]
Global vars don't need (cannot use) frame base in location descriptor.

And so they also don't need cfa_ops (CFI) to calculate the frame base.

12 years agoUpdate verbose log and semantic exception messages for local vs global vars.
Mark Wielaard [Fri, 9 Mar 2012 14:19:12 +0000 (15:19 +0100)]
Update verbose log and semantic exception messages for local vs global vars.

Global @vars (with @cu/src_name.c) have a fixed scope/CU and don't depend
on location/PC. Make that clean in verbose log and semantic error messages.

12 years agoMerge branch 'sysroot'
Josh Stone [Fri, 9 Mar 2012 00:53:38 +0000 (16:53 -0800)]
Merge branch 'sysroot'

Conflicts:
cmdline.cxx
cmdline.h
session.cxx
(Reconciled with commit 372c6458, "Long options rework.")

12 years agoPR12331: Add testcase for --sysroot and --sysenv
Wade Farnsworth [Thu, 8 Mar 2012 14:51:00 +0000 (07:51 -0700)]
PR12331: Add testcase for --sysroot and --sysenv

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
12 years agoPR12331: Document --sysroot and --sysenv
Wade Farnsworth [Thu, 8 Mar 2012 14:49:58 +0000 (07:49 -0700)]
PR12331: Document --sysroot and --sysenv

Update stap.1 and NEWS to document the new options.

12 years agoPR12331: Introduce stap options --sysroot and --sysenv
Wade Farnsworth [Thu, 8 Mar 2012 14:49:04 +0000 (07:49 -0700)]
PR12331: Introduce stap options --sysroot and --sysenv

This adds new command-line options to facilitate different file locations at
compile-time versus run-time when generating stap kernel modules for a remote
system:

1. --sysroot=DIR
   Specifies a separate filesystem for the remote system on the local
   system.  The following stap functionalities will make use of this:

   a. When compiling process and library probes with a remote filesystem path
      (e.g. process("/bin/foo") with --sysroot=/bar/baz).  In this case symbols
      will be taken from the local filesystem (/bar/baz/bin/foo), but the
      resulting .ko will still contain paths on the remote filesystem
      (/bin/foo).

   b. When passing a kernel release with -r (not a full path), the kernel
      build directory will be expected in the sysroot.

   c. When DWARF debug info is contained in a separate file from the
      executable, the sysroot is used to find the debug info files.

   d. All calls to find_executable() search the path passed in the
      argument env_path relative to the sysroot.  For example if
      PATH=/bin/foo, and --sysroot=/bar/baz is provided, then
      find_executable() called with env_path == "PATH" will search
      /bar/baz/bin/foo.

   e. stap attempts to detect if a path in a probe would be outside of the
      sysroot and errors appropriately.  This situation may occur, for
      example, if the path contains several ".." directories.

2. --sysenv=VAR=VALUE
   Specifies a different environment variable for the remote system as opposed
   to the local one, and that the value on the remote system should be used.
   Currently only valid env_path arguments to find_executable() are handled
   (i.e. PATH, LD_LIBRARY_PATH).  If --sysroot is provided and --sysenv
   is omitted, then the local environment relative to the sysroot will
   be used.

These options are disabled for systemtap clients.

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
12 years agoPR13819: avoid warning on CONFIG_DEBUG_PER_CPU_MAPS=y
Frank Ch. Eigler [Thu, 8 Mar 2012 23:20:42 +0000 (18:20 -0500)]
PR13819: avoid warning on CONFIG_DEBUG_PER_CPU_MAPS=y

* translate.cxx (c_unparser::emit_module_exit): Use
  for_each_possible_cpu instead of NR_CPU iteration, even
  though that should not matter.

12 years agoCannot use @var DWARF variables in tracepoints, warn, but don't crash.
Mark Wielaard [Thu, 8 Mar 2012 23:10:52 +0000 (00:10 +0100)]
Cannot use @var DWARF variables in tracepoints, warn, but don't crash.

12 years agoMake sure @var works for process.mark probes.
Mark Wielaard [Thu, 8 Mar 2012 22:32:49 +0000 (23:32 +0100)]
Make sure @var works for process.mark probes.

12 years agoguru-delay: add tapset documentation
Frank Ch. Eigler [Thu, 8 Mar 2012 21:12:37 +0000 (16:12 -0500)]
guru-delay: add tapset documentation

12 years agonew tapset: guru delays
Bryn M. Reeves [Thu, 8 Mar 2012 20:38:40 +0000 (15:38 -0500)]
new tapset: guru delays

12 years agoSelect most specific CU srcfile that matches @var("var@src") specification.
Mark Wielaard [Thu, 8 Mar 2012 14:20:08 +0000 (15:20 +0100)]
Select most specific CU srcfile that matches @var("var@src") specification.

dwarf_var_expanding_visitor::getcuscope: If there is a perfect match
select that CU, otherwise, select the CU srcfile that is most specific
(matching path/src file lenght is shortest).

12 years agoMerge branch 'at_var'
Mark Wielaard [Wed, 7 Mar 2012 19:11:46 +0000 (20:11 +0100)]
Merge branch 'at_var'

12 years agoPR13784 Allow defining a diffent CU source in @var.
Mark Wielaard [Wed, 7 Mar 2012 18:58:12 +0000 (19:58 +0100)]
PR13784 Allow defining a diffent CU source in @var.

Add cu_name to struct target_symbol. Set it in parse_target_symbol
to the string after @ in @var("somevar@some/src/file.c"). Make
target_symbol::sym_name() aware of @cu_name postfix (don't return it).
Add dwarf_var_expanding_visitor::getcuscope() which figures out the
CU DIE to use as scope if target_symbol has cu_name part. Extend
global_var.exp test to show new capability.

12 years agoRemove CONFIG_UTRACE use in testsuite and just depend on utrace_p/uprobes_p.
David Smith [Wed, 7 Mar 2012 18:05:39 +0000 (12:05 -0600)]
Remove CONFIG_UTRACE use in testsuite and just depend on utrace_p/uprobes_p.

* testsuite/buildok/pretty.stp: Moved uprobes tests to pretty-uprobes.stp.
* testsuite/buildok/pretty-uprobes.stp: New test.
* testsuite/buildok/ucontext-symbols-embedded.stp: Remove CONFIG_UTRACE
  check and let buildok.exp kfail the test if no uprobes.
* testsuite/buildok/ucontext-unwind-embedded.stp: Ditto.
* testsuite/buildok/utrace.stp: Ditto.
* testsuite/semko/utrace.stp: Remove CONFIG_UTRACE check and let semko.exp
  handle it.
* testsuite/semok/pretty.stp: Move uprobes tests to pretty-uprobes.stp.
* testsuite/semok/pretty-uprobes.stp: New test.
* testsuite/semok/thirtysix.stp: Move utrace tests to thirtysix-utrace.stp.
* testsuite/semok/thirtysix-utrace.stp: New test.
* testsuite/semok/utrace01.stp: Remove CONFIG_UTRACE check and let
  semok.exp handle it.
* testsuite/systemtap.base/bz10294.stp: Remove CONFIG_UTRACE check and let
  statement.exp handle it.
* testsuite/systemtap.base/bz6905.stp: Ditto.
* testsuite/systemtap.base/statement.exp: Handle no utrace by marking
  tests as untested.
* testsuite/systemtap.base/func_alias.exp: If no utrace, mark test as
  untested.
* testsuite/systemtap.pass1-4/buildok.exp: Kfail more utrace/uprobes tests.
* testsuite/systemtap.pass1-4/semko.exp: Ditto.
* testsuite/systemtap.pass1-4/semok.exp: Ditto.

12 years agoPR13661: Rewrote test cases to be more stable
Chris Meek [Wed, 7 Mar 2012 17:22:43 +0000 (12:22 -0500)]
PR13661: Rewrote test cases to be more stable

12 years agoIntroduce @var("varname") as alternative syntax for $varname.
Mark Wielaard [Tue, 6 Mar 2012 16:34:36 +0000 (17:34 +0100)]
Introduce @var("varname") as alternative syntax for $varname.

Adds a field target_name and a method sym_name() to struct target_symbol
to be used by the parser and tapsets translator so $name and @var("name")
can be used interchanably. Adds a testcase at_var.exp to test this for
various combinations of uprobes, kprobes, parameters, variables, arrays,
fields access, pretty printing and taking addresses.

12 years agoFix kallsyms_expand_symbol.exp regression after commit 4d51e8.
Mark Wielaard [Wed, 7 Mar 2012 14:22:57 +0000 (15:22 +0100)]
Fix kallsyms_expand_symbol.exp regression after commit 4d51e8.

In dwflpp::find_variable_and_frame_base() when we do a search for a search
for an alternative vardie we need to saved the actual vardie content in
case we fail, no just copy the pointer to the vardie data...

12 years agoPR10622. Better workaround for GCC PR51410. Find external var DIE location.
Mark Wielaard [Wed, 7 Mar 2012 12:35:56 +0000 (13:35 +0100)]
PR10622. Better workaround for GCC PR51410. Find external var DIE location.

Some GCC versions would output duplicate external variables, one
without a location attribute. If so, try to find the other if it
exists in the same scope. This is a better solution than the previous
fallback solution of just trying to get the address in the symbol table.
That could result in picking the wrong external variable with the same
name (but from a different CU). Add test case to show this works better.

12 years agoCorrect uninitialized-var compiler warnings in uprobes.c
ch huang [Wed, 7 Mar 2012 12:16:05 +0000 (07:16 -0500)]
Correct uninitialized-var compiler warnings in uprobes.c

12 years agoPR13661: Suppress core dumps for RLIMIT_AS and RLIMIT_STACK
Frank Ch. Eigler [Tue, 6 Mar 2012 20:24:25 +0000 (15:24 -0500)]
PR13661: Suppress core dumps for RLIMIT_AS and RLIMIT_STACK

Do this since we don't want core dumps accumulating on a server.

12 years agoPR13661: Set both max and current rlimits
Chris Meek [Tue, 6 Mar 2012 20:04:06 +0000 (15:04 -0500)]
PR13661: Set both max and current rlimits

Now the --rlimit-* options can only be used to lower the rlimits
when not run as root.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Tue, 6 Mar 2012 19:51:54 +0000 (14:51 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agoMore updates to client_args.exp test suite.
Dave Brolley [Tue, 6 Mar 2012 19:51:32 +0000 (14:51 -0500)]
More updates to client_args.exp test suite.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Tue, 6 Mar 2012 19:31:16 +0000 (14:31 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

Conflicts:
cmdline.cxx
cmdline.h
session.cxx

12 years agoPR13661: Added test cases
Chris Meek [Tue, 6 Mar 2012 19:20:10 +0000 (14:20 -0500)]
PR13661: Added test cases

12 years agoLong options rework.
Dave Brolley [Tue, 6 Mar 2012 17:48:32 +0000 (12:48 -0500)]
Long options rework.

- Don't rely on the order of stap_long_options for indexing
  - getopt_long now returns all option ids
- Same for options processing in stap-serverd
- Update client_args test suite

12 years agoPR13609: Kill sub-processes with SIGTERM, regardless of last incoming signal.
Frank Ch. Eigler [Tue, 6 Mar 2012 16:05:16 +0000 (11:05 -0500)]
PR13609: Kill sub-processes with SIGTERM, regardless of last incoming signal.

12 years agoPR13661: Added NEWS and man page entries
Chris Meek [Mon, 5 Mar 2012 22:36:34 +0000 (17:36 -0500)]
PR13661: Added NEWS and man page entries

12 years agoPR13661: Relax Server Rlimits (move to stap)
Chris Meek [Mon, 5 Mar 2012 21:16:31 +0000 (16:16 -0500)]
PR13661: Relax Server Rlimits (move to stap)

  Added rlimit options to stap:
    --rlimit-as=NUM
    --rlimit-cpu=NUM
    --rlimit-nproc=NUM
    --rlimit-stack=NUM
    --rlimit-fsize=NUM
  These options will set the appropriate rlimits to whatever is
  provided.
  Removed all rlimit handling from stap-serverd.cxx. These values
  can be specified in ~stap-server/.systemtap/rc.
  Default values are added to ~stap-server/.systemtap/rc on install.

12 years agoMark inline embedded-C expressions returning AF_INET/AF_INET6 as unprivileged.
David Smith [Mon, 5 Mar 2012 20:49:14 +0000 (14:49 -0600)]
Mark inline embedded-C expressions returning AF_INET/AF_INET6 as unprivileged.

* tapset/inet_sock.stp: Marked inline embedded-C expressions returning
  AF_INET/AF_INET6 in functions as unprivileged.
* tapset/ip.stp: Ditto.
* tapset/nfs_proc.stp: Ditto.
* tapset/rpc.stp: Ditto.

12 years agoInitial changes for supporting IPv6 in the compile server and client.
Dave Brolley [Fri, 2 Mar 2012 19:36:45 +0000 (14:36 -0500)]
Initial changes for supporting IPv6 in the compile server and client.

12 years agotestsuite.apps: similar changes for other TESTAPPS=<onetest> case
Frank Ch. Eigler [Mon, 5 Mar 2012 15:43:26 +0000 (10:43 -0500)]
testsuite.apps: similar changes for other TESTAPPS=<onetest> case

12 years agotestsuite python: be sensitive to TESTAPPS=python rather than TESTAPPS=tcl
Frank Ch. Eigler [Mon, 5 Mar 2012 15:40:55 +0000 (10:40 -0500)]
testsuite python: be sensitive to TESTAPPS=python rather than TESTAPPS=tcl

* testsuite/systemtap.apps/python.exp: Fix typo in applicability test.

12 years agoRevert "work in progress" that zapped AUTHORS
Frank Ch. Eigler [Sat, 3 Mar 2012 17:38:21 +0000 (12:38 -0500)]
Revert "work in progress" that zapped AUTHORS

This reverts commit d112b4e178fe21a82f55390305e99dc491922cb8.

12 years agoAdd new systemtap.apps for python
Stan Cox [Sat, 3 Mar 2012 15:09:34 +0000 (10:09 -0500)]
Add new systemtap.apps for python

* python.exp: New.  Test python sdt markers.
* python2.stp python3.stp:  New.  Backtracing and variable display tapset.

12 years agowork in progress
Stan Cox [Tue, 17 Jan 2012 16:57:36 +0000 (11:57 -0500)]
work in progress

12 years agoClean out tracking for blocks that are merged into other blocks
William Cohen [Fri, 2 Mar 2012 17:13:53 +0000 (12:13 -0500)]
Clean out tracking for blocks that are merged into other blocks

The IO system in linux often merges blocks together to reduce the number of
IO operations sent to IO devices. If nothing is done the tracking for
merged IO operations can fill up the associative arrays, causing the script
to fail.  This problem was reported in rhbz743591. This commit resolves
this problem.

12 years agoRevert "Clean out tracking for blocks that are merged into other blocks"
William Cohen [Fri, 2 Mar 2012 17:13:13 +0000 (12:13 -0500)]
Revert "Clean out tracking for blocks that are merged into other blocks"

This reverts commit 0102305e3573868b852faf5183451676beaedbe6.

12 years agoClean out tracking for blocks that are merged into other blocks
William Cohen [Fri, 2 Mar 2012 17:07:21 +0000 (12:07 -0500)]
Clean out tracking for blocks that are merged into other blocks

The IO system in linux often merges blocks together to reduce the number of
IO operations sent to IO devices. If nothing is done the tracking for
merged IO operations can fill up the associative arrays, causing the script
to fail.  This problem was reported in rhbz743591. This commit resolves
this problem.

12 years agoMatch Requires to existing package layout.
Stan Cox [Thu, 1 Mar 2012 04:11:32 +0000 (23:11 -0500)]
Match Requires to existing package layout.

* systemtap.spec (main): Only BuildRequires gcc-c++
(devel): Requires gcc make
(testsuite): Requires gcc gcc-c++ make glibc-devel and possibly glibc-devel.i386

12 years agoRegenerate systemtap.examples indexes.
Mark Wielaard [Wed, 29 Feb 2012 22:49:00 +0000 (23:49 +0100)]
Regenerate systemtap.examples indexes.

12 years agoBZ613992: new enospc.stp sample script
Lukas Czerner [Wed, 29 Feb 2012 17:38:21 +0000 (12:38 -0500)]
BZ613992: new enospc.stp sample script

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