]> sourceware.org Git - systemtap.git/log
systemtap.git
9 years agoPrioritize symbol table lookup for ppc64le
Hemant Kumar [Mon, 20 Apr 2015 10:29:24 +0000 (15:59 +0530)]
Prioritize symbol table lookup for ppc64le

PPC64 ELF ABI v2 has a Global entry point and a local entry point
for the functions. We need the Local entry point in order to probe
these functions. However, the DIE for these functions in debuginfo
return the function.entrypc which is same as the global entry point.
The local entry point is not encoded in the debuginfo of the ELFs. The
offset to local entry point is however encoded in the st_other field
of these symbols in the symbol table.
We need to use this field to adjust the sym.st_value to actually point
to the local entry point instead of the global entry point.

This patch is in relation to this bug :
https://sourceware.org/bugzilla/show_bug.cgi?id=17638

So, while adding symbols to the sym_table, we add an offset of
PPC64_LOCAL_ENTRY_OFFSET(sym.st_other) to st_value.
And when the function address is queried in query_dwarf_func(), we give
priority to the cached sym_table, where we can retrieve the adjusted
entry address of the function. If we don't get any address from the
symbol table, then we proceed to get from the debuginfo.

Macro definition PPC64_LOCAL_ENTRY_OFFSET has been picked up from glibc.
It won't be defined if we are building systemtap on a machine having
older elf.h and hence, won't recognize PPC64_LOCAL_ENTRY_OFFSET.

Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
9 years agoTest dwarfless probes on multiple static functions
Hemant Kumar [Mon, 20 Apr 2015 10:29:23 +0000 (15:59 +0530)]
Test dwarfless probes on multiple static functions

This patch checks how many symbols were resolved instead of probing on
them which won't require us to go till pass 5. It runs the .stp script
till pass 2. This test can be run with:
make check RUNTESTFLAGS=multisym.exp

Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
9 years agosystemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions
Hemant Kumar [Mon, 20 Apr 2015 10:29:22 +0000 (15:59 +0530)]
systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions

With multiple static functions with same names in an ELF and in absence
of dwarf, if we probe on one of the functions, then systemtap places
probe only on one static function ignoring the rest. This is because the
mapping between the symbol names and their func_info is a simple map
which doesn't allow insertion of another symbol with the same name.

This patch fixes this issue by changing this map to a multimap which
allows duplicate entries for the same symbol name. lookup_symbol code
will return a set of func_info * instead of a single descriptor for a
function name.

We also need to fix other areas in the code where lookup_symbol() and
lookup_symbol_address() are being called so as to look for a set of
func_info's and a list of Dwarf_Addr's respectively, instead of a single
descriptor.

Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
9 years agoioperm.c: Fix COVERAGE.
Martin Cermak [Wed, 22 Apr 2015 07:37:25 +0000 (09:37 +0200)]
ioperm.c: Fix COVERAGE.

9 years agoPR18184: Test coverage improvements, tapset extension.
Martin Cermak [Wed, 22 Apr 2015 06:10:46 +0000 (08:10 +0200)]
PR18184: Test coverage improvements, tapset extension.

* tapset/linux/aux_syscalls.stp: Add auxiliary functions for quotactl tapset.
* tapset/linux/nd_syscalls2.stp: Fix types for personality tapset,
                                 extend argstr for quotactl.
* tapset/linux/syscalls2.stp: Ditto.
* tapset/linux/syscalls.stpm: New macro @__quotactl_argstr().
* testsuite/systemtap.syscall/personality.c: New testcase.
* testsuite/systemtap.syscall/pivot_root.c: New testcase.
* testsuite/systemtap.syscall/quotactl.c: Testcase extension.

9 years agoUpdated coverage comment in testsuite/systemtap.syscall/handle_at.c.
David Smith [Tue, 21 Apr 2015 15:08:10 +0000 (10:08 -0500)]
Updated coverage comment in testsuite/systemtap.syscall/handle_at.c.

9 years agoUpdate coverage list in testsuite/systemtap.syscall/rt_signal.c.
David Smith [Tue, 21 Apr 2015 15:05:51 +0000 (10:05 -0500)]
Update coverage list in testsuite/systemtap.syscall/rt_signal.c.

9 years agoFixed typos in tapset/linux/tty.stp.
David Smith [Tue, 21 Apr 2015 14:44:54 +0000 (09:44 -0500)]
Fixed typos in tapset/linux/tty.stp.

9 years agoFix PR18263 by avoiding kernel string copy fault errors in tty.stp.
David Smith [Tue, 21 Apr 2015 14:31:25 +0000 (09:31 -0500)]
Fix PR18263 by avoiding kernel string copy fault errors in tty.stp.

* tapset/linux/tty.stp: Replace all kernel_string() calls with
  kernel_string_quoted(). Fall back on old behavior if '--compatible=2.7'
  is specified.

9 years agoFix PR18264 by adding support for the {name_to,open_by}_handle_at syscalls.
David Smith [Mon, 20 Apr 2015 21:33:55 +0000 (16:33 -0500)]
Fix PR18264 by adding support for the {name_to,open_by}_handle_at syscalls.

* tapset/linux/syscalls2.stp: Add new 'name_to_handle_at' and
  'open_by_handle_at' probes.
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Add new tests.
* testsuite/systemtap.syscall/handle_at.c: New test case.

9 years agoFix PR18284 by improving support/testing for some rt_* syscalls.
David Smith [Mon, 20 Apr 2015 21:28:04 +0000 (16:28 -0500)]
Fix PR18284 by improving support/testing for some rt_* syscalls.

* tapset/linux/syscalls2.stp (rt_sigqueueinfo): Import argstr formatting
  by decoding siginfo structure.
  (rt_sigsuspend): Add argstr formatting of new 'set_uaddr' and
  'sigsetsize' convenience variables.
  (rt_sigtimedwait): Add s390x fix and decode sigset, siginfo, and
  timespec structures in argstr.
  (rt_tgsigqueueinfo): New probe.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_stp_siginfo_u): New function.
  (_stp_compat_siginfo_u): Ditto.
* runtime/linux/compat_siginfo.h: New file.
* testsuite/buildok/syscalls2-detailed.stp: Test new syscall probe
  features.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/aux-syscalls-embedded.stp: Add tests for new
  functions.
* testsuite/systemtap.syscall/coverage.tcl: Add rt_sigreturn as an
  untestable syscall.
