]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoPR12137: Separate the .stapsdt.base logic from probe asm
Josh Stone [Wed, 20 Oct 2010 22:03:49 +0000 (15:03 -0700)]
PR12137: Separate the .stapsdt.base logic from probe asm

This splits the SDT probes into two __asm__ statements, one for the
probe itself, and the other for logic to prepare the .stapsdt.base
section.  This avoids having a string literal that is too long for
-pedantic compilation (max length 509).

* includes/sys/sdt.h: Define _SDT_ASM_BASE for .stapsdt.base logic,
  separate from _SDT_ASM_BODY, and add to _SDT_PROBE and STAP_PROBE_ASM.

14 years agoAdd a 0-arg test to sdt.exp
Josh Stone [Wed, 20 Oct 2010 22:03:14 +0000 (15:03 -0700)]
Add a 0-arg test to sdt.exp

14 years agoPR10745 NEWS blurbage
Frank Ch. Eigler [Wed, 20 Oct 2010 17:26:16 +0000 (13:26 -0400)]
PR10745 NEWS blurbage

14 years agoPR10745: automate kernel source_tree finding with stap -r /PATH/
Frank Ch. Eigler [Wed, 20 Oct 2010 17:13:20 +0000 (13:13 -0400)]
PR10745: automate kernel source_tree finding with stap -r /PATH/

* tapsets.cxx (init_dw): Provide diagnostics when figuring out source_tree.
* session.cxx (main): Ditto.  For stap -r /PATH/, heuristically infer
  source_tree too.

14 years agoPR10745: access hidden kernel tracepoints
Frank Ch. Eigler [Wed, 20 Oct 2010 15:51:34 +0000 (11:51 -0400)]
PR10745: access hidden kernel tracepoints

Including xfs_types.h unconditionally on installations with no
kernel debuginfo would cause normal tracepoint processing to fail too.

* tapsets.cxx (tracepoint_extra_decls): Include xfs_types.h
  only if we know the kernel source tree.

14 years agoPR10745: access hidden kernel tracepoints
Frank Ch. Eigler [Wed, 20 Oct 2010 15:27:59 +0000 (11:27 -0400)]
PR10745: access hidden kernel tracepoints

A bunch of kernel tracepoints have been declared outside the conventional
include/linux/trace/* hierarchy, and left in the source tree only.  By
searching the source tree with some additional glob patterns, we can find
them and generate debuginfo the usual way.  On Fedora/RHEL, this means
looking through debuginfo to find the DW_AT_comp_dir (compilation source
directory), which is something like /usr/src/debug/kernels/FOO/BAR/.

Nearly all tracepoints appear now accessible under RHEL6/F13 era kernels:

% ls -1 /sys/kernel/debug/tracing/events/*/*/id |
  cut -f8 -d/ | egrep -v 'sys_(enter|exit)' |
  while read tp
do
  stap -L 'kernel.trace("'$tp'")' || echo no $tp
done

reports no "no"s.  Note that syscall tracepoints are treated specially
in the kernel; stap sees only a single sys_enter / sys_exit pair, thus
the egrep -v above.

* session.h (kernel_source_tree): New field.
* buildrun.cxx (compile_pass, make_tracequery): Add EXTRA_CFLAGS += -I....
  (make_tracequery): Squish repeated TRACE_INCLUDE_PATH defines.
* tapsets.cxx (tracepoint_derived_probe ctor): Relax conventions
  on tracepoint header file name.
  (tracepoint_extra_headers): Renamed to ...
  (tracepoint_extra_decls): New function.  Include struct/type forward
  decls as needed.
  (emit_module_decls): Use new decl list style.
  (tracepoint_builder::init_dw): Search kernel source tree also for
  tracepoint headers.

14 years agoDefine srcdir as global in start_server systemtap.exp testsuite helper.
Mark Wielaard [Wed, 20 Oct 2010 12:39:58 +0000 (14:39 +0200)]
Define srcdir as global in start_server systemtap.exp testsuite helper.

* testsuite/lib/systemtap.exp (start_server): Define srcdir as global
  before usage.

14 years agoDon't unnecessarily add extra $test.exe files to /tmp.
Mark Wielaard [Wed, 20 Oct 2010 10:59:20 +0000 (12:59 +0200)]
Don't unnecessarily add extra $test.exe files to /tmp.

* testsuite/systemtap.base/implicitptr.exp: Don't cp $test.exe to /tmp.

14 years agoPR12121: distinguish struct/typedef homonyms
Josh Stone [Tue, 19 Oct 2010 19:20:24 +0000 (12:20 -0700)]
PR12121: distinguish struct/typedef homonyms

For example:
  typedef struct foo foo;
  foo x;

This kind of "repeated" typedef used to cause bad things for us if the
struct definition is not in the current CU.  When resolving $x->bar, we
start at the typedef-foo and dereference to the struct-foo.  That's just
a declaration, so we use declaration_resolve to look for the struct
definition.  But since we were looking by the name "foo" only, we would
find the typedef again, getting us nowhere.

The fixed code does declaration_resolve on "struct foo" in the global cache,
so in this case we won't find anything locally, and thus we continue looking
in other CUs.  If the definition isn't found elsewhere, we're stuck anyway.

* dwflpp.cxx (dwflpp::global_alias_caching_callback): Cache type names
  with a relevant prefix: struct, union, etc.  Classes are normalized to
  be "struct" too, as that's a very blurry line.
  (dwflpp::declaration_resolve(die)): New variant to resolve a specific
  die -- used so we know what exact prefix we should look for.
* parse.cxx (parser::parse_target_symbol): Don't strip the prefix from
  @cast types anymore, so the user can be precise about what they want.
* tapsets.cxx (dwarf_cast_query::handle_query_module): Normalize "class"
  to "struct".  If the user provides a bare name that fails to resolve,
  then try it again with the various prefixes.
