]> sourceware.org Git - systemtap.git/log
systemtap.git
10 years agostapprobes.3stap: edited supported probe points
Abegail Jakop [Thu, 10 Jul 2014 14:59:58 +0000 (10:59 -0400)]
stapprobes.3stap: edited supported probe points

stapprobes.3stap: added process(PID).{function, mark, plt, provider}
to the list of supported probe points under DWARF and USER-SPACE.

10 years agolisting_mode.exp: re-ordered test cases
Abegail Jakop [Wed, 9 Jul 2014 21:29:58 +0000 (17:29 -0400)]
listing_mode.exp: re-ordered test cases

listing_mode: moved the test cases for process(number).* probe
points to reflect the ordering in "stap --dump-probe-types".

10 years agolisting_mode*: update to support process(PID).*
Abegail Jakop [Wed, 9 Jul 2014 19:55:56 +0000 (15:55 -0400)]
listing_mode*: update to support process(PID).*

listing_mode.c: add in an infinite loop for generating probe points
to a process running this program over the course of the entire
listing_mode test.
listing_mode.exp: edited portions dependent on the line numbers in the
source code. added tests for the new process(PID).* probe points.

10 years agoPR6897, updated and added test cases
Abegail Jakop [Wed, 9 Jul 2014 14:30:42 +0000 (10:30 -0400)]
PR6897, updated and added test cases

valid_pid.exp: new test case to check that error messages are
produced when a given pid does not corresponds to a running process.

unprivileged_*: updated the test case to include the newly supported
process(PID).{plt, mark, provider, function}.

10 years agotapsets.cxx: validate PID for process(PID)*
Abegail Jakop [Mon, 7 Jul 2014 19:56:09 +0000 (15:56 -0400)]
tapsets.cxx: validate PID for process(PID)*

tapsets: validate PID for process(PID).{function, plt, mark} probes

10 years agotapset-utrace.cxx:check used PID in process probes
Abegail Jakop [Mon, 7 Jul 2014 18:56:20 +0000 (14:56 -0400)]
tapset-utrace.cxx:check used PID in process probes

tapset-utrace: made a change so scripts with process(PID).*
and -x PID2, only validates PID (the relevant pid) and not PID2

10 years agoPR6897 cont'd: process("foo").* handling
Frank Ch. Eigler [Fri, 4 Jul 2014 19:13:55 +0000 (15:13 -0400)]
PR6897 cont'd: process("foo").* handling

After collapsing the process., process(STRING), process(NUM) cases
into a single conditional, we must remember to retest the STRING
case so as to extract the parameter.

10 years agovalidate PID in process(PID).* probes
Abegail Jakop [Fri, 4 Jul 2014 16:00:56 +0000 (12:00 -0400)]
validate PID in process(PID).* probes

elaborate*: new function derived_probe_builder::has_param()
tapset*: added a check to make sure the PID in process(PID).*
probes correspond to a running process.

10 years agoPR16716 partial fix: Fix types in 'syscall.{fdatasync,fstat,fstatat,fsync}'.
David Smith [Thu, 26 Jun 2014 16:32:07 +0000 (11:32 -0500)]
PR16716 partial fix: Fix types in 'syscall.{fdatasync,fstat,fstatat,fsync}'.

* tapset/linux/aux_syscalls.stp (_at_flag_str): Update and improve.
* tapset/linux/syscalls.stp: Fix types in
  syscall.{fdatasync,fstat,fsync}. Fixed types and 32-on-64 support in
  syscall.fstatat and added 'dirfd_str', 'flags', and 'flags_str'
  convenience variables.
* tapset/linux/nd_syscalls.stp: Fixed 32-on-64 bit support in
  nd_syscall.fstatat and added 'dirfd_str', 'flags', and 'flags_str'
  convenience variables.
* testsuite/buildok/syscalls-detailed.stp: Added compile test for new
  syscall.fstatat convenience variables.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/futimes.c: Updated test.
* testsuite/systemtap.syscall/link.c: Ditto.
* testsuite/systemtap.syscall/stat.c: Ditto.
* testsuite/systemtap.syscall/sync.c: Ditto.

10 years agoMerge branch 'ajakop/16300'
Abegail Jakop [Tue, 24 Jun 2014 15:37:30 +0000 (11:37 -0400)]
Merge branch 'ajakop/16300'

10 years agostmt_counting.exp: nested foreach runtime flag
Abegail Jakop [Tue, 24 Jun 2014 15:21:33 +0000 (11:21 -0400)]
stmt_counting.exp: nested foreach runtime flag

stmt_counting.exp: combine the four cases for each test
(no flags, -u, low MAXACTION, high MAXACTION) by using
nested foreach loop for the different runtime flags.

10 years agostmt_counting*: statement counting tests
Abegail Jakop [Tue, 24 Jun 2014 13:29:46 +0000 (09:29 -0400)]
stmt_counting*: statement counting tests