* testsuite/systemtap.syscall/rt_signal.c: Improve testing and add testing
  for rt_sigsuspend() and rt_tgsigqueueinfo().

9 years agoChange aux_syscalls.stp to print the failing address instead of "UNKNOWN".
David Smith [Mon, 20 Apr 2015 21:07:53 +0000 (16:07 -0500)]
Change aux_syscalls.stp to print the failing address instead of "UNKNOWN".

* tapset/linux/aux_syscalls.stp (_struct_rlimit_u): Instead of "UNKNOWN",
  print the address when memory can't be read.
  (_stp_sigset_u): Ditto.
  (_stp_compat_sigset_u): Ditto.
  (get_mmap_args): Ditto.
  (_struct_sigaction_u): Ditto.
  (_struct_sigaction32_u): Ditto.
  (_struct_old_sigaction32_u): Ditto.
  (_sync_file_range_flags_str): Make "pure".
* tapset/linux/syscalls2.stp: Adjust argstr formatting in several probes.
* tapset/linux/nd_syscalls2.stp: Adjust argstr formatting in several
  probes. Also add an s390 fix in nd_syscall.sync_file_range and an i686
  fix to nd_syscall.syncfs.
* testsuite/systemtap.syscall/accept.c: Expect new output.
* testsuite/systemtap.syscall/alarm.c: Ditto.
* testsuite/systemtap.syscall/chroot.c: Ditto.
* testsuite/systemtap.syscall/dcookie.c: Ditto.
* testsuite/systemtap.syscall/getrlimit.c: Ditto.
* testsuite/systemtap.syscall/ioperm.c: Ditto.
* testsuite/systemtap.syscall/signal.c: Ditto.

9 years agoman error::dwarf, add CONFIG_DEBUG_INFO_SPLIT caution
Frank Ch. Eigler [Sun, 19 Apr 2015 23:58:06 +0000 (19:58 -0400)]
man error::dwarf, add CONFIG_DEBUG_INFO_SPLIT caution

9 years agoAddress bz1111106 comments 5 and 6.
Martin Cermak [Wed, 15 Apr 2015 11:34:19 +0000 (13:34 +0200)]
Address bz1111106 comments 5 and 6.

9 years agoFixed PR18262 by adding support for the sync_file_range/syncfs syscalls.
David Smith [Tue, 14 Apr 2015 15:30:13 +0000 (10:30 -0500)]
Fixed PR18262 by adding support for the sync_file_range/syncfs syscalls.

* tapset/linux/syscalls2.stp: Add support for 'sync_file_range' and
  'syncfs'.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_sync_file_range_flags_str): New function.
* tapset/arm/registers.stp (_stp_arg): Allow argument 7 to be fetched.
* testsuite/systemtap.syscall/sync_file_range.c: New test case.
* testsuite/systemtap.syscall/syncfs.c: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Added build test cases for
  'sync_file_range' and 'syncfs'.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added build test case for
  _sync_file_range_flags_str().

9 years agoImprove testsuite/buildok/map_probe_cond.stp.
David Smith [Tue, 14 Apr 2015 15:20:45 +0000 (10:20 -0500)]
Improve testsuite/buildok/map_probe_cond.stp.

* testsuite/buildok/map_probe_cond.stp: Instead of depending on the
debuginfo for 'ls' to be installed, just probe 'stap'.

9 years agoman stapprobes: emphasize that dwarf debuginfo is probe-point-specific
Frank Ch. Eigler [Tue, 14 Apr 2015 01:04:40 +0000 (21:04 -0400)]
man stapprobes: emphasize that dwarf debuginfo is probe-point-specific

(This is to further disabuse folks of the notion that kernel-debuginfo
is always needed.)

9 years agoAdd some syscall test case tweaks for arm.
David Smith [Mon, 13 Apr 2015 16:21:26 +0000 (11:21 -0500)]
Add some syscall test case tweaks for arm.

* testsuite/systemtap.syscall/keyctl.c: Small fix to get test working on
  arm kernel.
* testsuite/systemtap.syscall/shmat.c: Ditto.

9 years agoAdd some arm-specific syscall tapset fixes.
David Smith [Fri, 10 Apr 2015 20:36:46 +0000 (15:36 -0500)]
Add some arm-specific syscall tapset fixes.

* tapset/linux/syscalls.stp (syscall.fadvise64_64): Add arm fix.
* tapset/linux/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/keyctl.c: Ditto.
* testsuite/systemtap.syscall/shmat.c: Small expected output fix.

9 years agoRHBZ1121363: make dracut module directory configurable
Frank Ch. Eigler [Fri, 10 Apr 2015 18:46:10 +0000 (14:46 -0400)]
RHBZ1121363: make dracut module directory configurable

The place where dracut loads modules for the "service systemtap onboot ..."
facility is fixed, but we want its subdirectory to be configurable,
so that different stap installations can avoid stepping on each other.
So now "configure --with-dracutstap=DRACUT_D/MODULEDIR" is available.

9 years agoFix PR13481 by handling arguments passed on the arm stack.
David Smith [Fri, 10 Apr 2015 16:06:09 +0000 (11:06 -0500)]
Fix PR13481 by handling arguments passed on the arm stack.

* tapset/arm/registers.stp (_stp_get_stack_nth): New function to get
  arguments from the stack.
  (_stp_arg): Add support for getting arguments 5 and 6.
  (longlong_arg): Adjust argument numbers when needed.
* tapset/linux/nd_syscalls2.stp (nd_syscall.readahead): Add fix for arm.

9 years agoAdd fallback to line table and low_pc for function source file/line.
Mark Wielaard [Fri, 10 Apr 2015 15:53:08 +0000 (17:53 +0200)]
Add fallback to line table and low_pc for function source file/line.

Some DWARF producers (golang) don't emit any decl_file/line/col information.
For function DIEs we can sometimes still retrieve that information based on
the low_pc address the debug line table. Add a new fallback function
dwflpp::pc_line that returns file/line/col information based on pc address
in the current CU.

9 years agoImprove dwflpp::loc2c_error semantic error.
Mark Wielaard [Fri, 10 Apr 2015 13:09:31 +0000 (15:09 +0200)]
Improve dwflpp::loc2c_error semantic error.

When the dwflpp::loc2c callback was called from loc2c.c code on failure
to translate a location to a C expression we would loose all context.
Keep track of the pc location and context DIE we are trying to translate
so we can add more details to the error message shown to the user.

