]> sourceware.org Git - systemtap.git/log
systemtap.git
10 years agoinitscript: use new-kernel-pkg after dracut
Jonathan Lebon [Wed, 26 Mar 2014 15:39:11 +0000 (11:39 -0400)]
initscript: use new-kernel-pkg after dracut

With this patch, we now also call new-kernel-pkg --update after creating
the new image so that the bootloader is updated if need be (see also
BZ1051649#c9).

This patch also includes some polishing re. console log output.

10 years agoImprove _struct_sockaddr_u_impl() formatting.
David Smith [Wed, 26 Mar 2014 14:59:51 +0000 (09:59 -0500)]
Improve _struct_sockaddr_u_impl() formatting.

* tapset/linux/aux_syscalls.stp (_struct_sockaddr_u_impl): Improve unix
  socket path formatting by adding quotes around the path.

10 years agoReplace _sendflags_str() and _recvflags_str() with _msg_flags_str().
David Smith [Wed, 26 Mar 2014 14:43:23 +0000 (09:43 -0500)]
Replace _sendflags_str() and _recvflags_str() with _msg_flags_str().

* tapset/linux/aux_syscalls.stp (_msg_flags_str): New function to replace
  _sendflags_str() and _recvflags_str().
  (_sendflags_str): Deprecated and reimplemented with _msg_flags_str().
  (_recvflags_str): Ditto.
* tapset/linux/syscalls2.stp: Replace _sendflags_str() and
  _recvflags_str() with _msg_flags_str().
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Test _msg_flags_str().
* NEWS: Mention deprecations.

10 years agoMinor testsuite tweaks for stapdyn
Josh Stone [Wed, 26 Mar 2014 00:04:00 +0000 (17:04 -0700)]
Minor testsuite tweaks for stapdyn

- global_end: Allow for zero time (i.e. less than 1 microsecond), and
  don't double the _dyninst test suffix.

- process_by_cmd: Add an "int rc" just to give distinct IPs between
  function start and the first mark, so we don't need to worry about
  determinism of the probe order.  (stapdyn was hitting the mark first.)

- suppress-time-limit: Expect the WARNING messages too, because stapdyn
  often has them mixed with the normal script output.

10 years agoperf.exp: add a quick global (non-process) test
Josh Stone [Tue, 25 Mar 2014 22:05:59 +0000 (15:05 -0700)]
perf.exp: add a quick global (non-process) test

10 years agosocktop: Make sure *_str are always known as strings
Josh Stone [Tue, 25 Mar 2014 20:46:57 +0000 (13:46 -0700)]
socktop: Make sure *_str are always known as strings

The new removal of unreachable code meant socktop might remove its whole
filter setup, and all the related variables are left with unknown type.
They would typically be pruned away just fine, but socktop also has a
probe never with print statements to avoid autoprint.  Changing those to
log() lets stap always know they are strings.

10 years agoTighten a semok/doubleglob.stp pattern
Josh Stone [Tue, 25 Mar 2014 20:43:29 +0000 (13:43 -0700)]
Tighten a semok/doubleglob.stp pattern

With 't**es(1)', we only intended to match 'timer.jiffies(1), but we
also matched a 'tcp[...].callees(1)' on accident.  This odd instance has
some issues in variable expansion, so we should just avoid it.  Using
'ti**es(1)' gets back to the original intent of the test.

10 years agotestsuite: reorganize perf tests
Josh Stone [Tue, 25 Mar 2014 19:31:07 +0000 (12:31 -0700)]
testsuite: reorganize perf tests

- Some of the parseko tests belong in semko.  The remaining parseko
  tests should use -p1.

- Some of the perf.exp tests can be simple semko.  The remaining runtime
  tests now have their scripts in separate files.

- A new semko/perf06.stp makes sure perf.process is resolved in pass2.

10 years agoRemove code that follows unconditional control statements
Josh Stone [Tue, 25 Mar 2014 18:22:43 +0000 (11:22 -0700)]
Remove code that follows unconditional control statements

When a block contains return, next, break, or continue, any following
statements are unreachable.  Warn and remove them.

This replaces tapset-perfmon's statement_counter, which didn't know
enough to deal with blocks like '{ { } }' that arise from perf aliases.
Now it just inserts a 'next', and the later optimization passes can
figure this out in a very generic way.

10 years agoRead the perf process from -c during pass2
Josh Stone [Fri, 21 Mar 2014 18:46:03 +0000 (11:46 -0700)]
Read the perf process from -c during pass2

When a bare .process is used, it's value is inferred from -c CMD.  This
must be checked during pass2, or else a changed -c CMD will not trigger
a hash change, and an incorrect cached module will be used.

This patch also unifies the wordexp argv[0] parsing of -c CMD into a
shared systemtap_session::cmd_file().

10 years agoDon't add empty .process/counter to perf pp()
Josh Stone [Fri, 21 Mar 2014 18:44:21 +0000 (11:44 -0700)]
Don't add empty .process/counter to perf pp()

If the user didn't specify a .process or .counter, then we shouldn't add
empty values into the final probe point specification.

10 years agoPR14223: Allow perf probes for mere @stapdev mortals
Josh Stone [Fri, 21 Mar 2014 18:39:42 +0000 (11:39 -0700)]
PR14223: Allow perf probes for mere @stapdev mortals

Even though we're using the kernel interface, perf checks CAP_SYS_ADMIN,
which our mere @stapdev user may not have.  By running via a workqueue,
we'll be in an events/X kernel thread with sufficient privileges.

10 years agomove utrace14.stp to semok
Jonathan Lebon [Tue, 25 Mar 2014 20:23:46 +0000 (16:23 -0400)]
move utrace14.stp to semok

Since commit 5da0e9f, probing pid 1 is allowed.

10 years agodump_functions.exp: new testcase for --dump-functions
Jonathan Lebon [Mon, 24 Mar 2014 22:07:57 +0000 (18:07 -0400)]
dump_functions.exp: new testcase for --dump-functions

10 years agostap: add --dump-functions option
Jonathan Lebon [Fri, 21 Mar 2014 20:38:43 +0000 (16:38 -0400)]
stap: add --dump-functions option

10 years agosystemtap_session: removed unused member
Jonathan Lebon [Sat, 22 Mar 2014 04:36:35 +0000 (00:36 -0400)]
systemtap_session: removed unused member

10 years agosemantic_error: also print source of error
Jonathan Lebon [Sat, 22 Mar 2014 04:50:53 +0000 (00:50 -0400)]
semantic_error: also print source of error

When printing semantic_errors at high verbosity (-vv), it can be useful
to also know where the error came from. That information is already made
available through the errsrc member of semantic_error (initially
implemented for dup-error elimination).

We also change the ERRSRC macro to use __FILE__ rather than __FUNCTION__
to be not only more informative, but more foolproof (e.g. two errors
thrown from identically named functions at identical lines in separate
files before would have been considered equivalent by the dup-error
elimination).

The final result is e.g. something like this:

semantic error: unresolved type : identifier 'ActiveOpens' at :22:8
   thrown from: elaborate.cxx:5239
        source: global ActiveOpens
                       ^

10 years agoPR16719: tweak testcase
Jonathan Lebon [Sun, 23 Mar 2014 05:07:57 +0000 (01:07 -0400)]
PR16719: tweak testcase

10 years agotestsuite: big cleanup of sdt_misc types
Josh Stone [Sat, 22 Mar 2014 00:32:06 +0000 (17:32 -0700)]
testsuite: big cleanup of sdt_misc types

- Use a central check() function throughout, so tests and messages are
  easily uniform.  Prefix the PASS/FAIL messages with "sdt_types" so
  they are easily distinguishable from dejagnu PASS/FAIL in the log.

- Adjust most constants to test the bounds of their types.

- Add unsigned char and unsigned long long.

- Tighten the expect patterns to exactly one line at a time, and
  increment $notok for extra lines (like WARNINGs).

10 years agotestsuite: big cleanup of sdt_asm
Josh Stone [Fri, 21 Mar 2014 22:09:53 +0000 (15:09 -0700)]
testsuite: big cleanup of sdt_asm

- Use a central check() function throughout, so tests and messages are
  easily uniform.  Prefix the PASS/FAIL messages with "sdt_asm" so they
  are easily distinguishable from dejagnu PASS/FAIL in the log.

- Save and restore SP when when changing it in sdt_asm.S, and prepare
  the stack and return value at the end for a clean exit.

- Skip mark("*sp") for --runtime=dyninst, because it's not prepared to
  deal with that bad stack state.

- Tighten the expect patterns to exactly one line at a time, and
  increment $notok for extra lines (like WARNINGs).

10 years agotestsuite: prefix regex.stp PASS/FAIL messages
Josh Stone [Fri, 21 Mar 2014 19:47:39 +0000 (12:47 -0700)]
testsuite: prefix regex.stp PASS/FAIL messages

Adding a "regex " prefix on regex.stp messages makes it easier to
distinguish these from dejagnu messages in systemtap.log.

10 years agoLet synthesized end probes use foreach values again
Josh Stone [Fri, 21 Mar 2014 19:12:52 +0000 (12:12 -0700)]
Let synthesized end probes use foreach values again

When these were moved to parse_synthetic_probe, I neglected to maintain
use of the "foreach (val = ...)" syntax.  Add this back in, and update
optim_arridx.exp to expect the internal underscored names.

10 years agoPR16725: Warn if stapdyn process probes lack a target
Josh Stone [Fri, 21 Mar 2014 00:30:10 +0000 (17:30 -0700)]
PR16725: Warn if stapdyn process probes lack a target

10 years agoPR16719: add testcase to watch for regression
Jonathan Lebon [Fri, 21 Mar 2014 18:06:24 +0000 (14:06 -0400)]
PR16719: add testcase to watch for regression

This testcase should fail if stap ever goes back to leaving files open
during pass-5.

10 years agocallee probes: rename caller_match() to _caller_match()
Jonathan Lebon [Fri, 21 Mar 2014 15:06:40 +0000 (11:06 -0400)]
callee probes: rename caller_match() to _caller_match()

Add an underscore prefix to caller_match() to emphasize 'internalness'
of the function.

10 years agoPR16730 addendum, link java method probes to the user
Josh Stone [Thu, 20 Mar 2014 23:23:34 +0000 (16:23 -0700)]
PR16730 addendum, link java method probes to the user

After commit ede0102cfd22, the java method probes that were built using
parse_synthetic_probe don't look like they come from the user's script
anymore, so the listing mode skips them.  Since the mark probe is the
one containing the user's code, link its probe->base back to the user.

Also move the test in printscript a bit so verbose diagnostics are still
printed, to help with issues like this.

10 years agofind_and_build(): don't handle recursive_expansion_error
Jonathan Lebon [Thu, 20 Mar 2014 20:33:58 +0000 (16:33 -0400)]
find_and_build(): don't handle recursive_expansion_error

There's no need to catch recursive_expansion_error since
try_suffix_expansion() rethrows it as a semantic_error. If it did
rethrow it as a recursive_expansion_error (which might have been the
original intent), the errors would have been printed as:

recursive loop in alias expansion...
while resolving probe point...
no match

Rather, it is printed as follow:

while resolving probe point...
recursive loop in alias expansion...

which kills the 'no match' msg and is more in line with what we do for
other errors (i.e.  having the 'while resolving probe point' msg first).

10 years agoRHBZ1065757: don't delete objects that are in use
Jonathan Lebon [Thu, 20 Mar 2014 20:12:27 +0000 (16:12 -0400)]
RHBZ1065757: don't delete objects that are in use

Catching a semantic_error does not mean that nothing was derived. This
can occur in the case of probe aliases, where the first alias_name was
derived, but the second wasn't. In those cases, the first derived probe
uses those created objects, so corruption may result if we delete them.

We instead rely on the size of the results vector to determine if it is
safe to delete the objects.

10 years agoPR16730: Don't list auxiliary tapset probes
Josh Stone [Thu, 20 Mar 2014 21:28:54 +0000 (14:28 -0700)]
PR16730: Don't list auxiliary tapset probes

We should only list probes that can be traced back to the user's -l/-L
specification, not any auxiliary probes in the tapsets.

10 years agoBZ1073605 addendum, add _start tests
Josh Stone [Thu, 20 Mar 2014 21:24:25 +0000 (14:24 -0700)]
BZ1073605 addendum, add _start tests

These were mentioned in commit d9436f1ebe9c, but apparently forgotten.

10 years agoPR16716 partial fix: Better types in 'syscall.{listen,setsockopt}'.
David Smith [Thu, 20 Mar 2014 20:04:53 +0000 (15:04 -0500)]
PR16716 partial fix: Better types in 'syscall.{listen,setsockopt}'.

* tapset/linux/syscalls.stp (syscall.listen): Fix types.
* tapset/linux/syscalls2.stp (syscall.setsockopt): Ditto.
* tapset/linux/nd_syscalls2.stp (nd_syscall.setsockopt): Fix types.
* testsuite/systemtap.syscall/getsockopt.c: Fixed typo.
* testsuite/systemtap.syscall/listen.c: Added test.
* testsuite/systemtap.syscall/setsockopt.c: New test case.

10 years agoPR16716 partial fix: Better types in 'syscall.{getsockname,getsockopt}'.
David Smith [Thu, 20 Mar 2014 18:52:30 +0000 (13:52 -0500)]
PR16716 partial fix: Better types in 'syscall.{getsockname,getsockopt}'.

* tapset/linux/syscalls.stp: Fix types in 'syscall.getsockname' and
  'syscall.getsockopt'.
* tapset/linux/aux_syscalls.stp (_stp_lookup_str): Move to the top of the
  file so that it can be called earlier.
  (_stp_lookup_or_str): Ditto.
  (_sockopt_optname_str): Convert to use _stp_lookup_or_str(). Update list
  of values handled.
  (_sockopt_level_str): Ditto.
* testsuite/systemtap.syscall/getsockname.c: New test case.
* testsuite/systemtap.syscall/getsockopt.c: Ditto.

10 years agoRHBZ1049083, C#23: rewordings proposed by jhradile
Martin Cermak [Thu, 20 Mar 2014 07:53:24 +0000 (08:53 +0100)]
RHBZ1049083, C#23: rewordings proposed by jhradile

10 years agoPR16716 partial fix: Better types in 'syscall.{getpeername,getrusage}'.
David Smith [Wed, 19 Mar 2014 18:25:38 +0000 (13:25 -0500)]
PR16716 partial fix: Better types in 'syscall.{getpeername,getrusage}'.

* tapset/linux/syscalls.stp: Fix types in 'syscall.getpeername'. Add
  better 'compat' support to 'syscall.getrusage' and fix types.
* tapset/linux/nd_syscalls.stp: Add better 'compat' support to
  'nd_syscall.getrusage'.
* tapset/linux/aux_syscalls.stp (_rusage_who_str): Add support for
  decoding 'RUSAGE_THREAD'.
* testsuite/systemtap.syscall/getpeername.c: New test case.
* testsuite/systemtap.syscall/getrusage.c: Ditto.

10 years agocallee.exp: clean up after yourself
Jonathan Lebon [Wed, 19 Mar 2014 15:05:25 +0000 (11:05 -0400)]
callee.exp: clean up after yourself

10 years agoPR16719: disable setupdwfl caching
Jonathan Lebon [Tue, 18 Mar 2014 15:23:37 +0000 (11:23 -0400)]
PR16719: disable setupdwfl caching

This patch is mostly a revert of commit 68983551.

The 'kernel_dwfl' and 'user_dwfl' references kept for caching purposes
in setupdwfl.cxx were causing the Dwfl object to never actually be
released, which in turn resulted in multiple files remaining open beyond
pass-3.

10 years agostap.1: fix typo re. default cache clean interval
Jonathan Lebon [Tue, 18 Mar 2014 22:25:21 +0000 (18:25 -0400)]
stap.1: fix typo re. default cache clean interval

10 years agoPR16716 partial fix: Better types in 'syscall.{getitimer,setitimer}.
David Smith [Wed, 19 Mar 2014 15:32:51 +0000 (10:32 -0500)]
PR16716 partial fix: Better types in 'syscall.{getitimer,setitimer}.

* tapset/linux/syscalls.stp: Fix argument types in 'syscall.getitimer' and
  'syscall.compat_getitimer'.
* tapset/linux/syscalls2.stp: Fix argument types in 'syscall.setitimer' and
  'syscall.compat_setitimer'.
* testsuite/systemtap.syscall/getitimer.c: New test case.
* testsuite/systemtap.syscall/setitimer.c: Ditto.

10 years agoPR16716 partial fix: Better types in 'syscall.connect'.
David Smith [Tue, 18 Mar 2014 21:23:19 +0000 (16:23 -0500)]
PR16716 partial fix: Better types in 'syscall.connect'.

* tapset/linux/syscalls.stp: Fix argument types in 'syscall.connect'.
* tapset/linux/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/socket.c: New test case.

10 years agoImproved last change to _struct_sockaddr_u_impl() by using clamp_t().
David Smith [Tue, 18 Mar 2014 19:58:23 +0000 (14:58 -0500)]
Improved last change to _struct_sockaddr_u_impl() by using clamp_t().

10 years agoPR16716 partial fix: Better types in 'syscall.{select,sendfile}'.
David Smith [Tue, 18 Mar 2014 19:55:13 +0000 (14:55 -0500)]
PR16716 partial fix: Better types in 'syscall.{select,sendfile}'.

* tapset/linux/syscalls2.stp: Fix argument types in 'syscall.select' and
  'syscall.sendfile'. Improve 'syscall.wait4'.
* tapset/linux/nd_syscalls2.stp: Fix 'nd_syscall.sendfile'.
* testsuite/systemtap.syscall/bind.c: Updated.
* testsuite/systemtap.syscall/select.c: Added bad argument testing.
* testsuite/systemtap.syscall/sendfile.c: Ditto.
* testsuite/systemtap.syscall/socketpair.c: Added a s390 fix.
* tapset/linux/syscalls.stpm: Added @__pointer() macro.
* runtime/linux/compat_unistd.h: Add __NR_sendfile64 define.

10 years agoFix typo in last commit.
David Smith [Tue, 18 Mar 2014 16:57:52 +0000 (11:57 -0500)]
Fix typo in last commit.

10 years agoAdded another PR16718 fix by auditing all calls to _stp_copy_from_user().
David Smith [Tue, 18 Mar 2014 14:53:23 +0000 (09:53 -0500)]
Added another PR16718 fix by auditing all calls to _stp_copy_from_user().

* tapset/linux/aux_syscalls.stp: Make sure a valid length is passed to all
  calls to _stp_copy_from_user().

10 years agoaux_syscalls: Fix STAP_ARG_len wrong check.
Robin Hack [Tue, 18 Mar 2014 14:26:47 +0000 (09:26 -0500)]
aux_syscalls: Fix STAP_ARG_len wrong check.

10 years agostap.1 man page: add more error reporting xrefs
Frank Ch. Eigler [Tue, 18 Mar 2014 14:16:00 +0000 (10:16 -0400)]
stap.1 man page: add more error reporting xrefs

10 years agostap.1 man page: xref systemtap(8)
Frank Ch. Eigler [Tue, 18 Mar 2014 13:04:18 +0000 (09:04 -0400)]
stap.1 man page: xref systemtap(8)

10 years agosymbol_table::get_from_elf use dwfl_module_getsym_info if available.
Mark Wielaard [Mon, 17 Mar 2014 21:05:33 +0000 (22:05 +0100)]
symbol_table::get_from_elf use dwfl_module_getsym_info if available.

dwfl_module_getsym does adjust the sym.st_value but doesn't try to resolve
it to a function address. dwfl_module_getsym_info leaves the st_value in
tact (no adjustment applied) and also returns the fully resolved address.
This matters for architectures that use function descriptors where we
want the actual function entry address and not just the address in the
function decriptor table (like .odp on ppc64).

10 years agoerror::pass4: clarify what 'upstream systemtap' means
Frank Ch. Eigler [Mon, 17 Mar 2014 19:31:38 +0000 (15:31 -0400)]
error::pass4: clarify what 'upstream systemtap' means

10 years agoPR16716 partial fix: Better types in 'syscall.{bind,socket,socketpair,wait4}'.
David Smith [Mon, 17 Mar 2014 17:41:44 +0000 (12:41 -0500)]
PR16716 partial fix: Better types in 'syscall.{bind,socket,socketpair,wait4}'.

* tapset/linux/syscalls.stp: Fix argument types in 'syscall.bind'.
* tapset/linux/syscalls2.stp: Fix argument types in 'syscall.socket',
  'syscall.socketpair', and 'syscall.wait4'.
* tapset/linux/nd_syscalls2.stp: Improved 'nd_syscall.wait4'.
* testsuite/systemtap.syscall/bind.c: Improved bad argument testing.
* testsuite/systemtap.syscall/socket.c: Ditto.
* testsuite/systemtap.syscall/socketpair.c: Ditto.
* testsuite/systemtap.syscall/wait4.c: New test case.

10 years agoFix PR16718 by making _stp_copy_from_user() more robust.
David Smith [Mon, 17 Mar 2014 16:19:19 +0000 (11:19 -0500)]
Fix PR16718 by making _stp_copy_from_user() more robust.

* runtime/linux/copy.c (_stp_copy_from_user): On failure, don't bother to
  clear out the destination buffer (since we can't be sure the number of
  bytes to copy is valid).
* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol):
  When generating code that calls _ stp_copy_from_user(), be sure to
  handle failure properly.