stmt_counting_*.stp: basic tests containing loops, recursion,
straight through function bodies and straight through probe bodies.
stmt_counting.exp: runs the tests with and without -u, and with a
low and a high MAXACTION.

10 years agostapprobes man page: extend NON-DWARF probe section
Frank Ch. Eigler [Tue, 24 Jun 2014 00:39:33 +0000 (20:39 -0400)]
stapprobes man page: extend NON-DWARF probe section

10 years agotapset: in probefunc() doc blurb, recommend ppfunc()
Frank Ch. Eigler [Tue, 24 Jun 2014 00:06:53 +0000 (20:06 -0400)]
tapset: in probefunc() doc blurb, recommend ppfunc()

10 years agocheck.exp: add CHECK_ONLY to restrict tests
Jonathan Lebon [Mon, 23 Jun 2014 16:04:08 +0000 (12:04 -0400)]
check.exp: add CHECK_ONLY to restrict tests

The CHECK_ONLY variable allows the check.exp testcase to only focus on
specific example scripts. E.g.

  make installcheck RUNTESTFLAGS="check.exp" CHECK_ONLY="badname"

10 years agoinitscript: invert logic and fix DEFAULT_START
Jonathan Lebon [Mon, 23 Jun 2014 14:26:52 +0000 (10:26 -0400)]
initscript: invert logic and fix DEFAULT_START

The logic of is_valid_script_name was inverted. Fix it.

Also, we need to blank out the list of scripts to start before actually
collecting the valid ones from DEFAULT_START.

10 years agoHandle DW_TAG_restrict_type.
Mark Wielaard [Sun, 22 Jun 2014 19:23:21 +0000 (21:23 +0200)]
Handle DW_TAG_restrict_type.

C99 keyword restrict is just like const or volatile for pointers. Like
DW_TAG_const_type and DW_TAG_volatile_type just follow through to the
underlying type.

10 years agocoverity fixes
Frank Ch. Eigler [Sat, 21 Jun 2014 00:27:17 +0000 (20:27 -0400)]
coverity fixes

Initializing members, avoiding little memory leaks, all minor stuff.

10 years agoMerge branch 'ajakop/16300'
Abegail Jakop [Fri, 20 Jun 2014 20:47:08 +0000 (16:47 -0400)]
Merge branch 'ajakop/16300'

10 years agotranslate.cxx: edit MAXACTION check error message
Abegail Jakop [Fri, 20 Jun 2014 20:40:58 +0000 (16:40 -0400)]
translate.cxx: edit MAXACTION check error message

10 years agoNEWS: new feature to suppress statement counting
Abegail Jakop [Fri, 20 Jun 2014 20:15:52 +0000 (16:15 -0400)]
NEWS: new feature to suppress statement counting

10 years agoruntime: Add a universal stp_synchronize_sched
Josh Stone [Fri, 20 Jun 2014 16:45:46 +0000 (09:45 -0700)]
runtime: Add a universal stp_synchronize_sched

The kernel has had synchronize_sched for a while.  However, in the RHEL5
era this was merely a #define to synchronize_rcu, which our exportconf
wouldn't detect.  RHEL4 only had synchronize_kernel.

Now stp_synchronize_sched covers all of these options, otherwise issuing
an #error message.

10 years agoAdd test coverage for bz1074541
Martin Cermak [Fri, 20 Jun 2014 12:20:48 +0000 (14:20 +0200)]
Add test coverage for bz1074541

10 years agoPR16716 partial fix: Fix types in '[nd_]syscall.eventfd'.
David Smith [Thu, 19 Jun 2014 20:50:25 +0000 (15:50 -0500)]
PR16716 partial fix: Fix types in '[nd_]syscall.eventfd'.

* tapset/linux/syscalls.stp (syscall.eventfd): Better handle eventfd()
  vs. eventfd2(). Add 'count' and 'flags_str' convenience variables. Fix
  types.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_eventfd2_flag_str): Updated and improved.
* runtime/linux/compat_unistd.h (__NR_compat_eventfd2): New define.
* testsuite/systemtap.syscall/eventfd.c: Add more tests.
* testsuite/buildok/syscalls-detailed.stp: Add tests for new convenience
  variables.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.

10 years ago::functioncall_visitor tracks seen and nested call
Abegail Jakop [Thu, 19 Jun 2014 20:32:14 +0000 (16:32 -0400)]
::functioncall_visitor tracks seen and nested call

this change is for functioncall_traversing_visitor

elaborate.cxx: changed instances of *traversed* to *seen*
staptree.cxx: changed ::functioncall_visitor in
functioncall_traversing_visitor to keep track of nested function calls
and kept the old functionality of keeping track of function calls seen.
staptree.h: remove traversed set from functioncall_traversing_visitor,
replacing it with a seen set, and a nested set.
translate.cxx: edited comment to reflect change in visitor

10 years agoMinor testsuite updates.
David Smith [Thu, 19 Jun 2014 17:33:52 +0000 (12:33 -0500)]
Minor testsuite updates.