9 years agoCannot create noncontig union type larger than 64 bits.
Mark Wielaard [Fri, 10 Apr 2015 13:04:17 +0000 (15:04 +0200)]
Cannot create noncontig union type larger than 64 bits.

We only can handle integral types of sizes up to 64 bits.
When we see a complex location description like:

location             (exprloc)
[   0] reg0
[   1] piece 8
[   3] reg1
[   4] piece 8

For a type like:

base_type
byte_size            (data1) 16
encoding             (data1) signed (5)
name                 (strp) "__int128"

We'll have to give up, otherwise we'll try to reconstruct the pieces
into a (non-existing) uint128_t type union.

9 years agoFix incorrect calls to @choose_defined in the syscall tapsets.
David Smith [Thu, 9 Apr 2015 20:41:50 +0000 (15:41 -0500)]
Fix incorrect calls to @choose_defined in the syscall tapsets.

9 years agoPR17958 escape DWARF names that aren't C identifier strings.
Mark Wielaard [Thu, 9 Apr 2015 20:17:21 +0000 (22:17 +0200)]
PR17958 escape DWARF names that aren't C identifier strings.

Some language compilers (golang) might output DWARF names that are not
valid C identifier strings. Provide a escaped_indentifier_string ()
function to turn those into valid C identifier strings so the generated
C code compiles cleanly.

9 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Thu, 9 Apr 2015 17:52:55 +0000 (12:52 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

9 years agoUpdated syscall coverage script and COVERAGE comments in syscall test cases.
David Smith [Thu, 9 Apr 2015 17:52:10 +0000 (12:52 -0500)]
Updated syscall coverage script and COVERAGE comments in syscall test cases.

* testsuite/systemtap.syscall/coverage.tcl: Made a couple of small fixes.
* testsuite/systemtap.syscall/dcookie.c: Updated COVERAGE comment.
* testsuite/systemtap.syscall/mmap.c: Ditto.
* testsuite/systemtap.syscall/quotactl.c: Ditto.
* testsuite/systemtap.syscall/stat.c: Ditto.
* testsuite/systemtap.syscall/uname.c: Ditto.

9 years agoPR17959 Allow size-less pointer types.
Mark Wielaard [Thu, 9 Apr 2015 14:51:56 +0000 (16:51 +0200)]
PR17959 Allow size-less pointer types.

golang might produce a DW_TAG_pointer_type without any size. Assume
the size of the pointer is equal to the address size of the DWARF CU
in that case. Otherwise we might try to create values of type uint0_t.

9 years agoAdd a definition of _stp_syscall_get_nr for arm64
William Cohen [Thu, 9 Apr 2015 14:20:50 +0000 (10:20 -0400)]
Add a definition of _stp_syscall_get_nr for arm64

Commit 07cecda4dc to fix the syscall_get_nr for 32-bit arm exposed that
there wasn't a definition of _stp_syscall_get_nr for arm64.  This adds
the needed definition for arm64.

9 years agoPR17957 Allow "raw" DW_OP_call_frame_cfa in location expressions.
Mark Wielaard [Thu, 9 Apr 2015 13:44:26 +0000 (15:44 +0200)]
PR17957 Allow "raw" DW_OP_call_frame_cfa in location expressions.

golang will produce DW_OP_call_frame_cfa; DW_OP_consts: 8; DW_OP_plus
location expressions instead of a simple DW_OP_fbreg 8. It will also not
set DW_AT_frame_base, so the frame base/call frame address isn't really
known.

Accept that pattern by signalling we need the frame base in loc2c.c
translate () if we see any DW_OP_call_frame_cfa and just push the
frame_base onto the expression stack. And in location_from_address ()
assume that if no DW_AT_frame_base is given it was implicitly defined
with an DW_OP_call_frame_cfa (so we'll use the CFA as calculated by the
CFI to define the frame base).

9 years agoFixed PR18213 by fixing getting the syscall number on arm kernels.
David Smith [Wed, 8 Apr 2015 17:01:10 +0000 (12:01 -0500)]
Fixed PR18213 by fixing getting the syscall number on arm kernels.

* runtime/syscall.h: For arm, use our own syscall_get_nr(), since the
  kernel supplied one doesn't work well. Rename all uses of
  syscall_get_nr() to _stp_syscall_get_nr().
* runtime/linux/task_finder.c: Rename  all uses of syscall_get_nr() to
  _stp_syscall_get_nr().
* runtime/linux/task_finder2.c: Ditto.
* tapset/linux/aux_syscalls.stp: Ditto.
* tapset/linux/utrace.stp: Ditto.

9 years agoFix another d_type problem on XFS.
Qiao Nuohan [Tue, 7 Apr 2015 15:33:09 +0000 (10:33 -0500)]
Fix another d_type problem on XFS.

* stap-serverd.cxx (get_server_mok_fingerprints): Call stat() if readdir()
  returns 'DT_UNKNOWN'. Certain filesystems like XFS don't implement
  returning the file type.

9 years agoFix failure of signing modules on XFS.
Qiao Nuohan [Tue, 7 Apr 2015 15:06:33 +0000 (10:06 -0500)]
Fix failure of signing modules on XFS.

* stap-serverd.cxx (mok_dir_valid_p): Call stat() if readdir() returns
  'DT_UNKNOWN'. Certain filesystems like XFS don't implement returning the
  file type.

9 years agoAdded several small syscall tapset/testsuite fixes.
David Smith [Wed, 1 Apr 2015 15:38:07 +0000 (10:38 -0500)]
Added several small syscall tapset/testsuite fixes.

* tapset/linux/syscalls.stp: Fixed syscall.execveat and added a fix for
  arm in syscall.fadvise64.
* tapset/linux/nd_syscalls.stp: Added a fix for arm in
  nd_syscall.fadvise64.
* tapset/linux/x86_64/syscalls.stp: Fixed syscall.compat_execve.
* testsuite/systemtap.syscall/getrlimit.c: Updated COVERAGE comment.
* testsuite/systemtap.syscall/syscall.exp: Minor test output
  improvement.
* testsuite/systemtap.syscall/nd_syscall.exp: Ditto.
* testsuite/systemtap.syscall/uname.c: New testcase.

9 years agoFixed PR18159 by improving the [nd_]syscall.ptrace probes.
David Smith [Wed, 1 Apr 2015 14:43:48 +0000 (09:43 -0500)]
Fixed PR18159 by improving the [nd_]syscall.ptrace probes.

* tapset/linux/syscalls2.stp (syscall.ptrace): Updated and added compat
  support.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_stp_struct_iovec_u): New function.
  (_stp_struct_compat_iovec_u): Ditto.
  (_ptrace_options_str): Updated.
  (_stp_elf_notes_str): New function.
  (__ptrace_request_str): Updated.
