Wenji Huang [Tue, 5 May 2009 23:26:38 +0000 (19:26 -0400)]
PR10102: tolerate the failure related to optional probe
This patch will make stap silently accept the
failure related to optional probe. It puts try/catch
around find_and_build which can cover most probe types.
The specific treatment for dwarf_derived_probe in
commit ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97 is
reverted.
Mark Wielaard [Sun, 3 May 2009 04:49:02 +0000 (06:49 +0200)]
Don't recurse into DW_AT_declaration subprograms in iterate_over_labels.
Newer gcc (4.4) places more DW_TAG_subprograms with DW_AT_declaration
at call sites. iterate_over_labels should only be concerned about
complete declarations.
* tapsets.cxx (dwflpp::iterate_over_labels): Skip DW_TAG_subprogram
that has attribute DW_AT_declaration.
The syscall testsuite uses embedded "// TEXT" markers in the .c files
to designate expected output, kind of like the "dg-" bunch in the gcc
test suite. Unfortunately, "//" is not a unique prefix to systemtap
tests, and in particular it can occur in the system headers that will
be picked up with the "gcc -E -C ..." invocation in test.tcl.
So let's switch to "//staptest//". test.tcl is also modified to
escape a few more mischevious regexp metacharacters that might sneak
past.
* buildrun.cxx (run_make_cmd, kernel_built_uprobes,
copy_uprobes_symbols, run_pass, make_typequery_umod):
Print strerror after a failed stap_system() if verbose.
David Smith [Thu, 30 Apr 2009 15:20:41 +0000 (10:20 -0500)]
Fixed uaddr tapset function for ppc64 by adding task_pt_regs() definition.
PR10117 fix.
* tapset/context.stp: Added ppc64 task_pt_regs() definition if it dooesn't
already exist.
Josh Stone [Wed, 29 Apr 2009 21:00:21 +0000 (14:00 -0700)]
Use sockaddr instead of timeval in @cast test
Using timeval had problems on big-endian multi-arch platforms (ppc64),
because the user tv_sec used in the @cast didn't match the kernel tv_sec
used to provide a pointer. Hopefully reading from a sockaddr should be
more robust, as that type doesn't appear to need any compat wrappers for
multi-archs.
PR 6930: fix flightrec2.exp to handle filesize correctly
* testsuite/systemtap.base/flightrec2.exp: Use stat instead of ls for checking
file size.
* testsuite/systemtap.base/flightrec2.stp: Increase timer interval for some
architecture on which the minimum interval is more than 1 ms (e.g. xen)
* elaborate.cxx: Early return for mismatched optional probe.
* testsuite/systemtap.base/optionalprobe.exp: New test case.
* testsuite/systemtap.base/optionalprobe.stp: Ditto.
Josh Stone [Mon, 27 Apr 2009 21:38:20 +0000 (14:38 -0700)]
Handle more types of types in declaration_resolve
Instead of just structs and unions, we now also process typedefs, enums,
and base types in iterate_over_globals, so declaration_resolve can find
more variations. This especially useful to let @casts reference typedef
names.
David Smith [Mon, 27 Apr 2009 20:53:21 +0000 (15:53 -0500)]
Fixed itrace on RHEL5 (PR10091).
PR10091 fix.
* runtime/itrace.c: Includes ptrace_compatibility.h.
(usr_itrace_report_quiesce): Corrected return value for original version
of utrace.
* runtime/ptrace_compatibility.h: Defines arch_has_single_step() and
arch_has_block_step() in terms of ARCH_HAS_SINGLE_STEP and
ARCH_HAS_BLOCK_STEP.
Jim Keniston [Fri, 24 Apr 2009 20:46:46 +0000 (13:46 -0700)]
PR5273: uprobes_i386.c instruction table
Resynch uprobes1 2-byte-opcode table with uprobes2 x86. Mostly changes a
bunch of mmx instructions from rejected to accepted.
David Smith [Fri, 24 Apr 2009 17:48:29 +0000 (12:48 -0500)]
Cache and retrieve syscall arguments when needed.
* runtime/task_finder.c (__stp_utrace_task_finder_target_syscall_entry):
New function that caches syscall arguments for mmap(), munmap(), and
mprotect() for use in __stp_utrace_task_finder_target_syscall_exit().
(__stp_utrace_task_finder_target_syscall_exit): Uses cached syscall
argument info when making callbacks.
(stap_start_task_finder): Initializes map subsytem for storing syscall
argument data.
* runtime/task_finder_map.c: New file containing functions to save and
retrieve syscall arguments.
utrace/ia64: Fix syscall_get_set_args_cb() to handle syscalls via syscall()
* runtime/syscall.h (syscall_get_set_args_cb): Fix to decode user stack
collectly in case of syscall(), and check the maximum number of syscall
arguments.
PR 6930: Add testcases for on-file flight recorder
* testsuite/systemtap.base/flightrec1.exp: New test case for background mode.
* testsuite/systemtap.base/flightrec2.exp: New test case for file switching.
* testsuite/systemtap.base/flightrec2.stp: Test script for file switching.
Rajan Arora [Wed, 22 Apr 2009 16:10:37 +0000 (12:10 -0400)]
PR 9941: Add predicate function callback to check for an early abort
* tapsets.cxx: Add dwfl_report_offline_predicate to check pending
interrupts for an early abort.
* tapsets.h: Declare it.
* translate.cxx: Add callback to function call.
Stan Cox [Wed, 22 Apr 2009 15:34:14 +0000 (11:34 -0400)]
Make sdt.h big endian aware.
* sdt.h: Use .quad instead of .long for .probe section addresses.
ia64 and s390 require 'nop 0' and x86 tolerates it.
* tapsets.cxx (build): Fetch probe_name in a big endian friendly fashion.