* testsuite/systemtap.base/unresolved-struct-typedef.*: New test.

14 years agoTwo documentation fixes from previous commits
Lukas Berk [Mon, 18 Oct 2010 20:23:11 +0000 (16:23 -0400)]
Two documentation fixes from previous commits

14 years agoPR 11442: Tests for adding/revoking trust as a module signer.
Dave Brolley [Mon, 18 Oct 2010 16:17:55 +0000 (12:17 -0400)]
PR 11442: Tests for adding/revoking trust as a module signer.

These tests alter the state of the trusted signer database which is
in the install tree, and thus should not be run when the test suite
is invoked as root. The related tests which depend on these tests
are still run, but are marked as XFAIL in this situation.

14 years agoMention TASK_FINDER_VMA_ENTRY_ITEMS if stap_add_vma_map_info returns -ENOMEM.
Mark Wielaard [Sun, 17 Oct 2010 21:22:04 +0000 (23:22 +0200)]
Mention TASK_FINDER_VMA_ENTRY_ITEMS if stap_add_vma_map_info returns -ENOMEM.

Suggested by jan.kratochvil@redhat.com, rhbz#643109.

* runtime/vma.c (_stp_vma_mmap_cb): Add -DTASK_FINDER_VMA_ENTRY_ITEMS to
  warning message.

14 years agoDocument TASK_FINDER_VMA_ENTRY_ITEMS in stap man page.
Mark Wielaard [Sun, 17 Oct 2010 21:06:15 +0000 (23:06 +0200)]
Document TASK_FINDER_VMA_ENTRY_ITEMS in stap man page.

Suggested by fche@redhat.com. rhbz#643109.

* stap.1 (SAFETY AND SECURITY): Document TASK_FINDER_VMA_ENTRY_ITEMS.

14 years agoPR12124 Emit warnings for bad unwind data encountered at runtime.
Mark Wielaard [Sun, 17 Oct 2010 20:51:28 +0000 (22:51 +0200)]
PR12124 Emit warnings for bad unwind data encountered at runtime.

* runtime/unwind.c: Turn dbug_unwind into _stp_warn when they indicate
  bad unwind data in binary.

14 years agoAdd note to ubacktrace* context functions about -d and --ldd stap switches.
Mark Wielaard [Sun, 17 Oct 2010 18:59:12 +0000 (20:59 +0200)]
Add note to ubacktrace* context functions about -d and --ldd stap switches.

rhbz#643109 Suggested by jan.kratochvil@redhat.com.

* tapset/ucontext-unwind.stp (print_ubacktrace, sprint_ubacktrace,
  print_ubacktrace_brief, ubacktrace): Add comment note about -d and --ldd.

14 years agopr11564 use the --with-rpm flag to detect a missing or wrong version kernel-devel...
Lukas Berk [Thu, 14 Oct 2010 21:17:09 +0000 (17:17 -0400)]
pr11564 use the --with-rpm flag to detect a missing or wrong version kernel-devel package in addition to the kernel-debuginfo.

14 years agopr 11554 further documentation to the SYSTEMTAP_DEBUGINFO_PATH; where it looks for...
Lukas Berk [Thu, 14 Oct 2010 21:07:28 +0000 (17:07 -0400)]
pr 11554 further documentation to the SYSTEMTAP_DEBUGINFO_PATH; where it looks for vmlinux, how to set it, and more information about debuginfo for user-space applications.

14 years agoPR 11922: Still need to resolve host names discovered using avahi.
Dave Brolley [Wed, 13 Oct 2010 20:17:00 +0000 (16:17 -0400)]
PR 11922: Still need to resolve host names discovered using avahi.

SSL requires that the client's connection be set up with an expected DNS name
which must match one of the names on the server's certificate. This is
the only protection from 'man in the middle' attacks. The server generates
it certificate to contain its own host name. <name>.local as returned by
avahi must be resolved in attaempt to match what's on the certificate.

14 years agoTranslate transmission/reception of the expected package size to/from network byte...
Dave Brolley [Wed, 13 Oct 2010 20:15:58 +0000 (16:15 -0400)]
Translate transmission/reception of the expected package size to/from network byte order.

14 years agoPR 11922: Allow specification of alternate DNS names on the generated certificate.
Dave Brolley [Wed, 13 Oct 2010 20:14:40 +0000 (16:14 -0400)]
PR 11922: Allow specification of alternate DNS names on the generated certificate.

14 years agoMake sure the 'module_name' variable is instantiated in all paths.
Dave Brolley [Wed, 13 Oct 2010 20:13:03 +0000 (16:13 -0400)]
Make sure the 'module_name' variable is instantiated in all paths.

14 years agoimprove error message for startup-time global-var allocation failure
Adrien Kunysz [Wed, 13 Oct 2010 15:27:02 +0000 (11:27 -0400)]
improve error message for startup-time global-var allocation failure

14 years agoEnsure that stap compiles when NSS is not available.
Dave Brolley [Wed, 13 Oct 2010 15:22:17 +0000 (11:22 -0400)]
Ensure that stap compiles when NSS is not available.

14 years agoPR 11898: complete CFI expression support
Roland McGrath [Thu, 7 Oct 2010 23:35:08 +0000 (16:35 -0700)]
PR 11898: complete CFI expression support

Finish support for DWARF expressions in CFI.

14 years agoPR 11898 (partial): skeleton CFI expression support
Roland McGrath [Thu, 7 Oct 2010 20:26:52 +0000 (13:26 -0700)]
PR 11898 (partial): skeleton CFI expression support

Basic decoding and storage of DW_CFA_*expression rules.
The actual expression evaluation support is still missing.