* tapset/linux/arm/aux_syscalls.stp: Updated.
* tapset/linux/arm64/aux_syscalls.stp: Ditto.
* tapset/linux/i386/aux_syscalls.stp: Ditto.
* tapset/linux/ia64/aux_syscalls.stp: Ditto.
* tapset/linux/powerpc/aux_syscalls.stp: Ditto.
* tapset/linux/s390/aux_syscalls.stp: Ditto.
* tapset/linux/x86_64/aux_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/ptrace.c: New testcase.
* testsuite/buildok/aux_syscalls-embedded.stp: Added new tests.

9 years agoAdd syscall test coverage per PR18151:
Martin Cermak [Wed, 1 Apr 2015 06:53:46 +0000 (08:53 +0200)]
Add syscall test coverage per PR18151:

* tapset/linux/syscalls.stp: Fix syscall.{[compat_]lookup_dcookie,
  iopl,mincore} probes.
* tapset/linux/nd_syscalls.stp: Fix nd_syscall.{[compat_]lookup_dcookie,
  iopl,mincore} probes.
* tapset/linux/x86_64/syscalls.stp: Add syscall.compat_lookup_dcookie probe.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/powerpc/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Add nd_syscall.compat_lookup_dcookie probe.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/powerpc/nd_syscalls.stp: Ditto.
* tapset/linux/i386/syscalls.stp: Fix syscall.iopl probe.
* tapset/linux/i386/nd_syscalls.stp: Fix nd_syscall.iopl probe.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Add testcases.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/syscalls-arch-detailed.stp: Ditto.
* testsuite/buildok/syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/chroot.c: New testcase.
* testsuite/systemtap.syscall/dcookie.c: New testcase.
* testsuite/systemtap.syscall/forkwait.c: Cover getpid(), getppid() and gettid().
* testsuite/systemtap.syscall/ioperm.c: Cover iopl().
* testsuite/systemtap.syscall/mincore.c: New testcase.

9 years agodont build beginners guide if configured with disable-docs
Abegail Jakop [Mon, 30 Mar 2015 20:03:05 +0000 (16:03 -0400)]
dont build beginners guide if configured with disable-docs

9 years agostap2perf: update with perf -x/-a option reordering, as per BZ1207213
Frank Ch. Eigler [Mon, 30 Mar 2015 18:40:28 +0000 (14:40 -0400)]
stap2perf: update with perf -x/-a option reordering, as per BZ1207213