10 years agoNEWS: mention prologue-searching revamp
Frank Ch. Eigler [Sun, 16 Mar 2014 12:53:28 +0000 (08:53 -0400)]
NEWS: mention prologue-searching revamp

10 years agoPR16473: always expand $$vars/$$parms/etc...
Jonathan Lebon [Fri, 14 Mar 2014 15:21:23 +0000 (11:21 -0400)]
PR16473: always expand $$vars/$$parms/etc...

Probe points such as process.function("*") will aggregate both DWARF
functions as well as symtab-only functions. For the latter, we do not
have any debugging info available and thus no access to context
variables. We thus expand $$vars/$$parms/etc... to empty strings (this
was already added for a subset of cases in commit b78a0fb, PR15999).

Note however, that we still complain loudly if the user tries to
[pretty-]print a specific context $var.

To do this, we simply allow the dwarf_expanding_visitor to always do its
pass, no matter whether scope_die is valid. As per the previous commit,
e.g. $$vars will be expanded, while $var will be left unresolved.

I kept the brackets on rather than unindenting to keep the parent scope
less polluted.

10 years agoPR15999: strengthen null die checking
Jonathan Lebon [Fri, 14 Mar 2014 15:13:42 +0000 (11:13 -0400)]
PR15999: strengthen null die checking

