William Cohen [Thu, 19 Aug 2010 19:16:22 +0000 (15:16 -0400)]
Minimize manual white space for <programlisting> and <screen>
Docbook pays attention to the white space in <programlisting> and <screen>
sections. To avoid the additional whitespace in those sections mechanically
went through xml and merged the lines together. The resulting manual is a
couple pages shorter.
David Smith [Tue, 17 Aug 2010 20:47:51 +0000 (15:47 -0500)]
Made arch-specific syscalls probe fixups and deprecations. New testcase.
* tapset/i386/syscalls.stp (syscall.sigaltstack): Deprecated 'ussp'
variable in favor of 'uss_uaddr' (to match other arches).
* tapset/ia64/syscalls.stp(syscall.sigaltstack): Deprecated the
'ss_uaddr'/'oss_uaddr' variables in favor of the
'uss_uaddr'/'uoss_uaddr' variables (to match other arches).
* tapset/powerpc/syscalls.stp (syscall.sysctl32): Deprecated old probe
name 'syscall.compat_sysctl'.
(syscall.sysctl32.return): Deprecated old probe name
'syscall.compat_sysctl.return'.
(syscall.sigaltstack): Added probe.
(syscall.sigaltstack.return): Ditto.
(syscall.sys32_sigaltstack): Added the kernel function
'compat_sys_sigaltstack' for newer kernels.
* tapset/s390/syscalls.stp (syscall.getresgid16): Added convenience
variables to match 'syscall.getresgid'.
(syscall.getresuid16): Added convenience variables to match
'syscall.getresuid'.
(syscall.mmap): Added convienece variables to match other arches.
(syscall.mmap2): Ditto.
(syscall.sigaltstack): Added probe.
(syscall.sigaltstack.return): Ditto.
(syscall.sys32_sigaltstack): Ditto.
(syscall.sys32_sigaltstack.return): Ditto.
* tapset/x86_64/syscalls.stp (syscall.sigaltstack): Deprecated the
'regs_uaddr' variable in favor of 'regs' (since the address isn't a user
address).
(syscall.mmap32): Added convenience variables to match 'syscall.mmap'.
(syscall.pipe32): Added convenience variables to match 'syscall.pipe'.
* testsuite/buildok/testsuite/buildok/syscalls-arch-detailed.stp: New
testcase.
* tapset/aux_syscalls.stp (__ulong): New function.
* testsuite/buildok/aux_syscalls-embedded.stp: Added __ulong() test.
* NEWS: Mentioned pending deprecations.
* stap.1: Ditto.
Josh Stone [Tue, 17 Aug 2010 20:33:38 +0000 (13:33 -0700)]
Simplify dwfl_assert and dwarf_assert
We don't need template or const efforts for a null pointer check -- just
use const void* for all cases. Make the overloaded variants inline
while I'm at it.
Josh Stone [Tue, 17 Aug 2010 19:42:49 +0000 (12:42 -0700)]
Support DWARF4 linkage names
With -gdwarf-4, gcc outputs DW_AT_linkage_name instead of
DW_AT_MIPS_linkage_name. Semantics are unchanged.
* dwarf_wrappers.h (dwarf_linkage_name): New, retrieves the linkage_name
by either the old or new attribute value.
* dwflpp.cxx (dwflpp::iterate_over_functions): Use dwarf_linkage_name.
(dwflpp::vardie_from_symtable): Ditto.
* tapsets.cxx (dwarf_query::add_probe_point): Ditto.
David Smith [Wed, 11 Aug 2010 19:37:07 +0000 (14:37 -0500)]
Updated stap_get_arch().
* stap-env (stap_get_arch): If we don't have a special renaming rule for
an arch, just use the output of 'uname -m'. Added a comment stating the
code needs to match the code in session.cxx.
* session.cxx (systemtap_session): Added a comment stating the code for
determining the arch needs to match the code in stap_get_arch.
Josh Stone [Tue, 10 Aug 2010 00:22:33 +0000 (17:22 -0700)]
PR11880: Allow function matching on the MIPS_linkage_name
When a function pattern starts with "_Z", we can assume that it is
trying to match the mangled C++ name. Without actually implementing a
mangler ourselves, we can do pretty well using the MIPS_linkage_name.
* dwflpp.cxx (dwflpp::iterate_over_functions): Match _Z patterns against
the MIPS_linkage_name of each function die.
* tapsets.cxx (dwarf_query::query_module_dwarf): As with wildcards,
don't use the query_module_functions for _Z patterns.
(dwarf_query::add_probe_point): For _Z queries, use the linkage name
for the final probe product too.
* testsuite/semok/mangled.stp: Probe mangled names in stap itself.
David Smith [Tue, 10 Aug 2010 19:35:57 +0000 (14:35 -0500)]
BZ607232: Fixed 'service systemtap restart' and added required commands.
* initscript/systemtap.in: Fixed 'restart' by making using local copies of
the $SCRIPTS global variable. Also brought it up to speed with current
Fedora packaging guidelines by adding 'force-reload', 'reload',
'condrestart' and 'try-restart' commands.
Josh Stone [Fri, 6 Aug 2010 17:55:32 +0000 (10:55 -0700)]
Ignore empty files in the cache
Sometimes crashes can leave just-written files at zero length, so we
should be a little paranoid that our cached files are ok. The stapconf
header is especially vulnerable, as it will prevent all scripts from
being compiled if it gets bad.
* util.cxx (get_file_size(int)): Read the size from a file descriptor.
* cache.cxx (get_stapconf_from_cache, get_script_from_cache): Check that
cached files are non-empty before using them.
David Smith [Fri, 30 Jul 2010 19:51:54 +0000 (14:51 -0500)]
nd_syscalls.stp/nd_syscalls2.stp fixups and deprecations. Added testcases.
* tapset/nd_syscalls.stp (nd_syscall.accept): Added a pending deprecation
of 'flag_str'. Added 'flags_str'.
(nd_syscall.dup): Added a pending deprecation of 'old_fd'. Added
'oldfd'.
(nd_syscall.fadvise64): At some point, x86_64 kernels couldn't find
dwarf parameters. But, the nd_syscall tapset doesn't care about dwarf
parameters, so delete the special x86_64 version.
(nd_syscall.fadvise64_64): Ditto.
(nd_syscall.fgetxattr): Added pending deprecation of 'name2' and added
'name_str'.
(nd_syscall.fremovexattr): Ditto.
(nd_syscall.fsetxattr): Ditto.
(nd_syscall.getxattr): Ditto.
(nd_syscall.lremovexattr): Ditto.
(nd_syscall.compat_sys_msgctl): Add convenience variables to match
non-'compat' probe.
(nd_syscall.compat_sys_msgrcv): Ditto.
(nd_syscall.compat_sys_msgsnd): Ditto.
* tapset/nd_syscalls2.stp (nd_syscall.pipe): Added convenience variables
to match 'syscall' probe alias.
(nd_syscall.compat_sys_recvmsg): Ditto.
(nd_syscall.signalfd): Ditto.
(nd_syscall.ustat32): Ditto.
(nd_syscall.compat_pselect7a): Started a pending deprecation of
incorrect 'syscall.compat_pselect7a' probe alias name. Correct name is
'syscall.compat_pselect7'.
(nd_syscall.sched_setaffinity): Removed special x86_64 version.
(nd_syscall.compat_sys_semctl): Make sure it supports the same
variables as the non-compat probe.
(nd_syscall.compat_sys_sendmsg): Ditto.
(nd_syscall.compat_signalfd): Ditto.
* testsuite/buildok/nd_syscalls-all-probes.stp: New testcase.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/lib/stap_buildok.exp (buildok_known_failures): KFail the
tests that use nd_syscalls probes on ia64 (PR6971).
* NEWS: Mentioned pending deprecations.
* stap.1: Ditto.
Mark Wielaard [Wed, 28 Jul 2010 11:19:07 +0000 (13:19 +0200)]
Add dieoffset to missing location error messages.
* dwflpp.h (translate_location): Take die as argument.
(find_struct_member): Take dies vector as argument.
* dwflpp.cxx (translate_location): Take die as argument and output dieoffset
in error message.
(find_struct_member): Take dies vector as argument and fill it with the
dies found.
(literal_stmt_for_local): Call translate_location with vardie.
David Smith [Mon, 26 Jul 2010 19:19:32 +0000 (14:19 -0500)]
Many small tapset/syscalls.stp fixups. Deprecate misnamed vars. Added testcase.
* tapset/syscalls.stp (syscall.add_key): Added a pending deprecation of
'description_auddr'. Added 'description_uaddr'.
(syscall.clock_nanosleep): Added 'flags' convenience variable (to go
along with existing 'flag_str' variable).
(syscall.compat_clock_nanosleep): Ditto.
(syscall.fadvise64): At some point, x86_64 kernels couldn't find
parameters, so a special version of this probe was written for x86_64.
Now just uses @defined().
(syscall.fadvise64_64): Ditto.
(syscall.fremovexattr): Add 'name_str' and fix 'argstr'.
(syscall.fgetxattr): Added pending deprecation of 'name2' and added
'name_str'.
(syscall.fsetxattr): Ditto.
(syscall.getxattr): Ditto.
(syscall.lgetxattr): Ditto.
(syscall.lremovexattr): Ditto.
(syscall.futex): Use dwarf variable in comparison instead of convenience
variable (to let convenience variable be optimized away).
(syscall.compat_futex): Ditto.
(syscall.compat_sys_msgctl): Add convenience variables to match
non-'compat' probe.
(syscall.compat_sys_msgrcv): Ditto.
(syscall.compat_sys_msgsnd): Ditto.
* testsuite/buildok/syscalls-detailed.stp: New testcase.
* NEWS: Mentioned pending variable deprecations.
* stap.1: Ditto.
Dave Brolley [Wed, 21 Jul 2010 18:44:27 +0000 (14:44 -0400)]
PR 11441, PR 10772: Support specified servers on --use-server option to stap.
Implement the direct specification of servers by hostname/ip address with an
(optionally) port in the integrated compile-server client, as implemented by
stap-client.
William Cohen [Fri, 23 Jul 2010 15:45:21 +0000 (11:45 -0400)]
Make the beginner's guide use the iotime.stp example
In effort to clean out the extras directory in systemtap beginner's guide
use the existing iotime.stp example in the examples rather than a local
version in the extras directory.
William Cohen [Thu, 22 Jul 2010 21:35:31 +0000 (17:35 -0400)]
Use the para-callgraph.stp example in the examples in the beginner's guide
Use the tested examples rather than extras scripts where possible. So in this
case use the para-callgraph.stp example which has the same functionality as
para-callgraph-simple.stp.
William Cohen [Thu, 22 Jul 2010 20:47:58 +0000 (16:47 -0400)]
Move inodewatch.stp into the examples
Originally inodewatch.stp was in the beginner guide's extras directory.
Moving inodewatch.stp into the examples directory to get regular testing
of the script.
Mark Wielaard [Wed, 21 Jul 2010 20:24:33 +0000 (22:24 +0200)]
Extend vta-test.exp testcase for PR11825 and add 32-on-64 for fun.
* testsuite/systemtap.base/vta-test.c: Provide constants through struct.
* testsuite/systemtap.base/vta-test.exp: Build/Test also for 32-on-64 if
available.
* testsuite/systemtap.base/vta-test.stp: Take program under probe as @1.
Mark Wielaard [Wed, 21 Jul 2010 13:59:27 +0000 (15:59 +0200)]
rhbz#616040 loc2c deref on 32bit address fails.
* runtime/loc2c-runtime.h (deref): For __x86_64__ case cast address to
(unsigned long) everywhere in case we got a 32 bit address of a 32-on-64
but process.
Josh Stone [Tue, 20 Jul 2010 22:10:29 +0000 (15:10 -0700)]
Make sure Dwarf_Ops don't have garbage
We synthesize a Dwarf_Op in a couple of places, but we were only setting
the fields we care about, ".atom" and ".number". The garbage in
".number2" would survive into "DWARF expression:" comment in loc2c,
which made it look unique and subverted caching.
Josh Stone [Tue, 20 Jul 2010 21:06:10 +0000 (14:06 -0700)]
Update bkl examples with newer syntax
* testsuite/systemtap.examples/locks/bkl.stp: Use '!' to alternate
kernel probepoints between lock_kernel and _lock_kernel (and unlock).
* testsuite/systemtap.examples/locks/bkl_stats.stp: Ditto, and use
@entry to get timestamps.
Merge branch 'master' of git://sources.redhat.com/git/systemtap
* 'master' of git://sources.redhat.com/git/systemtap:
* tapset/syscalls2.stp: Started a pending deprecation of incorrect 'syscall.compat_pselect7a' probe alias name. Correct name is 'syscall.compat_pselect7'. * testsuite/buildok/syscalls2-detailed.stp: Checks for correct probe alias name. * NEWS: Mentioned 'syscall.compat_pselect7a' deprecation. * stap.1: Ditto. * HACKING: Updated deprecation description.
Many small tapset/syscalls2.stp fixups. Added testcase.
Fix spurios testcase failure from systemtap.examples/network/socktop.
added the procfs.umask(UMASK) feature to the NEWS file.
* tapsets.cxx (sdt_uprobe_var_expanding_visitor ctor): Use %-adorned
register names. Accept other architectures.
(visit_target_symbol): Rewrite regexp matching / parsing. Fall back to
DWARF in case of parse failure.
* testsuite/systemtap.base/cxxclass.exp: Use -w to suppress dwarf warning.
* util.cxx (regexp_match): New function.
* util.h: Declare it.
David Smith [Mon, 19 Jul 2010 21:44:20 +0000 (16:44 -0500)]
* tapset/syscalls2.stp: Started a pending deprecation of incorrect
'syscall.compat_pselect7a' probe alias name. Correct name is
'syscall.compat_pselect7'.
* testsuite/buildok/syscalls2-detailed.stp: Checks for correct probe alias
name.
* NEWS: Mentioned 'syscall.compat_pselect7a' deprecation.
* stap.1: Ditto.
* HACKING: Updated deprecation description.
David Smith [Mon, 19 Jul 2010 21:19:49 +0000 (16:19 -0500)]
Many small tapset/syscalls2.stp fixups. Added testcase.
* tapset/syscalls2.stp (syscall.compat_sys_recvmsg): Make sure it supports
the same variables as the non-compat probe.
(syscall.compat_sys_semctl): Ditto.
(syscall.compat_sys_sendmsg): Ditto.
(syscall.sched_setaffinity): At some point, x86_64 kernels couldn't
find $len, so a special version of this probe was written for it. Now
just uses @defined().
(syscall.compat_signalfd): Prefers compat_sys_signalfd4 over
compat_sys_signalfd.
(syscall.ustat32): Merged the 2 probes into 1.
* testsuite/buildok/syscalls2-detailed.stp: New testcase.
David Smith [Wed, 14 Jul 2010 15:33:01 +0000 (10:33 -0500)]
Minor timestamp.stp/timestap_gtod.stp/ucontext.stp buildok test improvements.
* testsuite/buildok/timestamp-embedded.stp: Renamed from
buildok/timestamp.stp. Only covers function from timestamp.stp.
* testsuite/buildok/timestamp_gtod-embedded.stp: New testcase.
* testsuite/buildok/ucontext-embedded.stp: Renamed from ucontext.stp
Josh Stone [Tue, 13 Jul 2010 17:25:48 +0000 (10:25 -0700)]
Allow pretty-printing with partial availability
Especially with local structs, DWARF may only have parts of a variable
available at runtime. This change lets us print '?' for inaccessible
parts, so we can still print the parts we do have.
* tapsets.cxx (dwarf_pretty_print::push_deref): New, try a deref and
push a '?' instead if it fails.
(dwarf_pretty_print::recurse): Use push_deref instead of deref.
(dwarf_pretty_print::recurse_base): Ditto.
(dwarf_pretty_print::recurse_pointer): Ditto.
(dwarf_pretty_print::print_chars): Ditto.