9 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Mon, 30 Mar 2015 15:35:41 +0000 (10:35 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

9 years agoChanged spin-rawhide git-description to match fedora package guidelines
Lukas Berk [Mon, 30 Mar 2015 12:20:09 +0000 (08:20 -0400)]
Changed spin-rawhide git-description to match fedora package guidelines

Prerelease snapshots require a YYYYMMDDgit<hash> style release version according
to fedora package guidelines.  Changing spin-rawhide to produce the same

9 years agoscripts/stap2perf: generate 'perf probe' command lines
Frank Ch. Eigler [Fri, 27 Mar 2015 22:55:49 +0000 (18:55 -0400)]
scripts/stap2perf: generate 'perf probe' command lines

As a tool to help diagnose suspected kernel kprobes/uprobes
problems, this script may be helpful to generate "perf probe ..."
command lines from a stap script or probe pattern.

9 years agotestsuite helpout.exp: run more simply in build tree for !installcheck case
Frank Ch. Eigler [Thu, 26 Mar 2015 20:26:29 +0000 (16:26 -0400)]
testsuite helpout.exp: run more simply in build tree for !installcheck case

9 years agonumerous small coverity fixes
Frank Ch. Eigler [Thu, 26 Mar 2015 20:21:06 +0000 (16:21 -0400)]
numerous small coverity fixes

A mixture of stuff noted for stap 2.7, like missing rc checks, c++ POD
member initialization, @perf() array checks.  No actual bugs appear in
this batch, but it should make coverity happier in the future.

9 years agotestsuite: split additional_scripts.exp at installtest_p point
Frank Ch. Eigler [Thu, 26 Mar 2015 20:20:09 +0000 (16:20 -0400)]
testsuite: split additional_scripts.exp at installtest_p point

Some of the tests require stap -p5; segregate those at the bottom,
protected by [installtest_p], so the rest of the test still runs &
passes at "make check".

9 years agoPR18162: map aarch64->arm64 for stap-server -a use
Frank Ch. Eigler [Wed, 25 Mar 2015 19:51:48 +0000 (15:51 -0400)]
PR18162: map aarch64->arm64 for stap-server -a use

There are two "uname -m" -> linux $ARCH mappings
in the source tree.  They got out of whack for aarch64.
They are now back in whack.

+  # NB: see also util.cxx (normalize_machine)
+  // NB repeated: see also stap-env (stap_get_arch)

9 years agoinstall beginners guide pdf only if it was generated
Abegail Jakop [Wed, 25 Mar 2015 15:07:35 +0000 (11:07 -0400)]
install beginners guide pdf only if it was generated

9 years agouse -p when making dirs for beginners guide
Abegail Jakop [Tue, 24 Mar 2015 15:40:44 +0000 (11:40 -0400)]
use -p when making dirs for beginners guide

9 years agoremove enable-publican from update-docs script
Abegail Jakop [Fri, 20 Mar 2015 21:08:26 +0000 (17:08 -0400)]
remove enable-publican from update-docs script

9 years agoskip xml validation when generating Beginners guide
Abegail Jakop [Fri, 20 Mar 2015 20:40:28 +0000 (16:40 -0400)]
skip xml validation when generating Beginners guide

when running xmlto use --skip-validation, to ignore the issues it may
have with loading the dtd files.

9 years agoremove need for xvfb to generate beginners guide
Abegail Jakop [Thu, 19 Mar 2015 15:36:15 +0000 (11:36 -0400)]
remove need for xvfb to generate beginners guide

using xvfb was for a workaround to an issue with publican mentioned
in BZ920216. since the beginners guide docs are generated using xmlto
instead of publican, no longer need the to check for xvfb

9 years agolimit content in beginners guide to generic info
Abegail Jakop [Wed, 18 Mar 2015 13:49:00 +0000 (09:49 -0400)]
limit content in beginners guide to generic info

*.xml : remove content where the content is specific to either fedora or
rhel.
*html.xsl: include a title between the nav buttons at the top of the page

9 years agogenerate beginners guide with xmlto instead of publican
Abegail Jakop [Tue, 17 Mar 2015 16:31:02 +0000 (12:31 -0400)]
generate beginners guide with xmlto instead of publican

the beginners guide is generated when --enable-docs is specified and
xmlto is found.

configure.ac: remove publican specific variables and code chunks, since
the beginners guide docs were the last to use publican. create a new
variable to check if xmlto is available.
doc/beginners/Makefile.am: change the requirement from publican to
xmlto. replace the publican commands for generating the html and pdf
docs to xmlto commands.
systemtap.spec: remove publican requirement

9 years agoadd images, css and xsl files for beginners guide
Abegail Jakop [Tue, 17 Mar 2015 16:21:22 +0000 (12:21 -0400)]
add images, css and xsl files for beginners guide

*/Common_Content: contains images, css and a few xml files for
generating html and pdf files of the beginners guide using xmlto
*/xsl: contains stylesheets for generating html and pdf files of the
beginners guide using xmlto

9 years agoadd entity to xml file for beginners guide
Abegail Jakop [Tue, 17 Mar 2015 16:20:37 +0000 (12:20 -0400)]
add entity to xml file for beginners guide

9 years agoTurn prologue searching on by default for ppc64le in the testsuite.
Martin Cermak [Wed, 25 Mar 2015 16:58:00 +0000 (17:58 +0100)]
Turn prologue searching on by default for ppc64le in the testsuite.

9 years agoFix PR18143 by updating tapset/linux/target_set.stp.
David Smith [Fri, 20 Mar 2015 15:45:53 +0000 (10:45 -0500)]
Fix PR18143 by updating tapset/linux/target_set.stp.

* tapset/linux/target_set.stp: Since [nd_]syscall.fork got split into
  the [nd_]syscall.{fork,vfork,clone} probes, update the tapset to handle
  all 3 probes. Otherwise, we miss clone()/vfork() calls on systems that
  don't support process.{begin,end}.

9 years agoAdd missing 'asmlinkage()' call to the nd_syscall.execveat probe.
David Smith [Fri, 20 Mar 2015 15:39:23 +0000 (10:39 -0500)]
Add missing 'asmlinkage()' call to the nd_syscall.execveat probe.

9 years agoUpdate COVERAGE comment in testsuite/systemtap.syscall/readdir.c.
David Smith [Thu, 19 Mar 2015 21:25:45 +0000 (16:25 -0500)]
Update COVERAGE comment in testsuite/systemtap.syscall/readdir.c.

9 years agoAdjust fix to PR18122 by displaying the number of environment variables.
David Smith [Thu, 19 Mar 2015 21:24:33 +0000 (16:24 -0500)]
Adjust fix to PR18122 by displaying the number of environment variables.

* tapset/linux/aux_syscalls.stp (__count_envp): New function.
  (__count_compat_envp): Ditto.
* tapset/linux/syscalls.stp: Changed execve, compat_execve, execveat, and
  compat_execveat probes to use new __count_envp/__count_compat_envp
  functions to display the number of environment variables (instead of
  displaying the actual environment variables). Displaying the actual
  environment variables can easily overflow MAXSTRINGLEN and doesn't match
  what strace does.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/i386/nd_syscalls.stp: Ditto.
* tapset/linux/i386/syscalls.stp: Ditto.
* tapset/linux/ia64/nd_syscalls.stp: Ditto.
* tapset/linux/ia64/syscalls.stp: Ditto.
* tapset/linux/powerpc/nd_syscalls.stp: Ditto.
* tapset/linux/powerpc/syscalls.stp: Ditto.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added test for new functions.
* testsuite/systemtap.syscall/execve.c: Adjusted regexps for new output.
* testsuite/systemtap.syscall/execveat.c: Ditto.

9 years agoMinor fix to tapset/linux/target_set.stp.
David Smith [Thu, 19 Mar 2015 19:05:01 +0000 (14:05 -0500)]
Minor fix to tapset/linux/target_set.stp.

* tapset/linux/target_set.stp: Remove special test for ia64, since it does
  support dwarfless probes.

9 years agoAdd more syscall testsuite test program fixes.
David Smith [Thu, 19 Mar 2015 17:50:31 +0000 (12:50 -0500)]
Add more syscall testsuite test program fixes.

* testsuite/systemtap.syscall/accept4.c: Test on more systems.
* testsuite/systemtap.syscall/adjtimex.c: Be more forgiving with return
  values.
* testsuite/systemtap.syscall/clone.c: Fix gcc 5 problems.

9 years agoFix PR18122 by fixing/updating [nd_]syscall.{execve,execveat}.
David Smith [Thu, 19 Mar 2015 17:20:20 +0000 (12:20 -0500)]
Fix PR18122 by fixing/updating [nd_]syscall.{execve,execveat}.

* NEWS: Mention deprecation of the 'fd' and 'fd_str' variables in the
  [nd_]syscall.execveat probes.
* tapset/linux/syscalls.stp (syscall.execve): Add 'env_str' convenience
  variable for the list of environment variables. For kernels < 3.7, move
  execve tapset support to arch-specific tapset code so we can catch all
  calls.
  (syscall.compat_execve): Ditto.
  (syscall.execveat): Add 'env_str' convenience variable for the list of
  environment variables.
  (syscall.compat_execveat): Ditto.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (__get_argv): Improve formatting and
  report the difference between an invalid address and a NULL.
  (__get_compat_argv): Ditto.
  (_adjtimex_return_str): Minor improvement.
* tapset/linux/i386/syscalls.stp: Added execve support for kernels < 3.7.
* tapset/linux/i386/nd_syscalls.stp: Ditto.
* tapset/linux/ia64/syscalls.stp: Ditto.
* tapset/linux/ia64/nd_syscalls.stp: Ditto.
* tapset/linux/powerpc/syscalls.stp: Ditto.
* tapset/linux/powerpc/nd_syscalls.stp: Ditto.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/syscall.exp: No longer use '--skip-badvars'
  when compiling module.
* testsuite/systemtap.syscall/nd_syscall.exp: Ditto.
* testsuite/buildok/nd_syscalls-detailed.stp: Updated.
* testsuite/buildok/syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/execveat.c: Improved a bit.
* testsuite/systemtap.syscall/execve.c: New test case.

9 years agoFix syscall testsuite compilation problems with gcc 5.
David Smith [Thu, 19 Mar 2015 14:39:53 +0000 (09:39 -0500)]
Fix syscall testsuite compilation problems with gcc 5.

* testsuite/systemtap.syscall/fallocate.c: Fix compilation problems with
  gcc 5.
* testsuite/systemtap.syscall/flock.c: Ditto.
* testsuite/systemtap.syscall/futex.c: Ditto.
* testsuite/systemtap.syscall/futimes.c: Ditto.
* testsuite/systemtap.syscall/fxattr.c: Ditto.
* testsuite/systemtap.syscall/getpeername.c: Ditto.
* testsuite/systemtap.syscall/ioctl.c: Ditto.
* testsuite/systemtap.syscall/ioprio.c: Ditto.
* testsuite/systemtap.syscall/lxattr.c: Ditto.
* testsuite/systemtap.syscall/mempolicy.c: Ditto.
* testsuite/systemtap.syscall/mknod.c: Ditto.
* testsuite/systemtap.syscall/modify_ldt.c: Ditto.
* testsuite/systemtap.syscall/module.c: Ditto.
* testsuite/systemtap.syscall/mq.c: Ditto.
* testsuite/systemtap.syscall/nfsservctl.c: Ditto.
* testsuite/systemtap.syscall/nice.c: Ditto.
* testsuite/systemtap.syscall/poll.c: Ditto.
* testsuite/systemtap.syscall/readahead.c: Ditto.
* testsuite/systemtap.syscall/rt_signal.c: Ditto.
* testsuite/systemtap.syscall/sched_setaffinity.c: Ditto.
* testsuite/systemtap.syscall/sigmask.c: Ditto.
* testsuite/systemtap.syscall/signal.c: Ditto.
* testsuite/systemtap.syscall/socketpair.c: Ditto.
* testsuite/systemtap.syscall/statfs.c: Ditto.
* testsuite/systemtap.syscall/tee.c: Ditto.
* testsuite/systemtap.syscall/xattr.c: Ditto.

9 years agoPR18120 - Test coverage for adjtimex, arch_prctl, brk, capget, capset
Martin Cermak [Thu, 19 Mar 2015 10:05:01 +0000 (11:05 +0100)]
PR18120 - Test coverage for adjtimex, arch_prctl, brk, capget, capset

* tapset/linux/aux_syscalls.stp: String representation of timex struct,
  String representation of arch_prctl option argument.
* tapset/linux/nd_syscalls.stp: String representation of timex struct.
* tapset/linux/syscalls.stp: Ditto + fix types.
* tapset/linux/x86_64/nd_syscalls.stp: String representation of
  arch_prctl option argument.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Updated testcase.
* testsuite/buildok/nd_syscalls-detailed.stp: Likewise.
* testsuite/buildok/syscalls-arch-detailed.stp: Likewise.
* testsuite/buildok/syscalls-detailed.stp: Likewise.
* testsuite/systemtap.syscall/adjtimex.c: New testcase.
* testsuite/systemtap.syscall/arch_prctl.c: Likewise.
* testsuite/systemtap.syscall/brk.c: Likewise.
* testsuite/systemtap.syscall/capability.c: Likewise.

9 years agoPR18115: add testcase map_probe_cond.stp
Jonathan Lebon [Mon, 16 Mar 2015 16:25:08 +0000 (12:25 -0400)]
PR18115: add testcase map_probe_cond.stp

9 years agoPR18115: use begin probe to initialize conditions
Jonathan Lebon [Sat, 14 Mar 2015 19:38:51 +0000 (15:38 -0400)]
PR18115: use begin probe to initialize conditions

We previously initialized the cond_enabled field by evaluating the
conditions during systemtap_module_init(). However, these conditions may
create tmpvars during unparsing (e.g. maps), which require a context to
operate. Therefore, we instead create a synthetic begin probe which will
serve to initialize all cond_enabled fields (or more precisely, switch
them to 0 from their default of 1 if the condition is false).

As a bonus, this allows us to re-use emit_probe_condition_update() for
both condition initialization and updating, and thus to get rid of
emit_probe_condition_initialize().

9 years agoPR18115: make c_tmpcounter visit probe conditions
Jonathan Lebon [Mon, 16 Mar 2015 16:05:38 +0000 (12:05 -0400)]
PR18115: make c_tmpcounter visit probe conditions

Probe conditions may require tmpvars when being unparsed (e.g. maps).
These tmpvars need to be accounted by the tmpcounter so that tmpvar
declaration and usage match up.

9 years agoFix syntax error in tapset/linux/s390/syscalls.stp
Martin Cermak [Fri, 13 Mar 2015 10:54:06 +0000 (11:54 +0100)]
Fix syntax error in tapset/linux/s390/syscalls.stp

9 years agoFixed PR18121 by adding fallocate() syscall tapset support.
David Smith [Thu, 12 Mar 2015 15:35:08 +0000 (10:35 -0500)]
Fixed PR18121 by adding fallocate() syscall tapset support.

* tapset/linux/syscalls.stp (syscall.fallocate): New probe.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/powerpc/syscalls.stp (syscall.compat_fallocate): New probe.
* tapset/linux/powerpc/nd_syscalls.stp: Ditto.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_stp_fallocate_mode_str): New function.
* testsuite/systemtap.syscall/fallocate.c: New test case.
* testsuite/buildok/aux_syscalls-embedded.stp: Added
  _stp_fallocate_mode_str test.