14 years agobuild fix: gcc 3.4 on ia64 vs gcc PR21838
Frank Ch. Eigler [Thu, 7 Oct 2010 20:09:12 +0000 (16:09 -0400)]
build fix: gcc 3.4 on ia64 vs gcc PR21838

* runtime/runtime.h (__ia64_save_stack_nonlocal): New dummy fn.

14 years agoDocument sdt asm operand syntax.
Stan Cox [Thu, 7 Oct 2010 20:07:40 +0000 (16:07 -0400)]
Document sdt asm operand syntax.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):

14 years agoSupport s390 sdt asm arguments.
Stan Cox [Thu, 7 Oct 2010 02:44:55 +0000 (22:44 -0400)]
Support s390 sdt asm arguments.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor): Add EM_S390 registers.

14 years agoNew test suite for the integrated compile-server client.
Dave Brolley [Tue, 5 Oct 2010 18:28:05 +0000 (14:28 -0400)]
New test suite for the integrated compile-server client.

14 years agoMiscellaneous improvements.
Dave Brolley [Tue, 5 Oct 2010 18:25:20 +0000 (14:25 -0400)]
Miscellaneous improvements.

- break out starting of a server into start_server to be used by
  setup_server and elsewhere.
- call cleanup before exiting if smoke tests fail.
- cleanup *.sgn files.

14 years agoAdd 'no-prompt' to the --trust-servers option to bypass prompting the user for confir...
Dave Brolley [Tue, 5 Oct 2010 18:24:13 +0000 (14:24 -0400)]
Add 'no-prompt' to the --trust-servers option to bypass prompting the user for confirmation.

14 years agoCorrect use of setup_kfail vs setup_xfail.
Dave Brolley [Tue, 5 Oct 2010 18:19:43 +0000 (14:19 -0400)]
Correct use of setup_kfail vs setup_xfail.

14 years agoPR 11922: Restrict compile-server client attempts to resolve server hosts.
Dave Brolley [Mon, 27 Sep 2010 16:03:39 +0000 (12:03 -0400)]
PR 11922: Restrict compile-server client attempts to resolve server hosts.

Most times we can get the proper host name/ip address from avahi or from
certificates in our databases. Only attempt to resolve hosts for servers
specified directly using --use-server.

14 years agoAdd guard for unsupported sdt architectures.
Stan Cox [Wed, 6 Oct 2010 14:27:34 +0000 (10:27 -0400)]
Add guard for unsupported sdt architectures.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
Guard against parsing asm probe arguments for unsupported architectures.

14 years agoRun clone/fork/vfork tests with and without semaphores.
David Smith [Tue, 5 Oct 2010 21:52:30 +0000 (16:52 -0500)]
Run clone/fork/vfork tests with and without semaphores.

* testsuite/systemtap.clone/dtrace_clone.exp: Run the test twice - once
  without semaphores, once with semaphores.
* testsuite/systemtap.clone/dtrace_fork_exec.exp: Ditto.
* testsuite/systemtap.clone/dtrace_vfork_exec.exp: Ditto.
* testsuite/systemtap.clone/test_progs.tcl: Automatically run "make clean"
  when needed.  Allow callers to specify extra CFLAGS values.
* testsuite/systemtap.clone/dtrace_child.c: Allow semaphores to be
  ifdef'ed out.
* testsuite/systemtap.clone/dtrace_clone.c: Ditto.
* testsuite/systemtap.clone/dtrace_fork_parent.c: Ditto.
* testsuite/systemtap.clone/dtrace_vfork_parent.c: Ditto.
* testsuite/systemtap.clone/Makefile.fork_exec: Removed unused define.
* testsuite/systemtap.clone/Makefile.vfork_exec: Ditto.

14 years agoIn the syscall.*utime probes, get values directly.
David Smith [Tue, 5 Oct 2010 21:07:31 +0000 (16:07 -0500)]
In the syscall.*utime probes, get values directly.

* tapset/syscalls2.stp (syscall.utime): Instead of calling a function to
  get actime/modtime, use user_long() to get the value.
  (syscall.compat_utime): Ditto.

14 years agoPR11739: Add an STP_ALIBI flag
Josh Stone [Tue, 5 Oct 2010 00:56:26 +0000 (17:56 -0700)]
PR11739: Add an STP_ALIBI flag

Primarily just for testing purposes, define STP_ALIBI to shortcut all
probe handlers, so they're nothing but an atomic_inc.  It prints a hit
report similar to STP_TIMING at the end.

Note that any logic that would have called exit() will also be blocked,
so you need other ways to end the script: SIGINT, finished -c, etc.

* tapsets.cxx (common_probe_entryfn_prologue): #ifdef STP_ALIBI, reduce
  the probe handler to just an atomic_inc().
  (common_probe_entryfn_epilogue): Close the #ifdef from above.
* translate.cxx (translate_pass): Add an atomic_t to stap_probe for
  STP_ALIBI to track probe hits.
  (c_unparser::emit_module_exit): Print alibi hit-report.

14 years agoAdded dtrace testcases for clone, fork/exec, and vfork/exec.
David Smith [Mon, 4 Oct 2010 20:48:18 +0000 (15:48 -0500)]
Added dtrace testcases for clone, fork/exec, and vfork/exec.