In commit b78a0fb, we allow $$vars/$$param/$$locals/$$return to expand
to an empty string if the scope_die is missing, such as is the case for
symtab-derived functions.

This patch ensures that we do not try to resolve normal context
variables, such as $var or $return, which absolutely require a
scope_die, and for which we previously SIGABRT'ed.

We also strengthen getscopes(), which only pointer-checked the
scope_die, rather than using null_die() to value-check it.

10 years agostapvirt.1: clarify that poweroff is required
Jonathan Lebon [Fri, 14 Mar 2014 19:43:31 +0000 (15:43 -0400)]
stapvirt.1: clarify that poweroff is required

10 years agoDon't bother requiring a specific kernel, even on RHEL4.
David Smith [Thu, 13 Mar 2014 14:18:40 +0000 (09:18 -0500)]
Don't bother requiring a specific kernel, even on RHEL4.

10 years agoPR 16645: Provide [man stap-server' reference when automatically enabling --use-server.
Dave Brolley [Wed, 12 Mar 2014 21:11:13 +0000 (17:11 -0400)]
PR 16645: Provide [man stap-server' reference when automatically enabling --use-server.

10 years agoFix construction of ".local" variant of the DNS name on server certificates.
Dave Brolley [Wed, 12 Mar 2014 20:54:27 +0000 (16:54 -0400)]
Fix construction of ".local" variant of the DNS name on server certificates.

Append ".local" to the first component of the dns name only.
e.g.
   somehost --> somehost.local
   somehost.at.some.domain --> somehost.local

10 years agoDo not warn against a domain name mismatch between a server certificate
Dave Brolley [Wed, 12 Mar 2014 20:43:34 +0000 (16:43 -0400)]
Do not warn against a domain name mismatch between a server certificate
and an empty name.

This can happen when a server is selected by address and port.

10 years agoRHBZ 1075685 - tap-server trusting issues
Dave Brolley [Wed, 12 Mar 2014 20:37:00 +0000 (16:37 -0400)]
RHBZ 1075685 - tap-server trusting issues

If a new server to be trusted was selected by address + port,
and there was no avahi assistance available, or the server was not known
to avahi, its certificate was not added to the database of
trusted servers. This was because the client mishandled the
case of an empty certificate serial number and acted as if
the new server was already trusted.

Fix this by not searching the NSS database of trusted certificates
for a match against an empty certificate serial number.

10 years agoPR 16645: Unhelpful feedback when stap fails
Dave Brolley [Wed, 12 Mar 2014 18:31:38 +0000 (14:31 -0400)]
PR 16645: Unhelpful feedback when stap fails

Under some conditions, stap automatically sets options which
have not been explicitely set, in an attempt to succeed where
it is known that translation would fail without these settings.
Examples are the automatic setting of the --privilege level and
the automatic request for translation via a compile-server for
unprivileged users.

In these cases, when translation still fails it would be helpful
to the user to explain what settings were changed automatically
and why.

It is also helpful to point the user at the appropriate documention
when futher configuration/setup  on his part is required.

This change does the above for --privilege and --use-server.

10 years agolabel probes: add to derivation chain using less hacky way
Jonathan Lebon [Wed, 12 Mar 2014 15:57:13 +0000 (11:57 -0400)]
label probes: add to derivation chain using less hacky way

This commmit uses the same method used in query_callee() but in
query_label(), which used a hacky method to add probe points to the
derivation chain.

10 years agodwarf_query: remove unused parameter 'function_val'
Jonathan Lebon [Wed, 12 Mar 2014 15:42:32 +0000 (11:42 -0400)]
dwarf_query: remove unused parameter 'function_val'

10 years agolibrary probes: fix process path in listing mode
Jonathan Lebon [Wed, 12 Mar 2014 15:10:32 +0000 (11:10 -0400)]
library probes: fix process path in listing mode

Previously, doing stap -l process("exe").library("*").function("myfunc")
would result in listings where the library field had the fully resolved
path, yet the process path retained the user-entered value.

With this commit, we override the user-entered value of process for the
absolute path, so that listing mode also shows it.

10 years agocallee probes: truly improve derivation for better listing
Jonathan Lebon [Thu, 6 Mar 2014 15:27:17 +0000 (10:27 -0500)]
callee probes: truly improve derivation for better listing

The previous attempt to do this (commit 80a63be) was hacky and was thus
reverted (see previous commit). In this commit, we try to do it
properly.

--- original commit msg ---

Previously, doing stap -L for function("foo").callee("*") would result
in listings directly for function("bar1"), function("bar2"), etc...

With this patch, we add an intermediate step in the derivation chain:
function("foo").callee("*") --> function("foo").callee("bar1")

This will cause -L to display this derivation instead, which is closer
to what users would expect for a function("foo").* probe.

To achieve this, we do three things:

1. We make func_info and inline_instance_info subclasses of a single
   base_func_info class for uniform treatment when called from
   query_cu() as well as cleaner passing of name/file/line/addr between
   iterate_over_callees() and query_callee(). This can also help in
   other cases (to be assessed...).
2. We remember and pass down the caller information in
   iterate_over_callees(), so that query_callee() has it on hand when
   creating the .function component.
3. In query_callee(), we create an intermediate probe point and a new
   dwarf_query based on that probe point to create the final derived
   probe.

10 years agoRevert commits cfa2999 and 80a63be
Jonathan Lebon [Thu, 6 Mar 2014 15:27:36 +0000 (10:27 -0500)]
Revert commits cfa2999 and 80a63be

This commit reverts the following two commits:

cfa29998dede5ebbeffc51a05d694e374deddd64:
"dwarf_query: add canonicalize_comps()"

80a63be6325fc04c8e4a611cddf17b2bd926bde5.
"callee: improve derivation for better listing"

10 years agotapsets: argv extension, oneshot introduction
Frank Ch. Eigler [Wed, 12 Mar 2014 17:55:17 +0000 (13:55 -0400)]
tapsets: argv extension, oneshot introduction

10 years agosystemtap.syscall/signal.c claims to test 'kill', but actually doesn't.
David Smith [Wed, 12 Mar 2014 17:29:03 +0000 (12:29 -0500)]
systemtap.syscall/signal.c claims to test 'kill', but actually doesn't.

10 years agoFix last NEWS change.
David Smith [Wed, 12 Mar 2014 17:27:47 +0000 (12:27 -0500)]
Fix last NEWS change.

10 years agoImprove the syscall.openat probe.
David Smith [Wed, 12 Mar 2014 17:25:39 +0000 (12:25 -0500)]
Improve the syscall.openat probe.

* tapset/linux/syscalls2.stp (syscall.openat): Truncate the mode variable,
  since the user sends a int, not a long.

10 years agoIf the syscall gate macros fail, just skip the probe.
David Smith [Wed, 12 Mar 2014 17:19:44 +0000 (12:19 -0500)]
If the syscall gate macros fail, just skip the probe.

* tapset/linux/syscalls.stpm (__syscall_gate): If _stp_syscall_nr() fails,
  just skip this probe, since that probably means we're in kernel
  context.
  (__syscall_gate2): Ditto.
  (__syscall_compat_gate): Ditto.

10 years agoMention syscall.fork variable deprecations.
David Smith [Wed, 12 Mar 2014 16:40:52 +0000 (11:40 -0500)]
Mention syscall.fork variable deprecations.

10 years agoFix PR16667 by adding clone syscall/nd_syscall tapset support.
David Smith [Wed, 12 Mar 2014 16:36:15 +0000 (11:36 -0500)]
Fix PR16667 by adding clone syscall/nd_syscall tapset support.

* tapset/linux/syscalls.stp: Add syscall.clone probe alias and deprecate
  extra variables in syscall.fork probe alias. Split out vfork support
  from syscall.fork.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Added syscall.vfork probe alias.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/syscalls.stpm: Added __syscall_gate2 macro.
* runtime/linux/compat_unistd.h: Add __NR_compat_clone defines.
* testsuite/buildok/syscalls-detailed.stp: Add syscall.clone testing and
  updated syscall.fork tests.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Added syscall.vfork testing.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/forkwait.c: Updated.
* testsuite/systemtap.syscall/clone.c: New test.
* testsuite/systemtap.syscall/vforkwait.c: Ditto.

10 years agotopsys.stp sample: use aggregations
Frank Ch. Eigler [Wed, 12 Mar 2014 16:22:15 +0000 (12:22 -0400)]
topsys.stp sample: use aggregations

10 years agoImprove task_finder/utrace shutdown.
David Smith [Wed, 12 Mar 2014 14:07:58 +0000 (09:07 -0500)]
Improve task_finder/utrace shutdown.

* runtime/stp_utrace.c (utrace_exit): Move the call to
  stp_task_work_exit() up above the calls to free the kmem caches. This
  make sure any running task work items don't have the memory freed out
  from under them.
* runtime/linux/task_finder2.c (__stp_task_finder_cleanup): Move
  utrace_shutdown() call into stap_stop_task_finder().
  (stap_stop_task_finder): Call utrace_shutdown() directly. Wait to make
  sure all tracepoint probes are finished.

10 years agoOnly require a specific kernel if we're installing on RHEL4.
David Smith [Tue, 11 Mar 2014 21:24:55 +0000 (16:24 -0500)]
Only require a specific kernel if we're installing on RHEL4.

* systemtap.spec: Only have a kernel version requirement if we're doing a
  RHEL4 build. The RHEL5+ and Fedora minimum kernel versions are past our
  minimum kernel version. This change will help container versions of
  Fedora that don't have a kernel installed.

10 years agoUpdates for python 3.3
Stan Cox [Tue, 11 Mar 2014 20:10:06 +0000 (16:10 -0400)]
Updates for python 3.3

* (celsius-bt.stp,celsius-var.stp):  Don't to use the same script for
  python2 and python3
* python.exp:  Create python2/python3 versions of above.
* python2.stp (python2_backtrace, python2_get_variable): New.
* python3.stp (get_unicode, p3_get_dict_hash, p3_get_dict_key)
  (p3_get_dict_value):  Changes for python 3.3
  (python3_backtrace, python3_get_variable): New.

10 years agoRHBZ1074842: improve error::fault errors
Frank Ch. Eigler [Tue, 11 Mar 2014 18:57:16 +0000 (14:57 -0400)]
RHBZ1074842: improve error::fault errors

* tapset/*conversions.stp: Add [man error::fault] where missing.
* man/*: Amplify & reference error::fault man page.

10 years agotestsuite: make color_parsing.exp run better in 'make check' mode
Frank Ch. Eigler [Tue, 11 Mar 2014 18:56:46 +0000 (14:56 -0400)]
testsuite: make color_parsing.exp run better in 'make check' mode

10 years agoBZ1073605 addendum, don't blacklist empty matches
Josh Stone [Tue, 11 Mar 2014 17:01:43 +0000 (10:01 -0700)]
BZ1073605 addendum, don't blacklist empty matches

For example, plt and symtab function probes have an empty filename, but
they should not be blocked for that.  This patch adds an impossible ".^"
pattern as a placeholder in those blacklist patterns that aren't used
yet.  Also add semok/semko tests to be sure probing "_start" is allowed
on entry but not on return.

10 years agoCode cleanup in tapset/linux/task.stp.
Robin Hack [Mon, 10 Mar 2014 18:21:29 +0000 (14:21 -0400)]
Code cleanup in tapset/linux/task.stp.

task_max_file_handles and task_open_file_handles:
  * use incode C macros instead of systemtap macros

10 years agoBZ1073605, prohibit uretprobes on _start
Frank Ch. Eigler [Mon, 10 Mar 2014 16:38:02 +0000 (12:38 -0400)]
BZ1073605, prohibit uretprobes on _start

gcrt0 _start's ABI is not compatible with uretprobes (doesn't have
room for a return address).  Need to extend the blacklist concept to
userspace.

10 years agoFix: stap/staprun deadlocks when probing ends.
Torsten Polle [Fri, 7 Mar 2014 20:39:31 +0000 (14:39 -0600)]
Fix: stap/staprun deadlocks when probing ends.

stap_stop_task_finder() exits utrace through utrace_exit(). At that
time, there might be outstanding task workers. Hence, waiting for
exiting the task work waits forever. Therefore exiting the task work
is done after canceling all task workers.

10 years agoFix: Crash when canceling task work.
Torsten Polle [Fri, 7 Mar 2014 20:37:11 +0000 (14:37 -0600)]
Fix: Crash when canceling task work.

As the elements of the list __stp_tf_task_work_list are removed from
the list, a safe iteration has to be used in __stp_tf_cancel_task_work().

10 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Lukas Berk [Fri, 7 Mar 2014 18:33:57 +0000 (13:33 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

10 years agoRobustify stapbm javapid check for integers
Lukas Berk [Fri, 7 Mar 2014 18:31:03 +0000 (13:31 -0500)]
Robustify stapbm javapid check for integers

*java/stapbm.in - previously the [[:digits:]] check would fail
  if there was a digit mixed in the process name, such
  as 'foo3bar'.  Now this condition catches anything but
  an integer.

10 years agoRHBZ1065757: probe_point pretty-printer: protect against null probe_point component*
Frank Ch. Eigler [Fri, 7 Mar 2014 17:37:15 +0000 (12:37 -0500)]
RHBZ1065757: probe_point pretty-printer: protect against null probe_point component*

This is a "can't happen" kind of error that appears to happen.

10 years agoUse the parser to build java method probes
Josh Stone [Thu, 6 Mar 2014 23:43:28 +0000 (15:43 -0800)]
Use the parser to build java method probes

A whole lot of staptree creation is reduced significantly by building
the libHelperSDT probes as strings and then parsing them.

10 years agoStart using the parser for complicated code blocks
Josh Stone [Thu, 6 Mar 2014 20:04:00 +0000 (12:04 -0800)]
Start using the parser for complicated code blocks

Sometimes we synthesize code to add to the user's script, and currently
this is done by manually building staptree components.  This is error
prone, and we should let the parser do it when possible.  This first
commit updates the automatic global-variable display to use the parser.

* staptree.h (struct stapfile): Add a synthetic flag.
* parse.cxx (lexer::set_current_token_chain): New, remember a token for
  chaining synthetic code back to its origin.
  (lexer::input_peek): Set the chained token.
  (parser::parse_synthetic_probe): Directly parse a synthetic probe.
  (parse_synthetic_probe): Expose this capability to the world.
* elaborate.cxx (add_global_var_display): Rewrite the synthetic end
  probes as plain strings, then fed to the parser.
  (symresolution_info::find_var): Don't warn about cross-file globals
  from synthetic code.
* session.cxx (systemtap_session::print_error_source): Follow tok->chain
  for all errors, not just macro parse_errors.

10 years agoPR16666: added strip -g testcase for symtab functionality
Lukas Berk [Thu, 6 Mar 2014 16:46:01 +0000 (11:46 -0500)]
PR16666: added strip -g testcase for symtab functionality

* minidebuginfo.exp - add new testcase, compile with debuginfo and
         'strip -g' the resulting bin
* minidebuginfo.stp - change probe point to not explicitly list process
         for reuse on new testcase

10 years agoAdd NEWS blurb about utilizing the symtab for function probes
Lukas Berk [Thu, 6 Mar 2014 16:35:24 +0000 (11:35 -0500)]
Add NEWS blurb about utilizing the symtab for function probes

10 years agoRHBZ1049083: fix typos and capitalization, expand abbreviations, slight rewordings
Martin Cermak [Thu, 6 Mar 2014 08:06:17 +0000 (09:06 +0100)]
RHBZ1049083: fix typos and capitalization, expand abbreviations, slight rewordings

10 years agoNEWS: add cautionary blurb about .callee
Jonathan Lebon [Wed, 5 Mar 2014 22:30:09 +0000 (17:30 -0500)]
NEWS: add cautionary blurb about .callee

And specify in stapprobes(3stap) that the feature requires the code to
be compiled with at least GCC 4.7

10 years agocallee.exp: adjust test for new listing and clean up
Jonathan Lebon [Wed, 5 Mar 2014 22:06:05 +0000 (17:06 -0500)]
callee.exp: adjust test for new listing and clean up

We fix the regexes for listing mode since they're now different (see
previous commit). We also fix the interface of expect_list and
expect_probe to be more intuitive (i.e. list the caller before the
callee).

10 years agocallee: improve derivation for better listing
Jonathan Lebon [Wed, 5 Mar 2014 21:56:44 +0000 (16:56 -0500)]
callee: improve derivation for better listing

Previously, doing stap -L for function("foo").callee("*") would result
in listings directly for function("bar1"), function("bar2"), etc...

With this patch, we add an intermediate step in the derivation chain:
function("foo").callee("*") --> function("foo").callee("bar1")

This will cause -L to display this derivation instead, which is closer
to what users would expect for a function("foo").* probe.

10 years agodwarf_query: add canonicalize_comps()
Jonathan Lebon [Wed, 5 Mar 2014 21:54:35 +0000 (16:54 -0500)]
dwarf_query: add canonicalize_comps()

10 years agoFix the buildok/signal-all-probes.stp testcase.
David Smith [Wed, 5 Mar 2014 18:28:29 +0000 (12:28 -0600)]
Fix the buildok/signal-all-probes.stp testcase.

* testsuite/buildok/signal-all-probes.stp: Avoid the '.callee' probe
  variant by updating the testcase.

10 years agoFix PR16660 by updating the linux/ioblock.stp tapset.
David Smith [Tue, 4 Mar 2014 22:33:25 +0000 (16:33 -0600)]
Fix PR16660 by updating the linux/ioblock.stp tapset.

* tapset/linux/ioblock.stp: Updated tapset for kernels >= 3.14, where many
  fields have been moved to the 'bi_iter' structure.

10 years agoPR14436: small adjustment
Jonathan Lebon [Tue, 4 Mar 2014 21:44:37 +0000 (16:44 -0500)]
PR14436: small adjustment

10 years agoPR14436: fix target vars for process.function.return probes
Jonathan Lebon [Mon, 3 Mar 2014 22:48:10 +0000 (17:48 -0500)]
PR14436: fix target vars for process.function.return probes

Because uretprobes rely on modifying the stack in order to catch
returns, they always had to be placed at the function's entrypc, which
meant that prologue searching could not be performed (see also PR13200).

This patch re-enables prologue searching for .return probes if necessary
(i.e. if code is unoptimized). The uretprobe remains at the entrypc, but
target variables are expanded at the prologue end and the paired entry
probe is also placed there rather than at the entrypc.

10 years agotapsets.cxx: fix not using gettext for log output
Jonathan Lebon [Tue, 4 Mar 2014 15:44:37 +0000 (10:44 -0500)]
tapsets.cxx: fix not using gettext for log output

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