* testsuite/buildok/syscalls-detailed.stp: Added fallocate test.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.

9 years agoFix fadvise64 long long handling and lots of small test case fixes.
David Smith [Thu, 12 Mar 2015 14:13:33 +0000 (09:13 -0500)]
Fix fadvise64 long long handling and lots of small test case fixes.

* tapset/linux/syscalls.stp: Fixed 64-bit handling in syscall.fadvise64
  and syscall.fadvise64_64.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Added some whitespace for clarity.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_fadvice_advice_str): Improved s390 support.
* tapset/linux/powerpc/syscalls.stp (compat_readahead.return): Fixed
  retstr generation.
  (compat_fadvise64): New probe.
  (compat_fadvise64_64): New probe.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* tapset/linux/powerpc/nd_syscalls.stp (compat_fadvise64): New probe.
  (syscall.compat_fadvise64_64)
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* testsuite/buildok/syscalls-detailed.stp: Added tests for
  compat_fadvise64 and compat_fadvise64_64.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/fadvise64.c: Add fadvise64 testing.
* testsuite/systemtap.syscall/accept4.c: Improve compilation on systems
  where accept4 isn't supported.
* testsuite/systemtap.syscall/domainname.c: Loosen error code checking.
* testsuite/systemtap.syscall/eventfd.c: Improve compilation on systems
  without eventfd2.