* testsuite/lib/compile_flags.exp: Added a bit more aarch64 support.
* testsuite/systemtap.base/bz1027459.exp: Only run on make
  installcheck. Clean up better after a 'spawn'.
* testsuite/systemtap.base/task_dentry_path.exp: Only run on make
  installcheck.
* testsuite/systemtap.base/wordexp.exp: Ditto.
* testsuite/systemtap.server/server_locale.exp: Ditto.

10 years agotranslate.cxx: statement counting for functions
Abegail Jakop [Wed, 18 Jun 2014 14:15:05 +0000 (10:15 -0400)]
translate.cxx: statement counting for functions

translate.cxx: added counting statements to be executed, and a check
against that number with MAXACTION to determine if statement counting
within a function's generated c code gets suppressed. allow users to
turn this off by running script in unoptimized mode.

10 years agodirect_rec_func.stp: direct recursion test case
Abegail Jakop [Tue, 17 Jun 2014 20:58:34 +0000 (16:58 -0400)]
direct_rec_func.stp: direct recursion test case

10 years agotranslate.cxx: unoptimized statement counting
Abegail Jakop [Tue, 17 Jun 2014 20:16:28 +0000 (16:16 -0400)]
translate.cxx: unoptimized statement counting

translate.cxx: allow for users to turn off the optimized statement
counting, reverting to the statement counting being in generated
c code, through unoptimize mode.

10 years agoset statement count to max for recursion
Abegail Jakop [Tue, 17 Jun 2014 20:07:32 +0000 (16:07 -0400)]
set statement count to max for recursion

staptree.h: added virtual function note_recursive_functioncall

staptree.cxx: implemented function note_recursive_functioncall as {}

translate.cxx: implemented note_recursive_functioncall for
max_action_info to set the estimated statement count to be set to max.

10 years agostap.1: note MAXACTION is treated conservatively
Abegail Jakop [Tue, 17 Jun 2014 19:32:16 +0000 (15:32 -0400)]
stap.1: note MAXACTION is treated conservatively

10 years agoPR16300: switch back to nested visitors for visit_if_statement
Frank Ch. Eigler [Tue, 17 Jun 2014 15:26:16 +0000 (11:26 -0400)]
PR16300: switch back to nested visitors for visit_if_statement

This reverts commit 450cc664d02ec242327e63a84534aacb1c998c6d.

10 years agotranslate.cxx: suppress action counting in c code
Abegail Jakop [Tue, 17 Jun 2014 14:41:59 +0000 (10:41 -0400)]
translate.cxx: suppress action counting in c code

translate.cxx: moved the statement counting portion to ::emit_probe().
added in a check against MAXACTION, which determines if statement
counting within the generated c code gets suppressed.

10 years agotranslate.cxx: fix counting in max_action_info
Abegail Jakop [Fri, 13 Jun 2014 18:35:07 +0000 (14:35 -0400)]
translate.cxx: fix counting in max_action_info

translate.cxx: removed the creation of temporary visitors to visit
the thenblock and elseblock in visit_if_statement in max_action_info
because of errors with recursive calls. now uses only one visitor
to visit blocks.

10 years agoAdd fix for i686 syscall.{chmod,fchmod,fchmodat}.
David Smith [Mon, 16 Jun 2014 15:52:38 +0000 (10:52 -0500)]
Add fix for i686 syscall.{chmod,fchmod,fchmodat}.

* tapset/linux/syscalls.stp: In syscall.{chmod,fchmod,fchmodat}, fix
  'mode' value for i686.

10 years agoConvert more tests to use compile_flags.exp functions for compile flags.
David Smith [Mon, 16 Jun 2014 14:21:44 +0000 (09:21 -0500)]
Convert more tests to use compile_flags.exp functions for compile flags.

* testsuite/lib/compile_flags.exp (arch_compile_flag_bits): New function.
* testsuite/systemtap.base/func_alias.exp: Convert to use
  testsuite/lib/compile_flags.exp for compile flags, ABIs, etc.
* testsuite/systemtap.base/hash_add_buildid.exp: Ditto.
* testsuite/systemtap.base/utrace_syscall_args.exp: Ditto.
* testsuite/systemtap.base/vma_vdso.exp: Ditto.
* testsuite/systemtap.context/fib.exp: Ditto.
* testsuite/systemtap.syscall/nd_syscall.exp: Ditto.
* testsuite/systemtap.syscall/syscall.exp: Ditto.

10 years agoruntime: Make sure to free special message buffers too
Josh Stone [Fri, 13 Jun 2014 23:12:34 +0000 (16:12 -0700)]
runtime: Make sure to free special message buffers too

These special buffers were formerly kept aside, and never released back
to the memory pool, so they weren't freed either.  DEBUG_MEM did report
this leak properly.  Now these are freed too, and a new debug_mem.exp
test ensures that a simple script doesn't leak any memory.

10 years agoPR17052: Use RCU-sched for freeing contexts
Josh Stone [Fri, 13 Jun 2014 21:47:54 +0000 (14:47 -0700)]
PR17052: Use RCU-sched for freeing contexts

