Stan Cox [Wed, 19 Jan 2011 12:09:01 +0000 (07:09 -0500)]
Switch to using a register width table instead of heuristic code.
* tapsets.cxx (sdt_uprobe_var_expanding_visitor): Add DRI and regwidths.
Change dwarf_regs to be a regname/regwidth pair. Change initializer.
* (sdt_uprobe_var_expanding_visitor::visit_target_symbol): Use it.
David Smith [Tue, 18 Jan 2011 20:14:13 +0000 (14:14 -0600)]
Fixed BZ669740 by making target_set.stp use syscall probes in kernels < 2.6.18.
* tapset/target_set.stp: Dwarfless probes don't work in kernels < 2.6.18.
So, fall back to 'syscall' probes for those kernels (instead of
'nd_syscall' probes.
Dave Brolley [Mon, 17 Jan 2011 18:29:50 +0000 (13:29 -0500)]
Configuration problems.
- CFLAGS was being cleared in configure.ac (oldCFLAGS typo)
- CXXFLAGS was not always being set (CXFXLAGS typo)
- pick up $(AM_CFLAGS) and @PIECFLAGS@ in all C compilations in Makefile.am
Including the comment /* myproc-unprivileged */ within an embedded C
tapset function or embedded C expression makes it available for use
by unprivileged users and also automatically adds a call to
assert_is_myproc() within the function or expression (i.e. it is
equivalent to including the comment /* unprivileged */ and
manually adding the the call to assert_is_myproc).
All instances within the tapset source tree have been updated.
Lukas Berk [Fri, 14 Jan 2011 15:32:47 +0000 (10:32 -0500)]
PR11756 - adding warnings for deprecated declarations
Added the --version-check flag, this will check if systemtap
constructors being used are version dependent. If so, a warning
detailing what syntax element is displayed.
compatibility: perf_event.h updates for kernel 2.6.37
* runtime/autoconf-perf-structpid.c: New file.
* buildrun.cxx: Use it to define STAPCONF_PERF_STRUCTPID.
* runtime/perf.c: Respect it for perf_event_create_kernel_counter param 3.
Dave Brolley [Wed, 22 Dec 2010 16:16:27 +0000 (11:16 -0500)]
PR12172: make unprivileged mode default under certain conditions.
--unprivileged --use-server is now the default for invocations requiring
phase 5 for members of the group stapusr who are not also members of
the group stapdev.
David Smith [Tue, 21 Dec 2010 21:53:33 +0000 (15:53 -0600)]
Fixed PR12338 by updating softirq.entry/softirq.exit probes for 2.6.37+.
* tapset/irq.stp: Added 'vec_nr' variable to softirq.entry/softirq.exit
probes. Used @defined() to make sure old variables are present.
* testsuite/buildok/irq-detailed.stp: Updated softirq.entry/softirq.exit
test.
David Smith [Mon, 20 Dec 2010 22:47:19 +0000 (16:47 -0600)]
2010-12-20 David Smith <dsmith@redhat.com>
Fix PR11388 by handling nd_syscall.mmap changes for 2.6.33+ kernels.
* tapset/nd_syscalls.stp: Use arch-generic sys_mmap_pgoff() for
nd_syscall.mmap2 if kernel version is 2.6.33 or higher.
* tapset/i386/nd_syscalls.stp: Only use arch-specific nd_syscall.mmap*
probes if kernel version is less than 2.6.33.
* tapset/ia64/nd_syscalls.stp: Ditto.
* tapset/s390/nd_syscalls.stp: Ditto.
* tapset/powerpc/nd_syscalls.stp: Ditto. Also add missing
nd_syscall.sigaltstack probe.
* tapset/x86_64/nd_syscalls.stp: Ditto. Also move sys_mmap_pgoff() probe
to nd_syscall.mmap2 alias (instead of nd_syscall.mmap alias).
* testsuite/buildok/nd_syscalls-detailed.stp: Add generic nd_syscall.mmap2
test if kernel version is 2.6.33 or higher.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: New test.
* testsuite/lib/stap_buildok.exp: Add new nd_syscalls-arch-detailed.stp
test to known ia64 failures.
David Smith [Thu, 16 Dec 2010 20:55:25 +0000 (14:55 -0600)]
Fix PR11388 by handling syscall.mmap changes for 2.6.33+ kernels.
* tapset/syscalls.stp: Use arch-generic sys_mmap_pgoff() for syscall.mmap2
if kernel version is 2.6.33 or higher.
* tapset/i386/syscalls.stp: Only use arch-specific syscall.mmap* probes if
kernel version is less than 2.6.33.
* tapset/ia64/syscalls.stp: Ditto.
* tapset/powerpc/syscalls.stp: Ditto.
* tapset/s390/syscalls.stp: Ditto.
* tapset/x86_64/syscalls.stp: Ditto. Also move sys_mmap_pgoff() probe to
syscall.mmap2 alias (instead of syscall.mmap alias).
* testsuite/buildok/syscalls-detailed.stp: Add generic syscall.mmap2 test
if kernel version is 2.6.33 or higher.
* testsuite/buildok/syscalls-arch-detailed.stp: Only test arch-specific
syscall.mmap* probes if kernel version is less than 2.6.33.
David Smith [Thu, 16 Dec 2010 20:01:31 +0000 (14:01 -0600)]
Fixed PR12330 by changing tapset/tty.stp to avoid ppc64 compile problem.
* tapset/tty.stp (_struct_winsize_u): Removed embedded-C function.
(tty.resize): Removed calls to _struct_winsize_u() and just uses
user_ushort() to get values in user memory.
* tapset/uconversions.stp (user_ushort): New function.
(user_ushort_warn): Ditto.
* testsuite/buildok/conversions-embedded.stp: Added user_ushort() and
user_ushort_warn() tests.
* testsuite/buildok/tty-embedded.stp: Removed (since all embedded-C
functions have been removed from tty.stp).
Frank Ch. Eigler [Mon, 13 Dec 2010 18:50:02 +0000 (13:50 -0500)]
PR12309 part 1, use atomic_t for delayed_work state signaling
There was a possible race condition between multiple processes opening
the transport .ctl file concurrently.
* runtime/transport/transport.h (_stp_ctl_attached): Become atomic_t.
* runtime/transport/transport.c (_stp_attach, _stp_detach):
Stop messing with it.
* runtime/transport/control.c (_stp_ctl_open|close_cmd): Use atomic_t
and reorder logic to defeat race condition.
Dave Brolley [Wed, 15 Dec 2010 17:04:57 +0000 (12:04 -0500)]
PR 11922: Allow ip address as host name to match ip address in server certificate.
The default certificate function (SSL_AuthCertificate) fails to match DNS names
which resemble ip addresses. It then calls our badCertHandler callback. There
we get the chance to manually match the ip address.
Josh Stone [Wed, 15 Dec 2010 00:15:45 +0000 (16:15 -0800)]
PR12115: New support for multiple remote targets
* session.cxx (systemtap_session::clone): Returns a systemtap_session
for a requested arch/release. If one such was already created, go
ahead and use it.
* remote.h (run -> start, finish): Separate the launch from the wait.
* remote.cxx (direct, ssh_remote): Implement separated start and finish.
(ssh_remote::ssh_remote): Use systemtap_session::clone to get a
session matching the remote target.
* main.cxx (pass_5): Take a vector of targets to run in parallel.
(cleanup): Perform cleanup for subsessions too.
(main): Loop over all specified remote_uris.
Josh Stone [Tue, 14 Dec 2010 00:46:34 +0000 (16:46 -0800)]
PR12115: Prepare utils for multiple inferiors
We'll need to juggle multiple child process if we are to run multiple
remote targets in parallel.
* util.cxx (spawned_pid -> spawned_pids): No longer an only child,
hopefully it won't act so spoiled anymore.
(wait_for_spawn -> stap_waitpid): Now wait for a specific pid. Clear
it from the set when dead (but not forgotten).
(stap_spawn): Like stap_system, but return the pid and don't wait up.
(stap_system): Call stap_spawn, then wait for it.
(kill_stap_spawn): Must be fair, kill them all.
Josh Stone [Wed, 1 Dec 2010 02:37:15 +0000 (18:37 -0800)]
PR12115: Early support for remote execution
This corresponds to the second draft posted on bugzilla.
* Makefile.am: Add remote.cxx to the build.
* Makefile.in: Regenerate.
* buildrun.cxx (run_pass -> make_run_command): Rename, and don't
actually run the thing yet, so we can control *where* we run it.
* main.cxx (pass_5): Take a target where we want to run.
(main): Check if we have a remote uri, and go with it.
* remote.cxx: New, define classes for local and ssh execution.
* remote.h: New, define the generic remote class.
* session.cxx (systemtap_session::systemtap_session): Move the logic to
normalize machine architecture names to util.cxx.
(systemtap_session::parse_cmdline): Add --remote.
* session.h (systemtap_session::remote_uris): New.
* util.cxx (normalize_machine): Moved from session.cxx.
(wait_for_spawn): Refactor common code.
(stap_system): Use wait_for_spawn.
(stap_system_read): New, reads stdout from subprocess.
Like popen, but with c++ streams and a signal-managed pid.
Josh Stone [Tue, 14 Dec 2010 22:47:56 +0000 (14:47 -0800)]
Split user_int64 in two on i386
* tapset/uconversions.stp (user_int64): Since __stp_get_user can't do
64-bit reads on i386, we must read the value in two parts.
(user_uint64): Make this just a wrapper for user_int64.
William Cohen [Thu, 9 Dec 2010 01:40:24 +0000 (20:40 -0500)]
Edit tapset documentation comments
Made the following changes to the documentation comments:
- Remove the "General Syntax:" lines.
- Remove trailing '.' for the summaries.
- Make parameter information phrases rather than sentences
William Cohen [Wed, 8 Dec 2010 22:12:14 +0000 (17:12 -0500)]
Edit the tapset documentation for context-symbols.stp
Made the following changes to the documentation comments:
- Remove the "General Syntax:" lines.
- Remove trailing '.' for the summaries and argumentation information.
- Fix a few typos.
William Cohen [Wed, 8 Dec 2010 22:06:21 +0000 (17:06 -0500)]
Edit the tapset documentation for context.stp
Made the following changes to the documentation comments:
- Remove the "General Syntax:" lines.
- Remove trailing '.' for the summaries.
- Add title and description for cpuid function
William Cohen [Wed, 8 Dec 2010 19:00:46 +0000 (14:00 -0500)]
Add the *mib.stp tapsets to the SystemTap Tapset reference manual
Went through the comments in ipmib.stp, linuxmib.stp, and tcpmib.stp to
make them format properly. Then added a chapter in the SystemTap Tapset
reference manual for them.