* testsuite/systemtap.syscall/exit_group.c: Minor fix.
* testsuite/systemtap.syscall/inotify.c: Improve compilation on systems
  without inotify_init1.
* testsuite/systemtap.syscall/numa.c: Loosen error code checking.
* testsuite/systemtap.syscall/preadv.c: Improve compilation on systems
  without preadv.
* testsuite/systemtap.syscall/pwritev.c: Improve compilation on systems
  without pwritev.
* testsuite/systemtap.syscall/readdir.c: Loosen error code checking.

9 years agoFix a typo.
Martin Cermak [Tue, 10 Mar 2015 12:50:59 +0000 (13:50 +0100)]
Fix a typo.

9 years agoPR16716 partial fix: Fix types and nesting.
Martin Cermak [Tue, 10 Mar 2015 06:08:25 +0000 (07:08 +0100)]
PR16716 partial fix: Fix types and nesting.

Fix types and nesting for rt_sigqueueinfo, setdomainname,
setrlimit, splice, vmsplice and tee syscalls.

* tapset/linux/syscalls2.stp: Fix types and nesting.
* tapset/linux/nd_syscalls2.stp: Fix types and nesting.
* tapset/linux/aux_syscalls.stp: Add SPLICE* defs.
* NEWS: Add deprecation note.
* testsuite/buildok/syscalls2-detailed.stp: New testcase.
* testsuite/buildok/nd_syscalls2-detailed.stp: New testcase.
* testsuite/systemtap.syscall/getrlimit.c: Updated testcase.
* testsuite/systemtap.syscall/rt_signal.c: Updated testcase.
* testsuite/systemtap.syscall/domainname.c: New testcase.
* testsuite/systemtap.syscall/tee.c: New testcase.

9 years agosystemtap.spec: aarch64 buildability
Martin Cermak [Mon, 9 Mar 2015 15:45:03 +0000 (16:45 +0100)]
systemtap.spec: aarch64 buildability

9 years agotapset/linux/[nd_]syscalls2.stp: fix syscall.rt_sig{action,pending,procmask} for...
Martin Cermak [Fri, 6 Mar 2015 06:11:26 +0000 (07:11 +0100)]
tapset/linux/[nd_]syscalls2.stp: fix syscall.rt_sig{action,pending,procmask} for s390x

9 years agotapset: add @mm and use it in _stp_get_mm_counter()
Josh Stone [Tue, 3 Mar 2015 22:33:37 +0000 (14:33 -0800)]
tapset: add @mm and use it in _stp_get_mm_counter()

9 years agotapset: avoid PR18079 in task_start_time()
Josh Stone [Tue, 3 Mar 2015 22:27:40 +0000 (14:27 -0800)]
tapset: avoid PR18079 in task_start_time()

Checking @defined(task->real_start_time->tv_sec) doesn't work, so use
@defined(@task(0)->...) instead.

9 years agoPR18079: add a kfail test of @defined(autocast)
Josh Stone [Tue, 3 Mar 2015 22:24:05 +0000 (14:24 -0800)]
PR18079: add a kfail test of @defined(autocast)

9 years agoPR16716 partial fix: Fix types and nesting for 'syscall.readahead'.
Martin Cermak [Tue, 3 Mar 2015 17:17:37 +0000 (18:17 +0100)]
PR16716 partial fix: Fix types and nesting for 'syscall.readahead'.

* tapset/linux/nd_syscalls2.stp: Fix types, don't probe compat tasks.
* tapset/linux/syscalls2.stp: Likewise.
* tapset/linux/powerpc/nd_syscalls.stp: Add compat_readahead probes.
* tapset/linux/powerpc/syscalls.stp: Likewise.
* tapset/linux/s390/nd_syscalls.stp: Likewise.
* tapset/linux/s390/syscalls.stp: Likewise.
* tapset/linux/x86_64/nd_syscalls.stp: Likewise.
* tapset/linux/x86_64/syscalls.stp: Likewise.
* testsuite/buildok/nd_syscalls-arch-detailed.stp:
  Add compat_readahead testcase,
  Fix compat_ftruncate64 and compat_truncate64 testcases.
* testsuite/buildok/syscalls-arch-detailed.stp:
  Add compat_readahead testcase,
* testsuite/systemtap.syscall/readahead.c: New testcase.

9 years agoPR16716 partial fix: Fix types and nesting for 'syscall.{nice,readdir}'.
Martin Cermak [Tue, 3 Mar 2015 08:11:55 +0000 (09:11 +0100)]
PR16716 partial fix: Fix types and nesting for 'syscall.{nice,readdir}'.

* tapset/linux/nd_syscalls2.stp: Fix types, add probe points.
* tapset/linux/syscalls2.stp: Fix types, add probe points.
* testsuite/systemtap.syscall/nice.c
* testsuite/systemtap.syscall/readdir.c

9 years agovim: add minimal highlighting for macro @define
Josh Stone [Tue, 3 Mar 2015 00:56:04 +0000 (16:56 -0800)]
vim: add minimal highlighting for macro @define

9 years agotapset: tag many inline embedded-C blocks as pure
Josh Stone [Mon, 2 Mar 2015 23:18:37 +0000 (15:18 -0800)]
tapset: tag many inline embedded-C blocks as pure

If embedded-C is not explicitly marked pure, then it is assumed to have
side effects, and can never be optimized away.  In many cases, we're
simply referencing a constant value, so this is certainly pure, and
should be tagged so.

This patch doesn't bother updating instances that are in impure contexts
anyway, like the many cases of @__syscall_gate et al. which test the
constant to perhaps issue probe "next".

9 years agoTo avoid syscall tapset problems, turn buildok test warnings into errors.
David Smith [Mon, 2 Mar 2015 22:14:52 +0000 (16:14 -0600)]
To avoid syscall tapset problems, turn buildok test warnings into errors.

* testsuite/buildok/syscalls-detailed.stp: Add '-W' to turn warnings into
  errors.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.