A context is grabbed from the _stp_ctl_work_callback timer, but it
doesn't actually need it for anything other than preventing a lock
recursion.  Since this timer is still running while we are freeing the
contexts, there's a chance to race on the existence of contexts.

Using rcu_assign_pointer, rcu_dereference_sched, and synchronize_sched,
we can make sure that anyone who might have seen the existing contexts
has finished before we free them.

10 years agoman/systemtap.8: mention naming requirement
Jonathan Lebon [Fri, 13 Jun 2014 17:33:49 +0000 (13:33 -0400)]
man/systemtap.8: mention naming requirement

Add blurb to clarify that script names must be alphanumeric and must not
start with a number.

10 years agoinitscript: check script names
Jonathan Lebon [Fri, 13 Jun 2014 17:24:36 +0000 (13:24 -0400)]
initscript: check script names

Because script names are the basis for some variable names (e.g.
script_name_REQ), they need to adhere to bash variable naming rules.
These are almost the same rules that we enforce for stap -m, so we just
fail 'earlier'. See also RHBZ1109084.

This patch ensures that scripts with invalid names are skipped and
logged.

10 years agoinitscript: use SYSTEMCTL_SKIP_REDIRECT
Jonathan Lebon [Fri, 13 Jun 2014 14:45:03 +0000 (10:45 -0400)]
initscript: use SYSTEMCTL_SKIP_REDIRECT

The SYSTEMCTL_SKIP_REDIRECT variable allows us to avoid being 'handled'
by systemd when users use the legacy 'service' command. This is
necessary in our case because systemctl omits the parameters passed to
the 'service' command for standard service actions such as start/stop.

10 years agokernel_string_quoted(): remove /* myproc */ marker
Jonathan Lebon [Thu, 12 Jun 2014 18:12:32 +0000 (14:12 -0400)]
kernel_string_quoted(): remove /* myproc */ marker

Bad bad Jonathan!

10 years agoRevert "execve.exp: don't double quote result_string."
Jonathan Lebon [Thu, 12 Jun 2014 17:46:10 +0000 (13:46 -0400)]
Revert "execve.exp: don't double quote result_string."

This reverts commit 2b3a0f4d58496f2928d9785d6f09825480df0ca4.

This commit was initially required because execve would not pass on
RHEL6, which relied on kernel_string() rather than user_string_quoted().
With the new kernel_string_quoted() function, this test should pass on
all platforms.

10 years agosyscalls: use kernel_string_quoted()
Jonathan Lebon [Thu, 12 Jun 2014 17:48:38 +0000 (13:48 -0400)]
syscalls: use kernel_string_quoted()

To be consistent with the rest of the tapset, which uses
user_string_quoted(), use kernel_string_quoted() here so that the
strings are quoted.

10 years agoconversions.stp: new kernel_string_quoted() function
Jonathan Lebon [Thu, 12 Jun 2014 17:34:06 +0000 (13:34 -0400)]
conversions.stp: new kernel_string_quoted() function

Just like user_string_quoted(), the new kernel_string_quoted() function
returns the resulting string in quotes if it successfully retrieved the
string and the pointer address otherwise.

10 years agoMerge branch 'ajakop/16300'
Abegail Jakop [Thu, 12 Jun 2014 15:30:38 +0000 (11:30 -0400)]
Merge branch 'ajakop/16300'

10 years agocount max statements in probes in translate.cxx
Abegail Jakop [Thu, 12 Jun 2014 14:13:18 +0000 (10:13 -0400)]
count max statements in probes in translate.cxx

translate.cxx: counts the maximum number of statements expected
to be executed for each probe, in pass 3. results are printed when
verbosity is > 1. probes with for/foreach statements have a
reported statement count of ~0.

10 years agolisting_mode.exp: use stap itself to get addr of vfs_read
Jonathan Lebon [Wed, 11 Jun 2014 18:06:07 +0000 (14:06 -0400)]
listing_mode.exp: use stap itself to get addr of vfs_read

On older platforms, the addresses obtained from /proc/kallsyms show up
as 0 for non-root users. So instead, we use stap itself to retrieve the
address of vfs_read which is later used for testing.

10 years agolisting_mode.exp: don't test Java probes if unsupported
Jonathan Lebon [Wed, 11 Jun 2014 17:51:40 +0000 (13:51 -0400)]
listing_mode.exp: don't test Java probes if unsupported

If stap was not built with Java support, then we shouldn't test them.

10 years agolib/systemtap.exp: add callee_probes_p proc
Jonathan Lebon [Wed, 11 Jun 2014 17:34:36 +0000 (13:34 -0400)]
lib/systemtap.exp: add callee_probes_p proc

Rather than checking for the conditions for callee support in various
testcases, add a callee_probes_p proc in lib/systemtap.exp and use that
instead where needed.

