David Smith [Thu, 15 Dec 2016 19:09:49 +0000 (13:09 -0600)]
Add a small runtime fix to __stp_time_local_update().
* runtime/time.c (__stp_time_local_update): Call
write_seqlock_irqsave()/write_sequnlock_irqrestore() instead of
write_seqlock()/write_sequnlock() to correctly wait while interrupts are
disabled.
Josh Stone [Wed, 14 Dec 2016 19:55:07 +0000 (11:55 -0800)]
Simplify embedded-tags visitors
Both embeddedcode and embedded_expr now have tagged_p members, and a few
of the cases checking for embedded tags can now do so more directly,
rather than trying a deep traversal.
David Smith [Tue, 13 Dec 2016 22:55:36 +0000 (16:55 -0600)]
Fix get_user_pages_remote() autoconf test for 4.8 kernels.
* runtime/linux/autoconf-get_user_pages_remote-flags.c: Since later
autoconf-style test don't get the results of previous tests, remove
STAPCONF_GET_USER_PAGES_REMOTE check.
Cody Santing [Fri, 9 Dec 2016 21:40:10 +0000 (16:40 -0500)]
PR20889: metadatabase.db location
* Makefile.am: Remove DOCDIR. Copy examples to $pkgdatadir rather than $docdir.
* Makefile.in: Updated using autoreconf.
* NEWS: Mention new examples location.
* doc/Makefile.in: Updated using autoreconf.
* doc/beginners/Makefile.in: same
* interactive.cxx: Look for metadatabase.db under PKGDATADIR rather than DOCDIR.
* java/Makefile.in: Updated using autoreconf.
* systemtap.spec: Update location of examples directory.
Cody Santing [Thu, 1 Dec 2016 19:46:14 +0000 (14:46 -0500)]
socket-events.stp example revamp WIP
* testsuite/systemtap.examples/general/socket-events.stp: Made the output much more compact. Still has a few things needing to be updated, mainly occasional timing inaccuracies.
Martin Cermak [Tue, 29 Nov 2016 13:33:05 +0000 (14:33 +0100)]
Fix PR20820 by making optim_stats.exp smaller.
Avoid "soft lockups" generated by optim_stats.exp by lowering
its cpu load down. Avoid division by zero caused by rounding
errors by numerical scaling. Introduce per-arch tresholds.
Move the testcase description from optim_stats1.stp to
optim_stats.exp.
Martin Cermak [Wed, 23 Nov 2016 18:45:10 +0000 (19:45 +0100)]
Fix the boot time probing feature for RHEL6 and Fedora19+ systems.
Before this fix, the boot time probing feature was proved working
on RHEL7. This patch adds a few little fixes making the feature
work on RHEL6 and Fedora19+ systems. Changes:
configure.ac: Make the dracut bin dir configurable at the configure
time. This is because of Fedora systems that have the dracut binary
located in /usr/bin rather than /sbin which is the typical location
for RHEL. Also mark initscript/99stap/{install,check} as AC config
files.
initscript/99stap/{install,check}.in: These files are bodies of the
install() and check() functions defined in module-setup.sh extracted
into standalone executable shell scripts. The older dracut shipped
with RHEL6 expects these bits right there.
initscript/99stap/start-staprun.sh: Don't create the pid file at this
stage. This script runs very early at the "cmdline" dracut hoo time.
At this time, RHEL7 systems offer writable /run directory, so that
the pid file can be stored there, but RHEL6 systems do not have a
writable place like that. Rhel6 only has /dev writable at that
stage, but misusing /dev for the pid file purposes wouldn't be clean.
So we use a mechanism based on /proc cescribed below instead.
initscript/systemtap.in: Don't move over any pid files from
/var/run/systemtap, because we stopped creating pid files at the
boot time per above. Instead we use stap -E to add a probe
advertising the running service in /proc/systemtap.
systemtap.spec: A few simple changes making the boot time probing
feature work on RHEL6 and Fedora19 systems.
Frank Ch. Eigler [Thu, 17 Nov 2016 16:52:33 +0000 (11:52 -0500)]
PR20821/PR14924: further gradual deprecation of .return { $var } use
* tapsets.cxx (var_expanding_visitor::visit_defined_op): Don't crash
if something weird is nested beneath @defined(...) that throws a
semantic error.
(visit_target_symbol_saved_return): Use save_and_restore<> object
instead of manual save/restore steps.
(dwarf_derived_probe ctor): Ditto.
(visit_entry_op): Ditto. Also, detect nestedness in @defined()
to trigger operand expansion attempt. This is tricky.
* main.cxx (passes_0_4): If -vvv, then pretty-print the script even
if erroneous, to see aftereffects of optimization, $var expansion
etc.
* staptree.cxx (vardecl::printsig): Some synthetic globals don't have
unmangled names, so print their normal name as a fallback.
* elaborate.cxx (visit_perf_op): note that @defined(@perf("junk"))
returns the literal 1. (Recently, it merely crashed the translator
in a .return probe.)
* testsuite/buildok/fortyfour.stp: New test case.
Martin Cermak [Fri, 18 Nov 2016 15:12:36 +0000 (16:12 +0100)]
Fix PR14924 by warning when not using @entry($var) in a return probe.
tapsets.cxx: Show warning when a $var gets used in a return probe
instead of @return($var). Allow the @defined(@entry()) construct.
tapset/linux/*: Use @entry() in return probes.
testsuite/systemtap.base/at_var.exp: Use -w to suppress the newly added
warning in tests that basically check that $var == @entry($var) in a
return probe.
Frank Ch. Eigler [Thu, 17 Nov 2016 11:12:59 +0000 (06:12 -0500)]
translator pass-3: close auxiliary_outputs[] after we're done with them
Otherwise we hang onto potentially dozens of unnecessary fds into
pass4. It is messy that a translator_output doesn't necessarily take
an fstream, and can write to a generic ostream, so we can only close
in the former case.
Cody Santing [Wed, 16 Nov 2016 18:40:16 +0000 (13:40 -0500)]
Update sample command to take multiple keywords
* NEWS: Added a small mention of the new sample command.
* interactive.cxx: Sample now accepts FTS full-text index query statements rather than just one keyword.
* testsuite/systemtap.examples/examples-index-gen.pl: Update to now use the new virtual table.
* testsuite/systemtap.examples/metadatabase.db: New virtual table created that uses FTS3.