9 years agotapset/linux: Introduce and use @task macro
Josh Stone [Mon, 2 Mar 2015 21:06:06 +0000 (13:06 -0800)]
tapset/linux: Introduce and use @task macro

The @task macro performs the very common @cast to a task_struct.

The embedded-C bodies of task_current() and pid2task() are now wrapped
by @task, which gives them a debuginfo type on the return value.  With
autocast type propagation, this removes the need for any explicit @cast
in many places.

Other places which take untyped task pointers as parameters, for
instance, now use @task as well to simplify their code.

Tangentially related, task_start_time() was broken for a while by the
change of real_start_time from timespec to u64, commit 57e0be041d9e2.
This is fixed and added to buildok/task_test.stp.

9 years agovim: highlight additional macros in embedded-C blocks
Josh Stone [Mon, 2 Mar 2015 19:26:02 +0000 (11:26 -0800)]
vim: highlight additional macros in embedded-C blocks

9 years agovim: highlight inline embedded-C too
Josh Stone [Mon, 2 Mar 2015 19:25:19 +0000 (11:25 -0800)]
vim: highlight inline embedded-C too

For a while now, embedded-C is not just for global blocks and function
bodies, but it can appear as inline expressions too.

9 years agovim: match *.stpm for systemtap syntax
Josh Stone [Mon, 2 Mar 2015 19:23:05 +0000 (11:23 -0800)]
vim: match *.stpm for systemtap syntax

9 years agoregenerate examples indexes
Abegail Jakop [Mon, 2 Mar 2015 17:25:35 +0000 (12:25 -0500)]
regenerate examples indexes

9 years agoadd _best keyword to proctop.meta and example output
Abegail Jakop [Mon, 2 Mar 2015 17:22:14 +0000 (12:22 -0500)]
add _best keyword to proctop.meta and example output

9 years agomodify */proctop.stp to not reset process names
Abegail Jakop [Mon, 2 Mar 2015 17:10:31 +0000 (12:10 -0500)]
modify */proctop.stp to not reset process names

9 years agoexamples README: clarify index-generation
Frank Ch. Eigler [Mon, 2 Mar 2015 16:26:19 +0000 (11:26 -0500)]
examples README: clarify index-generation

Mention .txt files, _best keyword, and index-generator,
to which only a few .meta fields are important.

9 years agoPR10488: add proctop.stp example script
Abegail Jakop [Mon, 2 Mar 2015 16:13:21 +0000 (11:13 -0500)]
PR10488: add proctop.stp example script

proctop.stp: a top-like script that periodically prints out process
information such as state, mem usage and time, while keeping track of
processes that exited while the script was running.

9 years agolisting_mode.exp: add more .nearest tests
Jonathan Lebon [Fri, 27 Feb 2015 15:28:36 +0000 (10:28 -0500)]
listing_mode.exp: add more .nearest tests

9 years agostapprobes.3stap: tweak statement.nearest description
Jonathan Lebon [Fri, 27 Feb 2015 14:51:52 +0000 (09:51 -0500)]
stapprobes.3stap: tweak statement.nearest description

9 years agostmt_rel.exp and vars.exp: adapt to latest kernel
Jonathan Lebon [Mon, 23 Feb 2015 16:10:03 +0000 (11:10 -0500)]
stmt_rel.exp and vars.exp: adapt to latest kernel

The bio.c file was moved from the fs directory to the block directory.
The two test cases stmt_rel.exp and vars.exp used functions from that
file to make some sanity checks. Update the testcases to be more
flexible.

9 years agonearest probes: allow ENUMERATED and WILDCARD linenos
Jonathan Lebon [Fri, 20 Feb 2015 18:24:18 +0000 (13:24 -0500)]
nearest probes: allow ENUMERATED and WILDCARD linenos

This commit reverses commit 2ff2868 which added the restriction of only
allowing .nearest probes on ABSOLUTE and RELATIVE linenos. We now allow
this for all lineno types.

WILDCARD lineno types do not need any special handling for .nearest
probes since the resulting linenos are already known to be correct. For
ENUMERATED linenos however, we now must add .nearest handling: for each
lineno enumerated, if we fail to find an address, we check if there is a
nearby lineno we can instead probe.

This commit also fixes failures in the unprivileged_myproc.exp testcase.
Related PRs: PR17906, PR17986.

9 years agoFixed PR18026 by adding support for timerfd_{create,gettime,settime}.
David Smith [Thu, 26 Feb 2015 15:26:06 +0000 (09:26 -0600)]
Fixed PR18026 by adding support for timerfd_{create,gettime,settime}.

* tapset/linux/syscalls2.stp: Added timerfd_create, timerfd_gettime,
  and timerfd_settime probes.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_stp_timerfd_flags_str): New function.
* runtime/linux/autoconf-timerfd.c: New autoconf test.
* buildrun.cxx (compile_pass): Added timerfd.h autoconf test.
* testsuite/buildok/aux_syscalls-embedded.stp: Added test.
* testsuite/buildok/nd_syscalls2-detailed.stp: Added tests.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/timerfd.c: New test case.

9 years agoMinor improvement to syscall.nfsservctl for RHEL6.
David Smith [Thu, 26 Feb 2015 15:19:26 +0000 (09:19 -0600)]
Minor improvement to syscall.nfsservctl for RHEL6.

9 years agoPR16974: wrap if, try and for tmpvar decls in unions
Abegail Jakop [Wed, 25 Feb 2015 21:48:30 +0000 (16:48 -0500)]
PR16974: wrap if, try and for tmpvar decls in unions

translate.cxx: in c_tmpcounter::visit_block, the tmpvar declarations
in the generated c code are wrapped in a union, with each
block->statements[i] wrapped in a struct, to reduce context memory
allocation. following ::visit_block, the tmpvar declarations in
::visit_if_statement, ::visit_try_block and ::visit_for_loop are
wrapped in a union. since this causes quite a lot of nesting, comments
are added to the generated c code to indicate the source file and
line the struct/union tmpvars correspond to.

9 years agoPR16974: move struct+visit outputting to new fn(s)
Abegail Jakop [Wed, 25 Feb 2015 21:32:17 +0000 (16:32 -0500)]
PR16974: move struct+visit outputting to new fn(s)

translate.cxx: from c_tmpcounter::visit_block(), move the portion
to wrap the statement->visit() part in a struct declaration to a
function, ::wrap_visit_in_struct()

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