* testsuite/systemtap.clone/Makefile.clone: New file.
* testsuite/systemtap.clone/Makefile.fork_exec: Ditto.
* testsuite/systemtap.clone/Makefile.vfork_exec: Ditto.
* testsuite/systemtap.clone/dtrace_child.c: Ditto.
* testsuite/systemtap.clone/dtrace_child_probes.d: Ditto.
* testsuite/systemtap.clone/dtrace_clone.c: Ditto.
* testsuite/systemtap.clone/dtrace_clone.exp: Ditto.
* testsuite/systemtap.clone/dtrace_clone.stp: Ditto.
* testsuite/systemtap.clone/dtrace_clone_probes.d: Ditto.
* testsuite/systemtap.clone/dtrace_fork_exec.exp: Ditto.
* testsuite/systemtap.clone/dtrace_fork_exec.stp: Ditto.
* testsuite/systemtap.clone/dtrace_fork_parent.c: Ditto.
* testsuite/systemtap.clone/dtrace_fork_parent_probes.d: Ditto.
* testsuite/systemtap.clone/dtrace_vfork_exec.exp: Ditto.
* testsuite/systemtap.clone/dtrace_vfork_exec.stp: Ditto.
* testsuite/systemtap.clone/dtrace_vfork_parent.c: Ditto.
* testsuite/systemtap.clone/dtrace_vfork_parent_probes.d: Ditto.
* testsuite/systemtap.clone/test_progs.tcl: Ditto.

14 years agoFixed BZ634242 for older kernels.
David Smith [Mon, 4 Oct 2010 20:46:38 +0000 (15:46 -0500)]
Fixed BZ634242 for older kernels.

* runtime/uprobes/uprobes.c (uprobe_report_clone): If two processes are
  are sharing the same memory space (CLONE_VM) don't remove probes, since
  that will remove the probes from both processes.

14 years agoPR12081: Name procfs buffers based on a local index
Josh Stone [Mon, 4 Oct 2010 19:26:30 +0000 (12:26 -0700)]
PR12081: Name procfs buffers based on a local index

We shouldn't use probe->name for the buffers, as that name is not
necessarily unique after our probe de-duplication efforts.  Instead, we
can use a simple index variable to get a unique name for each procfs probe.

* tapset-procfs.cxx (procfs_derived_probe_group::emit_module_decls):
  Declare and use the buffers with a name based on a simple index.

14 years agoUpdated syscall coverage script.
David Smith [Mon, 4 Oct 2010 15:53:17 +0000 (10:53 -0500)]
Updated syscall coverage script.

* testsuite/systemtap.syscall/coverage.tcl: Updated.

14 years agoSmall kprobes_test updates.
David Smith [Mon, 4 Oct 2010 15:45:36 +0000 (10:45 -0500)]
Small kprobes_test updates.

* scripts/kprobes_test/run_module.py: Improved waiting on spawned load
  commands.  Makes 30 attempts to find output (instead of trying
  forever).
* scripts/kprobes_test/.gitignore: Ignore 'Module.markers' file and config
  files.
* scripts/kprobes_test/kprobes_test.py: Minor update.

14 years agoMake syscall.mmap32 provide same convenience variables as syscall.mmap.
David Smith [Mon, 4 Oct 2010 15:35:11 +0000 (10:35 -0500)]
Make syscall.mmap32 provide same convenience variables as syscall.mmap.

* tapset/x86_64/syscalls.stp (syscall.mmap32): Provides same convenience
  variables as syscall.mmap.
* testsuite/buildok/syscalls-arch-detailed.stp: Updated test.

14 years agoReplace kretprobe->entry_ph with a full stap_probe
Josh Stone [Fri, 1 Oct 2010 23:41:19 +0000 (16:41 -0700)]
Replace kretprobe->entry_ph with a full stap_probe

This ensures that pp, pn, and STP_TIMING can be kept distinct for entry
handlers vs. their normal kretprobe handlers.

* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Replace
  entry_ph with entry_probe, pointing to the global stap_probes[], and
  update all references.

14 years agoCentralize stap_probe, and make STP_TIMING data-driven
Josh Stone [Fri, 1 Oct 2010 22:47:45 +0000 (15:47 -0700)]
Centralize stap_probe, and make STP_TIMING data-driven

With the move to per-probe_point STP_TIMING statistics, the design which
wrote a separate code block for every Stat suddenly ran into scalability
issues.  We should instead be using a data-driven loop for this.

So, the scattered stap_probe structs are now pulled together in one
global, stap_probes[].  This contains the usual suspects: ph, pp, and pn;
it also keeps the extras that STP_TIMING needs: a Stat, the script
location, and the derivation record.

* translate.cxx (translate_pass): Add the STP_TIMING data to stap_probe,
  and output the global stap_probes[] with everything.
  (c_unparser::emit_module_init): Iterate the timing init at runtime.
  (c_unparser::emit_module_exit): Iterate the timing output at runtime.