10 years agolib/systemtap.exp: rename hw_breakpoint_p to hwbkpt_probes_p
Jonathan Lebon [Wed, 11 Jun 2014 17:28:51 +0000 (13:28 -0400)]
lib/systemtap.exp: rename hw_breakpoint_p to hwbkpt_probes_p

To be more consistent with the other procs in lib/systemtap.exp which
check whether certain types of probes are supported, rename
hw_breakpoint_p to hwbkpt_probes_p.

10 years agolisting_mode.exp: use plt_probes_p proc
Jonathan Lebon [Wed, 11 Jun 2014 17:26:46 +0000 (13:26 -0400)]
listing_mode.exp: use plt_probes_p proc

This is a follow-up to commit 96f91ef. Use the already given
plt_probes_p proc rather than rechecking archs.

10 years agovars.exp: only parse out from first line of grep
Jonathan Lebon [Wed, 11 Jun 2014 15:15:14 +0000 (11:15 -0400)]
vars.exp: only parse out from first line of grep

There can be multiple _stp_snprintf lines, in which case, the resulting
values for vars and parms can hold the same variables multiple times,
thus throwing off the test (see RHBZ1099757#c4).

Fix this by only using the first line output from grep.

10 years agolisting_mode.exp: don't test plt probes if unsupported
Jonathan Lebon [Wed, 11 Jun 2014 14:32:44 +0000 (10:32 -0400)]
listing_mode.exp: don't test plt probes if unsupported

On some architectures, plt probes are not supported. Check for those and
skip testing them if so.

10 years agolisting_mode.exp: relax process.function(0xabcd) probes
Jonathan Lebon [Wed, 11 Jun 2014 14:21:11 +0000 (10:21 -0400)]
listing_mode.exp: relax process.function(0xabcd) probes

Using a process.function(0xabcd) may still cause prologue searching to
occur on older platforms (for GCC < 4.5) due to possibly bad debuginfo
in the prologue (see e.g. commit 277a2b9 and GDB's PR13777).

Thus, the resulting probe from a process.function(0xabcd) might not
match the exact address given if it has been adjusted by
prologue-searching. So we relax the requirement by simply checking that
the address printed in a proper hex format.

10 years agolisting_mode.exp: don't test HW bkpt probes if unsupported
Jonathan Lebon [Tue, 10 Jun 2014 21:38:05 +0000 (17:38 -0400)]
listing_mode.exp: don't test HW bkpt probes if unsupported

We check if HW breakpoint probes are available on the machine during
testsuite setup and use the new hw_breakpoint_p proc in listing_mode.exp
to check if these probes should be tested.

10 years agolisting_mode.exp: don't test callee probes if unsupported
Jonathan Lebon [Tue, 10 Jun 2014 21:37:10 +0000 (17:37 -0400)]
listing_mode.exp: don't test callee probes if unsupported

We skip testing callee probes if the platform doesn't support it
(depending on GCC and elfutils version).

10 years agolisting_mode.exp: use readlink -f instead of realpath
Jonathan Lebon [Tue, 10 Jun 2014 21:37:34 +0000 (17:37 -0400)]
listing_mode.exp: use readlink -f instead of realpath

The realpath executable is not available in older coreutils.

10 years agolisting_mode.exp: add subtests for ENUMERATED lineno types
Jonathan Lebon [Thu, 5 Jun 2014 13:51:24 +0000 (09:51 -0400)]
listing_mode.exp: add subtests for ENUMERATED lineno types

10 years agostatement.exp: remove mentions of RANGE
Jonathan Lebon [Wed, 4 Jun 2014 21:46:03 +0000 (17:46 -0400)]
statement.exp: remove mentions of RANGE

Since commit f01d4ff, we now no longer have a RANGE lineno_type. So
let's remove mentions of it to avoid future confusion and replace it by
the new ENUMERATED lineno type. Also clear up subtest names.

10 years agostmt_rel.exp: relax requirement for PASS
Jonathan Lebon [Tue, 10 Jun 2014 21:36:39 +0000 (17:36 -0400)]
stmt_rel.exp: relax requirement for PASS

We previously required that all linenos accessible through wildcards
were the same set as all linenos individually accessible through
relative numbering.

The issue is that two linenos may correspond to the same address (e.g.
due to optimization), in which case a wildcard probe would only pick up
the first lineno (since the second lineno would be eliminated due to
being the same address), which two individual relative probes for these
two linenos would both resolve.

So instead, this test now simply checks that all the linenos which were
found in the wildcard probe were also accessible through relative lineno
(i.e. a subtest test instead of equality test).

10 years agoPR16716 partial fix: Fix types in syscall.{fchdir,mkdir,mkdirat}.
David Smith [Tue, 10 Jun 2014 19:58:28 +0000 (14:58 -0500)]
PR16716 partial fix: Fix types in syscall.{fchdir,mkdir,mkdirat}.

* tapset/linux/syscalls.stp (syscall.fchdir): Fixed types.
  (syscall.mkdir): Ditto.
  (syscall.mkdirat): Fixed types and added 'dirfd_str' convenience
  variable, to match syscall.{faccessat,fchmodat,fchownat,etc.}.
* tapset/linux/nd_syscalls.stp: Similar changes.
* testsuite/systemtap.syscall/dir.c: Added more tests.
* testsuite/buildok/syscalls-detailed.stp: Added test for 'dirfd_str'
  variable of syscall.mkdirat.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.

10 years agocast-scope.exp: KFAIL dyninst on ppc unoptimized
Jonathan Lebon [Tue, 10 Jun 2014 18:57:39 +0000 (14:57 -0400)]
cast-scope.exp: KFAIL dyninst on ppc unoptimized

The cast-scope.exp test fails on ppc64 for unoptimized code due to
stapdyn's inability to retrieve all registers (PR15614). So we KFAIL it.

10 years agoloc2c: make u_fetch_register() respect CONFIG_COMPAT
Jonathan Lebon [Tue, 10 Jun 2014 17:41:28 +0000 (13:41 -0400)]
loc2c: make u_fetch_register() respect CONFIG_COMPAT

If CONFIG_COMPAT is defined, then it is possible to be running 32/31-bit
tasks on a 64-bit kernel. In such cases, we need to ensure that the
values returned from u_fetch_register() are 32-bit friendly.

Thus, we mask whatever pt_regs_fetch_register() returns.

10 years agoFix BZ1099555 by reworking gtod.exp.
David Smith [Mon, 9 Jun 2014 14:11:13 +0000 (09:11 -0500)]
Fix BZ1099555 by reworking gtod.exp.

* testsuite/systemtap.base/gtod.exp: Rework so that we don't care about
  what order the output comes. All we care about now is the variance
  between the kernel's time and systemtap's time.
* testsuite/systemtap.base/gtod.c (main): Print the iteration number first.
* testsuite/systemtap.base/gtod.stp: Ditto.

10 years agostap.1, stappaths.7 man pages: minor text improvements
Frank Ch. Eigler [Sun, 8 Jun 2014 13:57:22 +0000 (09:57 -0400)]
stap.1, stappaths.7 man pages: minor text improvements

10 years agostap.1 typo fix
Frank Ch. Eigler [Sun, 8 Jun 2014 13:37:18 +0000 (09:37 -0400)]
stap.1 typo fix

10 years agoPR15123 still encontered: mention workarounds in error::dwarf.7stap man page
Frank Ch. Eigler [Fri, 6 Jun 2014 19:59:58 +0000 (15:59 -0400)]
PR15123 still encontered: mention workarounds in error::dwarf.7stap man page

10 years agoconfigure.ac: Tolerate relative elftuils src path and add autoreconf -i hint.
Mark Wielaard [Fri, 6 Jun 2014 19:39:42 +0000 (21:39 +0200)]
configure.ac: Tolerate relative elftuils src path and add autoreconf -i hint.

configure: Regenerated.

10 years agostap -V version string: include build-time elfutils version
Frank Ch. Eigler [Fri, 6 Jun 2014 18:25:12 +0000 (14:25 -0400)]
stap -V version string: include build-time elfutils version

We have some translator facilities that are based on _ELFUTILS_PREREQ,
a compile-time elfutils version check.  Others might change behavior
based on the run-time elfutils version.  These versions may differ,
as the system elfutils libraries are upgraded without stap being
rebuilt.  This patch changes stap -V to report both run-time and
build-time elfutils versions (if they are different).

10 years agoUpdate gtod.exp for BZ1099555 to make output more clear.
David Smith [Thu, 5 Jun 2014 15:46:14 +0000 (10:46 -0500)]
Update gtod.exp for BZ1099555 to make output more clear.

* testsuite/systemtap.base/gtod.exp: Split test into 3 sub tests so that
  failures can be more easily identified.

10 years agoPR17027: adapt pr16806.exp for RHEL6
Jonathan Lebon [Thu, 5 Jun 2014 15:09:11 +0000 (11:09 -0400)]
PR17027: adapt pr16806.exp for RHEL6

This test failed on RHEL6 for two reasons:
- The 'timeout' program doesn't support non-integer arguments
- We assumed the uprobes module was already inserted.

Fix the first by changing the timeout to 1s (I verified that this
doesn't change the lethality of the test under the right conditions).

Fix the second by doing a sample run first to allow stap the chance to
self-compile and pass the uprobes module to staprun -u.

10 years agoman/stapprobes.3stap: add blurb about ENUMERATED
Jonathan Lebon [Thu, 5 Jun 2014 14:11:14 +0000 (10:11 -0400)]
man/stapprobes.3stap: add blurb about ENUMERATED

10 years agoNEWS: add blurb about ENUMERATED
Jonathan Lebon [Thu, 5 Jun 2014 14:10:49 +0000 (10:10 -0400)]
NEWS: add blurb about ENUMERATED

10 years agodwflpp.cxx: pass linenos vector by reference
Jonathan Lebon [Wed, 4 Jun 2014 21:42:46 +0000 (17:42 -0400)]
dwflpp.cxx: pass linenos vector by reference

This is a follow-up to commit f01d4ff. Pass linenos vector by reference
and remove unused variable range_it.

10 years agostatement probes: add ENUMERATED lineno_type
Brian Chrisman [Wed, 4 Jun 2014 21:40:08 +0000 (17:40 -0400)]
statement probes: add ENUMERATED lineno_type

This patch adds support for statement probes of the form

   .statement("foo@file.c:1,3-4,6")

The statement.exp testcase is expanded to cover this new type.

10 years agodwflpp::literal_stmt_for_local add details for retrieve attribute errors.
Mark Wielaard [Thu, 5 Jun 2014 09:43:38 +0000 (11:43 +0200)]
dwflpp::literal_stmt_for_local add details for retrieve attribute errors.

10 years agodwflpp::die_location_as_function_string don't mix std::string and char *.
Mark Wielaard [Thu, 5 Jun 2014 09:41:08 +0000 (11:41 +0200)]
dwflpp::die_location_as_function_string don't mix std::string and char *.

Especially using the result of string.c_str() after string goes out of
scope is not adviced.

10 years agosystemtap_session::modules_must_be_signed might use uninitialized memory.
Mark Wielaard [Thu, 5 Jun 2014 09:13:31 +0000 (11:13 +0200)]
systemtap_session::modules_must_be_signed might use uninitialized memory.

statm >> status might not actually assign anything to status.
operator >> on ifstream doesn't assign anything the underlying file
doesn't exist. So status will just have random contents that happened
to be on the stack. Make sure to initialize status first.

10 years agoExtra details to explain the error or provide alternatives to the user.
Mark Wielaard [Thu, 5 Jun 2014 08:12:57 +0000 (10:12 +0200)]
Extra details to explain the error or provide alternatives to the user.
Each one printed after the main error message and tokens aligned on
separate lines. Just push_back anything you want that better explains
the error to the user (not meant for extra verbose developer messages).

Use it for the new explanations of the "not accessible at this address"
errors. Split in die_location_as_string, die_location_as_function_string
and suggested_locations_string.

10 years agoReport address locations where things are accessible in error message.
Mark Wielaard [Wed, 4 Jun 2014 18:48:23 +0000 (20:48 +0200)]
Report address locations where things are accessible in error message.

Instead of just saying "not accessible at this address" tell at which
addresses the location is accessible. Uses dwarf_getlocations which
requires elfutils 0.158+ (if not available, just don't suggest anything).

10 years agoFix accessible at this address error message crash.
Mark Wielaard [Wed, 4 Jun 2014 18:40:25 +0000 (20:40 +0200)]
Fix accessible at this address error message crash.

commit 6fcc2aa1 "Improve not accessible at this address error message"
introduced a regression by crashing when the debugfile couldn't be found.

10 years agopr16719.exp: Use /bin/ls, not /usr/bin/ls which might not exist.
Mark Wielaard [Wed, 4 Jun 2014 18:30:35 +0000 (20:30 +0200)]
pr16719.exp: Use /bin/ls, not /usr/bin/ls which might not exist.

10 years agoexecve.exp: don't double quote result_string.
Mark Wielaard [Wed, 4 Jun 2014 18:21:35 +0000 (20:21 +0200)]
execve.exp: don't double quote result_string.

10 years agoImprove not accessible at this address error message.
Mark Wielaard [Wed, 4 Jun 2014 13:24:41 +0000 (15:24 +0200)]
Improve not accessible at this address error message.

Add dwflpp::pc_die_location_as_string and dwflpp::pc_die_location_as_string
to provide more human readable PC and DWARF DIE offset names and source
locations (including which function was inlined where) to help track down
why an argument or variable isn't accessible at a certain address.

10 years agoFixed BZ1099791 by updating the runtime to correctly find the vdso.
David Smith [Tue, 3 Jun 2014 16:05:20 +0000 (11:05 -0500)]
Fixed BZ1099791 by updating the runtime to correctly find the vdso.

* translate.cxx (find_vdso): Add comment mentioning the logic in
  _stp_vma_match_vdso needs to match.
* runtime/vma.c (_stp_vma_match_vdso): Add logic from find_vdso() to parse
  the path, looking for the vdso.

10 years agoPR16716 partial fix: Fix types in syscall.epoll_{create,ctl,pwait,wait}.
David Smith [Mon, 2 Jun 2014 17:43:14 +0000 (12:43 -0500)]
PR16716 partial fix: Fix types in syscall.epoll_{create,ctl,pwait,wait}.

* tapset/linux/syscalls.stp (syscall.epoll_create): Fix types.
  (syscall.epoll_ctl): Ditto.
  (syscall.epoll_wait): Ditto.
  (syscall.epoll_pwait): Add convenience variables.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_opoll_op_str): Updated and improved.
  (_epoll_create1_flag_str): Ditto.
* runtime/linux/compat_unistd.h: Added __NR_compat_epoll_wait.
* testsuite/buildok/syscalls-detailed.stp: Add test for new epoll_pwait
  convenience variables.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/poll.c: Add more error testing.

10 years agofixed typo in proc_by_pid.exp that caused an error
Abegail Jakop [Mon, 2 Jun 2014 13:42:34 +0000 (09:42 -0400)]
fixed typo in proc_by_pid.exp that caused an error

Typo caused a variable to be treated as an array, which
only arose when trying to set a runtime flag for the test case.

10 years agodwflpp.cxx: check addr returned by lower_bound()
Jonathan Lebon [Sun, 1 Jun 2014 19:58:48 +0000 (15:58 -0400)]
dwflpp.cxx: check addr returned by lower_bound()

This is a follow-up to commit 71b8e66. The lower_bound() function
returns an iterator to the first addr which does not compare less than
the entrypc. This means that the returned addr is either equal or
greater than the entrypc (depending on whether the latter is in the
vector).

This patch simply checks that the addr returned by lower_bound() is
equal, not just greater or equal.

10 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Abegail Jakop [Fri, 30 May 2014 20:36:54 +0000 (16:36 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

10 years agoedited the description for -x in man page
Abegail Jakop [Fri, 30 May 2014 20:18:42 +0000 (16:18 -0400)]
edited the description for -x in man page

10 years agodwflpp.cxx: use lower_bound() instead of manual binary search
Jonathan Lebon [Fri, 30 May 2014 19:42:00 +0000 (15:42 -0400)]
dwflpp.cxx: use lower_bound() instead of manual binary search

This is a follow-up to commit 1d50099. We previously implemented our own
binary search to find the line record associated with the function's
entrypc. To be on the safe side, we instead rely on lower_bound() for
binary searching, which will pick the first element in a range of equal
addresses, thus avoiding issues such as BZ1099133.

10 years agoAdd ia64-specific syscall tapset fix.
David Smith [Fri, 30 May 2014 16:01:41 +0000 (11:01 -0500)]
Add ia64-specific syscall tapset fix.

* tapset/linux/nd_syscalls2.stp: Remove extra _ia64_pipe[01] functions,
  just use the functions in syscalls2.stp.

10 years agoUpdate syscall tapset for rawhide (3.15.0-0.rc5.git3.1.fc21.x86_64).
David Smith [Fri, 30 May 2014 15:56:53 +0000 (10:56 -0500)]
Update syscall tapset for rawhide (3.15.0-0.rc5.git3.1.fc21.x86_64).

* tapset/linux/syscalls.stp (syscall.ioctl): Update for rawhide.
* tapset/linux/syscalls2.stp (syscall.compat_utime): Ditto.

10 years agoBZ1099133: prologue searching: check previous line too
Jonathan Lebon [Fri, 30 May 2014 15:47:51 +0000 (11:47 -0400)]
BZ1099133: prologue searching: check previous line too

We perform binary search to retrieve the line record matching the
entrypc. However, we may by chance fall on the second of two line
records for the same entrypc. Check for this after binary search is
done.

10 years agochanged check for -x PID, added tests
Abegail Jakop [Fri, 30 May 2014 15:25:09 +0000 (11:25 -0400)]
changed check for -x PID, added tests

session.cxx: revised approach to checking path for given PID

checks that the path produced from a given PID is valid using
readlink(). added in new error messages to be more specific.

tapsets.cxx: fixed spelling mistake

proc_by_pid*: test files

10 years agoBZ1099825: probe_by_pid.exp: small tweak in C program
Jonathan Lebon [Fri, 30 May 2014 14:26:01 +0000 (10:26 -0400)]
BZ1099825: probe_by_pid.exp: small tweak in C program

Since PR6941 (commit 277a2b9), prologue-searching is skipped for
optimized code. However, we do not skip it for GCC < 4.5, which may
provide bad location info (see GDB's PR13777).

On RHEL6, this testcase was failing because prologue-searching was not
skipped, and fell inside the loop in main(). To allow for a safe landing
zone, we slightly tweak the C program so that there is a safe
instruction to land on post-prologue that is not in the loop.

10 years agoRelax static-probes.d input file syntax.
Stan Cox [Thu, 29 May 2014 20:04:13 +0000 (16:04 -0400)]
Relax static-probes.d input file syntax.

* dtrace.in (dtrace_bnf): Allow probe_ident to start with any alphanumeric.
  Make trailing probe declaration ';' optional.
  (_PypProvider::probe_write): Improve error messages.

10 years agoinfer process path with -x PID
Abegail Jakop [Thu, 29 May 2014 19:31:08 +0000 (15:31 -0400)]
infer process path with -x PID

session.cxx: interpret -x PID as /proc/PID/exe
tapsets.cxx: changed error messages
stap.1: updated man page

10 years agoDon't give predefined types special treatment.
Stan Cox [Thu, 29 May 2014 15:11:40 +0000 (11:11 -0400)]
Don't give predefined types special treatment.

* dtrace.in (dtrace_bnf):  Remove type_spec.  Handle all types as type_name.

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