* tapsets.cxx (common_probe_init): Just return the right global stap_probe*
* tapset*.cxx, runtime/*: Make pointers of all stap_probe's, and make
  the s/\./->/ change where needed too.
* elaborate.cxx (derived_probe::derived_locations): New, gives a string
  reporting the derivation steps which reached this probe point.

14 years agoFixed BZ634242 by always looking up pids in the global namespace.
David Smith [Fri, 1 Oct 2010 17:56:54 +0000 (12:56 -0500)]
Fixed BZ634242 by always looking up pids in the global namespace.

* runtime/uprobes2/uprobes.c (uprobe_get_tg_leader): Always look up the
  pid in the global pid namespace.  From Roland McGrath
  <roland@redhat.com>
  (uprobe_fork_uproc): Ditto.  From Roland McGrath <roland@redhat.com>
  (uprobe_report_clone): If two processes are are sharing the same memory
  space (CLONE_VM) don't remove probes, since that will remove the probes
  from both processes.
* tapsets.cxx (emit_module_exit): Make sure we always look up pids
  in the global pid namespace, not in any private pid namespace.
* runtime/uprobes-common.c (stap_uprobe_change_plus): Ignore EEXIST
  errors.

14 years agoEscape backslash to push through tcl.
Stan Cox [Fri, 1 Oct 2010 01:43:47 +0000 (21:43 -0400)]
Escape backslash to push through tcl.

xulrunner.exp (run_tests):  Escape backslashes.

14 years agoPR10812: activate build-id relocation code only for module("...")
Frank Ch. Eigler [Fri, 1 Oct 2010 01:45:14 +0000 (21:45 -0400)]
PR10812: activate build-id relocation code only for module("...")

The relocation-basis can be null or something else for
user-space executables etc.

* translate.cxx (dump_unwindsyms): Skip build-id relocation for
  modname /FOO.

14 years agoImprove the derivation output of STP_TIMING
Josh Stone [Wed, 29 Sep 2010 20:51:30 +0000 (13:51 -0700)]
Improve the derivation output of STP_TIMING

We can't assume location[0] from the probes in the derivation chain, as
it may include e.g. an alias with multiple expansions.  Instead, a new
"base_pp" member tracks which probe_point actually led to each step of
the derivation.

* elaborate.cxx (derived_probe::derived_probe): Remember the unmodified
  probe_point as base_pp, esp. before any components are rewritten.
  (derived_probe::collect_derivation_pp_chain): New, collect base_pp.
* translate.cxx (c_unparser::emit_module_exit): Use the pp chain in
  STP_TIMING output.

14 years agoStandardize how derived_probes dupe their location
Josh Stone [Wed, 29 Sep 2010 20:36:51 +0000 (13:36 -0700)]
Standardize how derived_probes dupe their location

A few of the derived_probe subclasses make duplicates of their
probe_point so they can rewrite it to something more specific.  This
patch standardizes that behavior.

It also fixes kprobe_derived_probe and hwbkpt_derived_probe, which were
rewriting components without making a copy first.

14 years agoRemove the derived_probe ctor lacking a probe_point
Josh Stone [Wed, 29 Sep 2010 19:45:40 +0000 (12:45 -0700)]
Remove the derived_probe ctor lacking a probe_point

In practice, our derived_probes always have a specific probe_point that
they originate from, so don't let it be omitted.

14 years agoBump xulrunner.exp to 1.9.2rc1
Stan Cox [Wed, 29 Sep 2010 19:13:50 +0000 (15:13 -0400)]
Bump xulrunner.exp to 1.9.2rc1

xulrunner.exp: Push xulrelease to 1.9.2rc1.  Change to new xulrunner javascript
testing harness.

14 years agoPR10812: undo +20 build-id address offsetting
Frank Ch. Eigler [Wed, 29 Sep 2010 16:53:37 +0000 (12:53 -0400)]
PR10812: undo +20 build-id address offsetting

With the new relocation code, this does occasionally cause addresses
to spill over into the next section, leading to unexpected relocation
bases.

* runtime/sym.c (_stp_module_check): Remove the build_id_len
  subtraction.  Provide diagnostics on unexpected addresses/names.
* translate.cxx (dump_unwindsyms): Likewise.

14 years agoPR10812: relocate module build-id
Tony Jones [Wed, 29 Sep 2010 16:47:52 +0000 (12:47 -0400)]
PR10812: relocate module build-id

Relocate the build_id_vaddr obtained from dwfl_module_build_id.  Failure to
do this was causing ppc64 systems to fail the build-id check for cases such as:

probe module("libata").function("*").call {
  printf ("%s\n", probefunc())
}

Signed-off-by: Tony Jones <tonyj@suse.de>
14 years agoAllow de-duping in spite of STP_TIMING
Josh Stone [Tue, 28 Sep 2010 21:41:37 +0000 (14:41 -0700)]
Allow de-duping in spite of STP_TIMING

To enable this, we can use a Stat pointer in the same place we keep the
individual pp data, so now even when the probe body is shared, separate
timing data is kept.

* elaborate.h (derived_probe): Add a "real" name which is unchanging,
  unlike the regular name that may face de-duping.
* tapsets.cxx (common_probe_init): Use the "real" name for timing data.
  (common_probe_entryfn_prologue): Use a local stat instead of
  CONTEXT->statp, and initialize it from the probe data.
  (common_probe_entryfn_epilogue): Also use the local stat.
* translate.cxx (c_unparser::emit_common_header): Remove statp, and
  don't use any timing anti-dupe.
  (c_unparser::emit_module_init): Timing globals are now based on the
  "real" probe names.
  (c_unparser::emit_module_exit): Ditto.
  (c_unparser::emit_probe): No more timing anti-dupe.
  (translate_pass): Declare the new global timing struct, and point to
  it accordingly in STAP_PROBE_INIT.

14 years agoSimplify the '?' removal for STP_TIMING
Josh Stone [Fri, 24 Sep 2010 22:16:36 +0000 (15:16 -0700)]
Simplify the '?' removal for STP_TIMING

Add a new flag to probe_point::print() so the extra details can be
avoided.  This skips '?', '!', and any conditionals as well.

* staptree.cxx (probe_point::print): Make the extras optional.
  (probe_point::str): Pass along the choice of extras.
* translate.cxx (c_unparser::emit_module_exit): Let the print routine
  skip the extra flags, rather than trying to strip them out manually.

14 years agoSTP_TIMING indent/whitespace cleanup
Josh Stone [Fri, 24 Sep 2010 21:54:54 +0000 (14:54 -0700)]
STP_TIMING indent/whitespace cleanup

14 years agoFix SDTv2 with separate debuginfo
Josh Stone [Tue, 28 Sep 2010 22:41:52 +0000 (15:41 -0700)]
Fix SDTv2 with separate debuginfo

We had a case where the ".probes" section was found in the main binary,
but then sdt_query::init_probe_scn got its Elf* by looking first via the
debuginfo and then falling back to the executable.  So when we got the
raw data pointer, it was using the wrong Elf* for that section.

This fix is to let dwflpp::get_section return the Elf* in which it found
the appropriate section, so init_probe_scn doesn't have to guess.

* dwflpp.cxx (dwflpp::get_section): Add an optional Elf** return
  pointer, and fill it in if needed.
* tapsets.cxx (sdt_query::init_probe_scn): Use that Elf* for the section.

14 years agoTest probe performance with taskset.
Stan Cox [Tue, 28 Sep 2010 13:48:57 +0000 (09:48 -0400)]
Test probe performance with taskset.

scripts/probe_perf/bench.sh (stap_test): Run stap with taskset.

14 years agoAdd v3 sdt.h awareness to scripts/probe_perf.
Stan Cox [Mon, 27 Sep 2010 19:26:53 +0000 (15:26 -0400)]
Add v3 sdt.h awareness to scripts/probe_perf.

* scripts/probe_perf/bench.sh (stap_test): Use testsuite/sdt.h so we
can build for any of v1, v2, v3.
(main): Add -testsrcdir for pointing to testsuite/sdt.h.

14 years agoStandardize v3 sdt.h arg template.
Stan Cox [Fri, 24 Sep 2010 19:28:21 +0000 (15:28 -0400)]
Standardize v3 sdt.h arg template.

* sdt.h (_SDT_ARGFMT): Us %n for arg template for all archs.

14 years agoAdd description for latencytap.stp
William Cohen [Fri, 24 Sep 2010 15:36:45 +0000 (11:36 -0400)]
Add description for latencytap.stp

14 years agoia64 v3 sdt.h interoperability.
Stan Cox [Thu, 23 Sep 2010 18:58:50 +0000 (14:58 -0400)]
ia64 v3 sdt.h interoperability.

* sdt.h (_SDT_ARGTMPL)(_SDT_COEF) New.  Parameterize for ia64.x
(_SDT_ARGFMT)(_SDT_ARG): Use it.

14 years agowhitespace tweak
Frank Ch. Eigler [Wed, 22 Sep 2010 17:04:29 +0000 (13:04 -0400)]
whitespace tweak

14 years agoreleng: rough-in support for linking with GOLD
Frank Ch. Eigler [Wed, 22 Sep 2010 17:03:34 +0000 (13:03 -0400)]
releng: rough-in support for linking with GOLD

14 years agoPower/x86 v3 sdt.h interoperability.
Stan Cox [Wed, 22 Sep 2010 12:26:58 +0000 (08:26 -0400)]
Power/x86 v3 sdt.h interoperability.

* sdt.h (_SDT_ARGFMT):  Revert back to %c as we just want operand length.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor:visit_target_symbol):
Use elf_machine instead of section to decide which regnames to use.

14 years agoDisambiguate asm operand parsing for v3 sdt.h
Stan Cox [Wed, 22 Sep 2010 02:24:51 +0000 (22:24 -0400)]
Disambiguate asm operand parsing for v3 sdt.h

* tapsets.cxx (sdt_uprobe_var_expanding_visitor):  Add probe_loc.
(sdt_uprobe_var_expanding_visitor::visit_target_symbol):
Support i as literal prefix so register names are unambiguous.

* sdt_misc.exp (pbype_mssgs): Reorder

14 years agoFix rhel4 build problem.
Stan Cox [Tue, 21 Sep 2010 21:16:19 +0000 (17:16 -0400)]
Fix rhel4 build problem.

* dwflpp.cxx (iterate_over_notes): Typecast when assigning base.

14 years agoPR11736 modified the -t option to display information based on
Lukas Berk [Tue, 21 Sep 2010 20:43:13 +0000 (16:43 -0400)]
PR11736 modified the -t option to display information based on
probe points.  This change also displays the derivation for each
probe point.

14 years agoPR12035 - staprun fails to build on ia64
William Cohen [Tue, 21 Sep 2010 19:50:30 +0000 (15:50 -0400)]
PR12035 - staprun fails to build on ia64

The _SDT_ARGFMT and _SDT_ARG macros are adjusted to work around the ia64
compiler on RHEL-5. The ia64 gcc is not able to handle %c in the asm statement.
The ia64 and s390 also require an argument for the assembly language
nop instruction.

14 years agoReduce uniq_list to a single pass
Josh Stone [Fri, 17 Sep 2010 20:47:01 +0000 (13:47 -0700)]
Reduce uniq_list to a single pass

14 years agoRemove systemtap_session::printscript
Josh Stone [Fri, 17 Sep 2010 18:40:26 +0000 (11:40 -0700)]
Remove systemtap_session::printscript

It's a duplicate of main.cxx:printscript.

14 years agoAdditional causes for latencytap.stp
William Cohen [Thu, 16 Sep 2010 21:36:21 +0000 (17:36 -0400)]
Additional causes for latencytap.stp

Found that newer kernels may have some different backtraces for processes
being deactivated. Added some texts for those additional backtraces.

14 years agoLet runtime/staprun find sdt-config.h.
Stan Cox [Thu, 16 Sep 2010 21:15:48 +0000 (17:15 -0400)]
Let runtime/staprun find sdt-config.h.

* runtime/staprun/Makefile.am (AM_CPPFLAGS): Add $(builddir)/../../includes/sys

14 years agoHandle finding includes with -isystem.
Stan Cox [Tue, 7 Sep 2010 20:26:07 +0000 (16:26 -0400)]
Handle finding includes with -isystem.

* lib/systemtap.exp (sd_includes):  Use -isystem instead of -I.
* sdt_misc.exp (v_flags): Tag the V2 run.

14 years agoAdd translator support for version 3 sdt.h
Stan Cox [Fri, 3 Sep 2010 20:17:38 +0000 (16:17 -0400)]
Add translator support for version 3 sdt.h

* dwflpp.c (iterate_over_notes): New.
(get_section): New.

* sdt.h (_SDT_SEMAPHORE): New.
(_SDT_ASM_BODY): Use it.

* sdt-compat.h (stap_sdt_probe_type): Add uprobe3_type.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
Support <precision>@
(struct sdt_query): Add base, have_debuginfo_uprobe, have_debuginfoless_uprobe.
(handle_probe_entry): Pieces moved from ...
(handle_query_module): Handle STAP_SDT_Ǚ.
(setup_note_probe_entry_callback): New.
(setup_note_probe_entry): New.
(iterate_over_probe_entries): New.

* systemtap.exp: Tweak it.

* sdt_misc.exp (vflags): Add -DSTAP_SDT_V3

14 years agoClean up test compilations using sys/sdt.h, test new and old variants
Roland McGrath [Wed, 18 Aug 2010 08:39:45 +0000 (01:39 -0700)]
Clean up test compilations using sys/sdt.h, test new and old variants

* testsuite/sys/sdt.h: New file.
* testsuite/lib/systemtap.exp (sdt_includes): New function.
* testsuite/systemtap.base/const_value.exp: Use [sdt_includes].
* testsuite/systemtap.base/cxxclass.exp: Likewise.
* testsuite/systemtap.base/vta-test.exp: Likewise.
* testsuite/systemtap.exelib/exelib.exp: Likewise.
* testsuite/systemtap.base/sdt.exp: Likewise.
Test new version plus sdt-compat.h v1 and v2 variants.
* testsuite/systemtap.base/sdt_misc.exp: Likewise.

14 years agoMake sdt-compat.h play nice with new sys/sdt.h
Roland McGrath [Wed, 18 Aug 2010 08:35:40 +0000 (01:35 -0700)]
Make sdt-compat.h play nice with new sys/sdt.h

* sdt-compat.h: Change multiple inclusion protection to _SDT_COMPAT_H.
Omit probe macros if _SYS_SDT_H is defined.
* tapsets.cxx: Include "sys/sdt.h" before "sdt-compat.h".

14 years agoReplace <sys/sdt.h> macros with new ones generating notes, usable in asm
Roland McGrath [Wed, 18 Aug 2010 06:57:49 +0000 (23:57 -0700)]
Replace <sys/sdt.h> macros with new ones generating notes, usable in asm

* includes/sys/sdt.h: Rewritten.
* Makefile.am (oldinclude_HEADERS): Add includes/sys/sdt-config.h here.
(AM_CPPFLAGS): Add -I to find the built file.
* systemtap.spec (%files sdt-devel): Likewise.
* Makefile.in: Regenerated.
* util.h: Include <cerrno> here.

14 years agoMove old sys/sdt.h to sdt-compat.h for translator use
Roland McGrath [Wed, 18 Aug 2010 06:49:01 +0000 (23:49 -0700)]
Move old sys/sdt.h to sdt-compat.h for translator use

* includes/sys/sdt.h: File renamed to ...
* sdt-compat.h: ... here.
* Makefile.am (noinst_HEADERS): New variable, add it.
* tapset.cxx: Include "sdt-compat.h" instead of "sys/sdt.h".

14 years agoAdd configury for using .section "?" in sdt.h
Roland McGrath [Tue, 17 Aug 2010 20:25:45 +0000 (13:25 -0700)]
Add configury for using .section "?" in sdt.h

* includes/sys/sdt-config.h.in: New file.
* configure.ac: Check for assembler support of .section name,"?".
* configure: Regenerated.
* Makefile.in: Regenerated.

14 years agoCorrect recent change for finding the server cert database in stap-sign-module.
Dave Brolley [Thu, 16 Sep 2010 19:14:52 +0000 (15:14 -0400)]
Correct recent change for finding the server cert database in stap-sign-module.

14 years agoHandle missing and empty client side certificate databases.
Dave Brolley [Thu, 16 Sep 2010 18:28:31 +0000 (14:28 -0400)]
Handle missing and empty client side certificate databases.

14 years agoreleng: make build-compatible with old elfutils
Frank Ch. Eigler [Thu, 16 Sep 2010 16:06:21 +0000 (12:06 -0400)]
releng: make build-compatible with old elfutils

* loc2c.c (DW_AT_data_bit_offset): #define for old elfutils.

14 years agoAllow STAP_USER to be set in the calling environment.
Dave Brolley [Wed, 15 Sep 2010 16:40:14 +0000 (12:40 -0400)]
Allow STAP_USER to be set in the calling environment.

14 years agoSuppress stdout output of stap-authorize-cert.
Dave Brolley [Wed, 15 Sep 2010 16:17:41 +0000 (12:17 -0400)]
Suppress stdout output of stap-authorize-cert.

14 years agoCorrect location of stap-gen-cert.
Dave Brolley [Tue, 14 Sep 2010 18:50:17 +0000 (14:50 -0400)]
Correct location of stap-gen-cert.

14 years agoPR11442 - Running tests installed by systemtap-testsuite rpm as root.
Dave Brolley [Tue, 14 Sep 2010 18:02:03 +0000 (14:02 -0400)]
PR11442 - Running tests installed by systemtap-testsuite rpm as root.

SSL server certificates are now generated into $SYSTEMTAP_DIR or $HOME/.systemtap
for all users, even root.

14 years agoGuard location_from_attr declaration and function with elfutils 0.149 check.
Mark Wielaard [Thu, 16 Sep 2010 15:12:48 +0000 (17:12 +0200)]
Guard location_from_attr declaration and function with elfutils 0.149 check.

location_from_attr is only used when an implicit pointer is found
and systemtap is compiled against elfutils 0.149 .

* loc2c.c (location_from_attr): Guard with elfutils version check.

14 years agoTest case for DW_OP_GNU_implicit_pointer support
Roland McGrath [Wed, 18 Aug 2010 22:37:22 +0000 (15:37 -0700)]
Test case for DW_OP_GNU_implicit_pointer support

* testsuite/systemtap.base/implicitptr.c: New file.
* testsuite/systemtap.base/implicitptr.stp: New file.
* testsuite/systemtap.base/implicitptr.exp: New file.

14 years agoloc2c internal reorganization and DW_OP_GNU_implicit_pointer handling
Roland McGrath [Tue, 27 Jul 2010 11:55:48 +0000 (04:55 -0700)]
loc2c internal reorganization and DW_OP_GNU_implicit_pointer handling

* loc2c.c (struct location_context): New type.
(struct location): New member context points to that.
Add pointer variant with .type = loc_implicit_pointer.
(alloc_location): Take just context pointer as argument.
(FAIL): Use context pointer.
(new_context): New function.
(translate_constant): New function, broken out of ...
(c_translate_constant): ... here.  Call it.
(new_synthetic_loc): Don't take pool argument, origin->context has it.
(lose): Take new argument LEN, overall length of LEXPR.
Don't mention the offset into LEXPR if LEXPR is NULL or I is past LEN.
(translate): Take context argument instead of pool, addrbias.
Handle DW_OP_GNU_implicit_pointer.
(location_from_address): Take context argument instead of pool, fail,
fail_arg, emit_address, dwbias, attr, address, fb_attr, cfa_ops.
(location_from_attr): New function.
(translate_offset): New function, broken out of ...
(location_relative): ... here.  Call it.
Take context argument instead of pool, dwbias, attr, address.
(c_translate_location): Use new_context.
(c_translate_argument): Likewise.
(emit_base_fetch): Diagnose for loc_implicit_pointer.
(emit_base_store): Likewise.
(c_translate_addressof, c_translate_array): Likewise.
(discontiguify): Likewise.  Take context argument instead of pool.
(c_translate_pointer): Handle loc_implicit_pointer.
(c_translate_array_pointer): Likewise.
(c_emit_location): Likewise.

14 years agoImproved latencytap.stp
William Cohen [Wed, 15 Sep 2010 19:57:53 +0000 (15:57 -0400)]
Improved latencytap.stp

This version of latencytap.stp has the following improvements:

-Print out the data sorted on the total time waiting for each cause
-Have a debug flag to print out stack backtraces when there is no cause listed.
 This is enabled by compiling latencytap to a module and then using:
    staprun latentap.ko debug=1

14 years agoUse decimal output for automatic printing of global aggregates
William Cohen [Tue, 14 Sep 2010 21:39:55 +0000 (17:39 -0400)]
Use decimal output for automatic printing of global aggregates

Previously, the automatic printing of global aggregates was hexidecimal.
Most people find it more convenient to look at this information in decimal
form. Thus, the output is now decimal based. If one really needs or wants
the old behavior a --compatible=1.3 option can be added to the command line.

14 years agoAdd translator support for the forthcoming v3 sdt.h.
Stan Cox [Tue, 14 Sep 2010 16:22:54 +0000 (12:22 -0400)]
Add translator support for the forthcoming v3 sdt.h.

* sdt.h (stap_sdt_probe_type): Add uprobe3_type.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
Support <precision>@
(struct sdt_query): Add base, have_debuginfo_uprobe, have_debuginfoless_uprobe.
(handle_query_module): Handle v3 sdt.h which has probes in note sections.
(setup_note_probe_entry_callback): New.
(setup_note_probe_entry): New.

14 years agoUse common handler for sdt.h v2/v3 and change sdt.h v2 to use it.
Stan Cox [Mon, 13 Sep 2010 18:49:45 +0000 (14:49 -0400)]
Use common handler for sdt.h v2/v3 and change sdt.h v2 to use it.

* tapsets.cxx (sdt_query::iterate_over_probe_entries): Replaces get_next_probe.
(sdt_query::handle_query_module): Use it.
(sdt_query::handle_probe_entry): New.  Used by sdt.h v2/v3

14 years agoAdd dwarf support for use by sdt.h v3.
Stan Cox [Mon, 13 Sep 2010 14:37:19 +0000 (10:37 -0400)]
Add dwarf support for use by sdt.h v3.

* dwflpp.cxx (dwflpp::iterate_over_notes): New.
(dwflpp::get_section): New.
* dwflpp.h: Likewise.
*tapsets.cxx (sdt_query::handle_query_module):  Use get_section.

14 years agoPR 11905: Take more care with stap-server config files.
Dave Brolley [Fri, 10 Sep 2010 18:18:07 +0000 (14:18 -0400)]
PR 11905: Take more care with stap-server config files.

- Config files now have a fixed suffix which avoids collisions with other
  stap-server files.
- Config files are now interpreted in order to avoid execution of random
  code.

14 years agoUpdated latencytap.stp
William Cohen [Thu, 9 Sep 2010 16:49:22 +0000 (12:49 -0400)]
Updated latencytap.stp

The updated latencytap.stp uses more portable probe points for the collecting
the data. The script also maps the functions in the traceback to reasons the
sleep. The reasons for the sleeps were mechanically generated from
latencytop-0.5 latencytop.trans file.

14 years agoValidate backtrace addresses.
Mark Wielaard [Thu, 9 Sep 2010 14:38:53 +0000 (16:38 +0200)]
Validate backtrace addresses.

* runtime/stack-i386.c (_stp_valid_pc_addr): New function.
  (_stp_stack_print_fallback): Use it.
  (__stp_stack_print): Use it.
* runtime/stack-x86_64.c (_stp_valid_pc_addr): New function.
  (_stp_stack_print_fallback): Use it.
  (__stp_stack_print): Use it.
* runtime/unwind/i386.h (arch_unw_user_mode): Removed.
* runtime/unwind/x86_64.h (arch_unw_user_mode): Likewise.

14 years agoPR 10922: Firewall hint improvement.
Dave Brolley [Tue, 7 Sep 2010 16:17:06 +0000 (12:17 -0400)]
PR 10922: Firewall hint improvement.

Specifically mention mDNS when suggesting a check of the firewall after
avahi fails to find a server in the test suite.

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