]> sourceware.org Git - systemtap.git/log
systemtap.git
7 years agodtrace wrapper: tolerate \ \n etc. in $CFLAGS
Frank Ch. Eigler [Sat, 21 Jan 2017 22:58:48 +0000 (17:58 -0500)]
dtrace wrapper: tolerate \ \n etc. in $CFLAGS

A user reports that some rpmbuild make jobs can cause embedded
wackiness like \ characters in $CFLAGS.  Nuke them.

7 years agonew example: nfsd-trace.stp
Frank Ch. Eigler [Fri, 20 Jan 2017 23:28:07 +0000 (18:28 -0500)]
new example: nfsd-trace.stp

Traces nfsd operations, with file names.

7 years agoPR21065: dtrace .d usdt parser: tolerate probe ... (...) : (...); syntax
Frank Ch. Eigler [Fri, 20 Jan 2017 23:15:44 +0000 (18:15 -0500)]
PR21065: dtrace .d usdt parser: tolerate probe ... (...) : (...); syntax

Allow our /usr/bin/dtrace-impersonating usdt-.d file parser to take in
those .d files that use the "arguments passed to probe consumers"
extended syntax:

provider {
    probe FOO (int foo, char *bar) : (int foo, string bar);
}

We just quietly ignore the latter part though, so the systemtap script
sees the application's raw DTRACE_PROBE* argument list.

7 years agoruntime/unwind: don't warn about self-unwinding
Frank Ch. Eigler [Fri, 20 Jan 2017 03:04:48 +0000 (22:04 -0500)]
runtime/unwind: don't warn about self-unwinding

If a kernel backtrace traversed the stap module itself, until this
patch, the runtime emitted a pair of _stp_warn()'s complaining about
not-quite-perfect unwind data.  This is noisy and unhelpful, since a
user can't do anything about it, so we switch over to a dbug(1) type
message.

7 years agosystemtap.spec: add python*-setuptools buildrequires
Frank Ch. Eigler [Thu, 19 Jan 2017 21:28:30 +0000 (16:28 -0500)]
systemtap.spec: add python*-setuptools buildrequires

On some distros, these packages are not in the basic buildroot.

7 years agoHandle F24 dropping ppc64 32-bit exe support in the testsuite.
David Smith [Fri, 20 Jan 2017 19:06:40 +0000 (13:06 -0600)]
Handle F24 dropping ppc64 32-bit exe support in the testsuite.

* testsuite/lib/compile_flags.exp (arch_compile_init): New
  function. Fedora 24 ppc64 has dropped 32-bit exe support. Now on ppc64
  systems, we test the 32-bit support. If it doesn't work (or isn't
  present), assume only 64-bit exe support.
  (arch_compile_flags): For ppc64, return the number of compile flags
  arch_compile_init() determined for this system.
  (arch_compile_flag): Ditto.
* testsuite/lib/systemtap.exp (setup_systemtap_environment): Call
  arch_compile_init().

7 years agoAdd a syscalls macro to the dyninst tapset that the python tapsets use.
David Smith [Thu, 19 Jan 2017 20:43:49 +0000 (14:43 -0600)]
Add a syscalls macro to the dyninst tapset that the python tapsets use.

* tapset/dyninst/syscalls.stpm: New file.

7 years agoAdd python probe documentation to the man pages.
David Smith [Thu, 19 Jan 2017 17:10:31 +0000 (11:10 -0600)]
Add python probe documentation to the man pages.

* man/stapprobes.3stap: Add python probe documentation.
* stapref.1: Ditto.

7 years agoMove and update comment in systemtap.spec.
David Smith [Mon, 16 Jan 2017 18:54:24 +0000 (12:54 -0600)]
Move and update comment in systemtap.spec.

7 years agotweak python helper installation paths
Frank Ch. Eigler [Mon, 16 Jan 2017 18:23:57 +0000 (13:23 -0500)]
tweak python helper installation paths

Since our python helper includes C shared libraries, all the files
(including .egg-info) will get put under %python_sitearch
(/usr/lib64/...) rather than %python_sitelib (/usr/lib/...).

The translate-time stap-resolve-module-function* file belongs in
the -devel subrpm, not -runtime.

7 years agotestsuite infrastructure: change stap_run api
Frank Ch. Eigler [Mon, 16 Jan 2017 15:58:41 +0000 (10:58 -0500)]
testsuite infrastructure: change stap_run api

... add a few testcase .exp stragglers

7 years agoAnnounce python probe support in NEWS.
David Smith [Mon, 16 Jan 2017 15:30:05 +0000 (09:30 -0600)]
Announce python probe support in NEWS.

7 years agoFix the python helper module compiliation.
David Smith [Mon, 16 Jan 2017 15:29:38 +0000 (09:29 -0600)]
Fix the python helper module compiliation.

* python/Makefile.am: Fix a problem where we were using the system's copy
  of sdt.h, instead of the source tree's copy of sdt.h.
* python/Makefile.in: Regenerated.

7 years agotestsuite infrastructure: change stap_run api
Frank Ch. Eigler [Mon, 16 Jan 2017 15:24:45 +0000 (10:24 -0500)]
testsuite infrastructure: change stap_run api

Formerly, the stap_run tcl proc accepted a target stap script file
name both as its first argument, as well as in the general stap
argument list at the end.  It passed the former name as an extra file
name iff it existed in the $srcdir/$testdir.  Some tests happened to
use test names that matched files, so triggered this stap_run
heuristic, even if the .stp files were specified some other way.  This
led to extra stap arguments, leading to "unused $0/@0 ..."  warnings,
leading to test failures.

Now, stap_run never does anything clever with its first parameter - it
just uses it to construct the dejagnu test case id/name.  The .stp
file name (if any - if not using -e SCRIPT for example) is now
expected to be included by the testcase.exp as arguments at the end.

7 years agotweak unused $n/@n warning for argv tapset users
Frank Ch. Eigler [Mon, 16 Jan 2017 15:23:23 +0000 (10:23 -0500)]
tweak unused $n/@n warning for argv tapset users

Use the demangled (original) names in s.globals[] rather than mangled
name to heuristically identify use of the argv tapset (and thus
suppression of the warnings).

7 years agoAdd support for python 2 unicode objects.
David Smith [Thu, 12 Jan 2017 20:31:29 +0000 (14:31 -0600)]
Add support for python 2 unicode objects.

* tapset/python2.stp: Add support for the unicode type. Move the python
  module list into a macro, so we've only got one copy.
* testsuite/systemtap.python/python2.exp: Expect working unicode strings.

7 years agoRHBZ1412691 - fix kernel mem leak during tapset task_cwd_path()
Kyle Walker [Thu, 12 Jan 2017 15:11:39 +0000 (10:11 -0500)]
RHBZ1412691 - fix kernel mem leak during tapset task_cwd_path()

7 years agoMerge remote-tracking branch 'origin/master' into dsmith/python
David Smith [Wed, 11 Jan 2017 21:10:07 +0000 (15:10 -0600)]
Merge remote-tracking branch 'origin/master' into dsmith/python

7 years agoFix python 3 intermittent dictionary failures.
David Smith [Wed, 11 Jan 2017 21:09:05 +0000 (15:09 -0600)]
Fix python 3 intermittent dictionary failures.

* tapset/python3.stp: Fix intermittent failure with looking up values in
  dictionaries.

7 years agoFix python3 marker issue.
David Smith [Wed, 11 Jan 2017 20:55:33 +0000 (14:55 -0600)]
Fix python3 marker issue.

* python/HelperSDT/_HelperSDT.c (PyInit__HelperSDT): Force the compiler to
  fully resolve the function pointer value.

7 years agoPR21020: allow --compatible=3.0 java probe string $args without leaks
Tetsuo Handa [Wed, 11 Jan 2017 02:38:15 +0000 (21:38 -0500)]
PR21020: allow --compatible=3.0 java probe string $args without leaks

With some extra work, one can track which individual java parameters
were stringified & need free()ing, and which don't.  That way,
--compatible=3.0 java probes can take string arguments again,
leaklessly.

7 years agosyscalls tapset: compat_io_setup $nr_events
Frank Ch. Eigler [Wed, 11 Jan 2017 02:21:15 +0000 (21:21 -0500)]
syscalls tapset: compat_io_setup $nr_events

We should accept $nr_events as well as the $nr_reqs variables
for the same value.

7 years agolinux memory tapset: do_page_mkwrite changes
Frank Ch. Eigler [Wed, 11 Jan 2017 02:13:45 +0000 (21:13 -0500)]
linux memory tapset: do_page_mkwrite changes

Adapt to linux commit 38b8cb7fbb, wherein the arguments for
do_page_mkwrite have been changed.

7 years agotapset typo fix
Frank Ch. Eigler [Wed, 11 Jan 2017 01:55:19 +0000 (20:55 -0500)]
tapset typo fix

Caught by parseok/compatible.stp test case.

7 years agotestsuite: suppress warnings from empty strings passed to stap
Frank Ch. Eigler [Tue, 10 Jan 2017 20:16:58 +0000 (15:16 -0500)]
testsuite: suppress warnings from empty strings passed to stap

A test case passed a ""-valued tcl variable to a stap command line,
which due to tcl quoting rules means passing an empty string (rather
than nothing).  Use some harmless real option for the empty case,
since we don't want the "" passed through to stap.

7 years agodyninst -t runtime fix: lock contention counts
Frank Ch. Eigler [Tue, 10 Jan 2017 20:16:12 +0000 (15:16 -0500)]
dyninst -t runtime fix: lock contention counts

There was a missing macro definition for "stap --runtime=dyninst -t ..."
runs.  beginenderror.exp test case showed problem.

7 years agoSwap python marker arguments around.
David Smith [Tue, 10 Jan 2017 19:21:22 +0000 (13:21 -0600)]
Swap python marker arguments around.

* python/HelperSDT/_HelperSDT.c (trace_callback): Swap the argument order
  around so that the module name and key are always first.
* tapset-python.cxx: Expect the new marker argument order.

7 years agoHandle python3 class variable references, like '$class->member'.
David Smith [Tue, 10 Jan 2017 18:35:25 +0000 (12:35 -0600)]
Handle python3 class variable references, like '$class->member'.

* tapset/python3.stp: Add support for most python objects (such as
  classes), which use the same internal function to get their attributes.
* python/HelperSDT/_HelperSDT.c (PyInit__HelperSDT): For python version 3,
  add an 'Init' marker.
* tapset-python.cxx (build): Add code to hook up to the new 'Init' marker.
* tapset/python2.stp: Added small simplification.
* testsuite/systemtap.python/python3.exp: Increase timeout values and
  update.

7 years agoconfigury: look for json-c >= 0.12 for monitor/interactive modes
Frank Ch. Eigler [Mon, 9 Jan 2017 21:57:02 +0000 (16:57 -0500)]
configury: look for json-c >= 0.12 for monitor/interactive modes

This way older json-c libraries aren't accidentally accepted by the
configure stage, leading to later build problems.

7 years agoPR21020: reorganize data passing abi for java method parameters
Frank Ch. Eigler [Fri, 6 Jan 2017 22:37:37 +0000 (17:37 -0500)]
PR21020: reorganize data passing abi for java method parameters

Under a new ABI, all java object types are supported for passing to
java-method probes, by converting them all within the JVM to strings.
The systemtap script side now gets $argX being all utf-char-pointers,
which are loaded into script-side string variables with synthetic
user_string_warn() function calls.

A backward compatibility ABI is preserved in the java helper class
as well as the translator, under --compatible=3.0.

The java testsuite is drastically simplified (and execution time
shortened) to one class.  These now test string and object passing
too, with it and stapbm extended to be able to locate the HelperSDT
jar / .so files within the systemtap installation $prefix.  This way,
the system /usr/lib/jvm/.... path does not need to be populated just
for stap tests to run.  (We should sometime extend the tests to cover
all the argument arities, but eyeballing looks OK for now.)

7 years agoelaborate.cxx: optimizations should elide elision warnings for synthetic probes
Frank Ch. Eigler [Fri, 6 Jan 2017 22:36:26 +0000 (17:36 -0500)]
elaborate.cxx: optimizations should elide elision warnings for synthetic probes

We need to check not only whether a token is associated with a
user-vs-tapset file, but also whether the file is entirely synthetic.
We don't want to warn users about the latter.  Relevant to the
new java method probes' argXXX synthetic script variables.

7 years agoimprove system() overlong string handling
Frank Ch. Eigler [Fri, 6 Jan 2017 15:31:18 +0000 (10:31 -0500)]
improve system() overlong string handling

The implementation of the system() tapset function involves sending a
ctl message via the runtime transport system, which can impose smaller
string length limits (STP_CTL_BUFFER_SIZE) than the usual systemtap
strings (MAXSTRINGLEN).  Conditions like that resulted in a kernel
message (printk) being printed, which is a quiet failure.

New code increases the ctl-buffer-size from 256 to 384, and tweaks
_stp_ctl_send() to send an _stp_warn() in case of an overlength input.
The system() tapset function docs point out this possibility.

7 years agoModify the python3 tapset to support python 3.6m.
David Smith [Fri, 6 Jan 2017 14:52:47 +0000 (08:52 -0600)]
Modify the python3 tapset to support python 3.6m.

7 years agoGet python 3.5 variable access semi-working again (no class variables).
David Smith [Thu, 5 Jan 2017 22:17:45 +0000 (16:17 -0600)]
Get python 3.5 variable access semi-working again (no class variables).

* tapset/python3.stp: Get python 3.5 semi-working again (without class
  variable support). Python 3.6 doesn't work yet.

7 years agoAttempt to support multiple python 3 versions.
David Smith [Wed, 4 Jan 2017 22:06:04 +0000 (16:06 -0600)]
Attempt to support multiple python 3 versions.

* tapset/python3.stp: Attempt to support python versions 3.4, 3.5, and 3.6.

7 years agoMerge remote-tracking branch 'origin/master' into dsmith/python
David Smith [Wed, 4 Jan 2017 19:52:37 +0000 (13:52 -0600)]
Merge remote-tracking branch 'origin/master' into dsmith/python

7 years agoelfutils moved from fedorahosted, use http://elfutils.org/
Mark Wielaard [Fri, 30 Dec 2016 01:13:08 +0000 (02:13 +0100)]
elfutils moved from fedorahosted, use http://elfutils.org/

Update README, configure.ac and warning::debuginfo.7stap.

7 years agospin-rawhide: drop "set -e"
Frank Ch. Eigler [Wed, 28 Dec 2016 18:27:28 +0000 (13:27 -0500)]
spin-rawhide: drop "set -e"

This flag, while well-intentioned, would need corollary tweaks
elsewhere in the script to identify "failure" conditions such as
non-empty diffs.

7 years agoPR20821/PR14924 cont'd: adapt examples/.../mutex-contention.stp
Frank Ch. Eigler [Wed, 28 Dec 2016 18:25:40 +0000 (13:25 -0500)]
PR20821/PR14924 cont'd: adapt examples/.../mutex-contention.stp

Switch to @entry($var) in .return probes.

7 years agolinux task tapset, adapt to lkml thread_info into task_struct change
Frank Ch. Eigler [Tue, 27 Dec 2016 00:42:45 +0000 (19:42 -0500)]
linux task tapset, adapt to lkml thread_info into task_struct change

commit c65eacbe290b8141554c71b2c94489e73ade8c8d
Author: Andy Lutomirski <luto@kernel.org>
Date:   Tue Sep 13 14:29:24 2016 -0700

    sched/core: Allow putting thread_info into task_struct

... conditionally moves the cpu field out of thread_info.  We follow suit.

7 years agostaprun: stop forcing off kprobes-optimization for newer kernels
Frank Ch. Eigler [Mon, 26 Dec 2016 16:50:20 +0000 (11:50 -0500)]
staprun: stop forcing off kprobes-optimization for newer kernels

Turn off this protective measure put in place back in the 3.4 era.
We hope modern kernels are robust enough; if not, NEWS contains
workaround instructions, and we can snap this back on in staprun.

7 years agoFix get_user_pages_remote() test for 4.10-rc0 kernels.
Frank Ch. Eigler [Mon, 26 Dec 2016 15:39:09 +0000 (10:39 -0500)]
Fix get_user_pages_remote() test for 4.10-rc0 kernels.

This kernel API is undergoing considerable flux.

7 years agojava: add basic support for java objects
Lukas Berk [Fri, 23 Dec 2016 23:12:01 +0000 (18:12 -0500)]
java: add basic support for java objects

Previously stap was only able to probe primitive java types.

Instead of falling back on string cases if a primitive isn't found
(thus erroring out if the type doesn't match, such as an object), we
now explicitly check for the a string type, and default to converting
the object name to a string if no primitive is found and reporting that.

Originally reported: https://sourceware.org/ml/systemtap/2016-q4/msg00125.html

7 years agoPR20982: fix some function parameter mis-renaming typo in PR14900
Frank Ch. Eigler [Wed, 21 Dec 2016 21:08:00 +0000 (16:08 -0500)]
PR20982: fix some function parameter mis-renaming typo in PR14900

... this time in function ustack:long

7 years agoPR20982: fix some function parameter mis-renaming typo in PR14900
Benjamin Coddington [Wed, 21 Dec 2016 20:43:39 +0000 (15:43 -0500)]
PR20982: fix some function parameter mis-renaming typo in PR14900

... in function stack:long

7 years agoAdd python 2.6 (RHEL6) probe support.
David Smith [Wed, 21 Dec 2016 16:21:05 +0000 (10:21 -0600)]
Add python 2.6 (RHEL6) probe support.

* tapset/python2.stp: Add python 2.6 (RHEL6) support.
* testsuite/systemtap.python/python2.exp: Ditto.

7 years agoHandle python2 class variable references, like '$class->member'.
David Smith [Wed, 21 Dec 2016 16:05:36 +0000 (10:05 -0600)]
Handle python2 class variable references, like '$class->member'.

* tapset-python.cxx (python_var_expanding_visitor::visit_target_symbol):
  Rework the python variable handling to support python class variable
  references, like '$class->member'.
* tapset/python2.stp (Py2Tuple_Size): New function.
  (Py2Class_Lookup): Ditto.
  (Py2Class_GetAttr): Ditto.
  (Py2Class_Repr): Ditto.
  (Py2Instance_GetAttr): Ditto.
  (Py2Instance_Repr): Ditto.
  (Py2Object_GetItem): Ditto.
  (Py2Object_GetAttr): Ditto.
  (python2_get_var_obj): Renamed from python2_get_variable(), since it no
  longer returns a string representation of a object, but an object
  pointer.
* testsuite/systemtap.python/python2.exp: Added class member variable test.
* testsuite/systemtap.python/class.stp: Ditto.

7 years agoHandle probes in python class methods.
David Smith [Mon, 19 Dec 2016 18:58:00 +0000 (12:58 -0600)]
Handle probes in python class methods.

* python/HelperSDT/__init__.py: Rework breakpoint logic a bit to handle
  breakpoints in python classes.
* testsuite/systemtap.python/python2.exp: Add class backtrace test.
* testsuite/systemtap.python/python3.exp: Ditto.
* testsuite/systemtap.python/class.py: New file.
* testsuite/systemtap.python/class.stp: New file.

7 years agoupdate spin-rawhide with krb5 instructions
Frank Ch. Eigler [Mon, 19 Dec 2016 17:04:03 +0000 (12:04 -0500)]
update spin-rawhide with krb5 instructions

7 years agoMake sure interned_string::find forwards correctly
Josh Stone [Thu, 15 Dec 2016 21:13:05 +0000 (13:13 -0800)]
Make sure interned_string::find forwards correctly

This fixes a template error seen on RHEL7 boost.

7 years agoAdd a small runtime fix to __stp_time_local_update().
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.

7 years agoAdd new subrpms for python support to the spec file.
David Smith [Thu, 15 Dec 2016 19:06:02 +0000 (13:06 -0600)]
Add new subrpms for python support to the spec file.

* systemtap.spec: Add two new subrpms, 'systemtap-runtime-python2' and
  'systemtap-runtime-python3', that contain python probe support.

7 years agoSimplify embedded-tags visitors
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.

7 years agoAdd tests for python 2 and python 3 probes.
David Smith [Wed, 14 Dec 2016 16:20:32 +0000 (10:20 -0600)]
Add tests for python 2 and python 3 probes.

* testsuite/systemtap.python/python2.exp: New test case.
* testsuite/systemtap.python/python3.exp: Ditto.
* testsuite/systemtap.python/celsius-bt.stp: New python test case support
  file.
* testsuite/systemtap.python/python-var.stp: Ditto.
* testsuite/systemtap.python/celsius.py: Moved from
  testsuite/systemtap.apps/celsius.py.
* configure.ac: Pass python-related values down to testsuite/configure.
* testsuite/Makefile.am: Handle python-related values passed down from
  configure.
* testsuite/configure.ac: Ditto.
* configure: Regenerated.
* doc/beginners/Makefile.in: Ditto.
* java/Makefile.in: Ditto.
* python/Makefile.in: Ditto.
* testsuite/Makefile.in: Ditto.
* testsuite/configure: Ditto.
* testsuite/systemtap.apps/celsius-bt.stp: Deleted old python test case
  files.
* testsuite/systemtap.apps/celsius-var.stp: Ditto.
* testsuite/systemtap.apps/python.exp: Ditto.
* testsuite/systemtap.apps/python2.patch: Ditto.
* testsuite/systemtap.apps/python2.stp: Ditto.
* testsuite/systemtap.apps/python3.patch: Ditto.
* testsuite/systemtap.apps/python3.stp: Ditto.
* testsuite/systemtap.python/python-var.py: Ditto.

7 years agoImprove relayfs autoconf test for F24.
David Smith [Wed, 14 Dec 2016 16:07:15 +0000 (10:07 -0600)]
Improve relayfs autoconf test for F24.

* runtime/linux/autoconf-relay_buf-per_cpu_ptr.c: Improve test so that it
  properly fails on Fedora 24's 4.8.10-200.fc24.x86_64 kernel.

7 years agoRemoved runtime/linux/autoconf-get_proc_freq.c, which isn't ready yet.
David Smith [Tue, 13 Dec 2016 23:01:12 +0000 (17:01 -0600)]
Removed runtime/linux/autoconf-get_proc_freq.c, which isn't ready yet.

7 years agoFix get_user_pages_remote() autoconf test for 4.8 kernels.
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.

7 years agoFix python probe script hashing.
David Smith [Mon, 12 Dec 2016 19:16:23 +0000 (13:16 -0600)]
Fix python probe script hashing.

* tapset-python.cxx (python_derived_probe_group::enroll): Create/update
  the global embedded code that contains the python probe data. This data
  appears in pass 2 output and so contributes to the script hash.

7 years agoMerge remote-tracking branch 'origin/master' into dsmith/python
David Smith [Mon, 12 Dec 2016 15:35:34 +0000 (09:35 -0600)]
Merge remote-tracking branch 'origin/master' into dsmith/python

7 years agoPR20889: metadatabase.db location
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.

7 years agoFix BZ1386120 by fixing systemtap bulk-mode output.
David Smith [Fri, 9 Dec 2016 19:50:34 +0000 (13:50 -0600)]
Fix BZ1386120 by fixing systemtap bulk-mode output.

* runtime/transport/relay_v2.c (__stp_relay_wakeup_timer): Fix typo error
  introduced in bulk-mode output.

7 years agoFix BZ1386120 by updating systemtap to handle the 4.9 kernel.
David Smith [Fri, 9 Dec 2016 17:41:35 +0000 (11:41 -0600)]
Fix BZ1386120 by updating systemtap to handle the 4.9 kernel.

* runtime/linux/access_process_vm.h (__access_process_vm_): Use
  STAPCONF_GET_USER_PAGES_REMOTE_FLAGS to handle get_user_pages_remote()
  kernel function API change.
* runtime/transport/procfs.c (_stp_proc_read): Use _stp_get_rchan_subbuf()
  macro to handle kernel relayfs rchan->buf changes.
* runtime/transport/relay_v2.c (__stp_relay_wakeup_timer): Ditto.
  (_stp_data_write_reserve): Ditto.
* runtime/transport/symbols.c (_stp_module_panic_notifier): Ditto.
* buildrun.cxx (compile_pass): Add autoconf-style tests.
* runtime/linux/autoconf-get_user_pages_remote-flags.c: New file.
* runtime/linux/autoconf-relay_buf-per_cpu_ptr.c: New file.
* runtime/transport/relay_compat.h: New file.

7 years agoelaborate.cxx: make "side-effect-free probe" warnings suppressable
Frank Ch. Eigler [Wed, 7 Dec 2016 15:26:46 +0000 (10:26 -0500)]
elaborate.cxx: make "side-effect-free probe" warnings suppressable

The low level probe_XXXX name is not useful anyway.

7 years agoFix a problem with getting the value of a python 2 dictionary.
David Smith [Tue, 6 Dec 2016 19:39:51 +0000 (13:39 -0600)]
Fix a problem with getting the value of a python 2 dictionary.

* tapset/python2.stp: Fix a problem where we couldn't get the last item of
  a dictionary.

7 years agoStandardize error messages in tapset/python[23].stp.
David Smith [Tue, 6 Dec 2016 18:47:40 +0000 (12:47 -0600)]
Standardize error messages in tapset/python[23].stp.

7 years agoFix a problem with multiple python probes.
David Smith [Tue, 6 Dec 2016 16:54:14 +0000 (10:54 -0600)]
Fix a problem with multiple python probes.

* tapset-python.cxx (python_builder::build): Fix problem of more than one
  python probe getting a compile error. The base probe was getting
  modified more than once.

7 years agoFix the initscript/99stap/check.in syntax.
Martin Cermak [Tue, 6 Dec 2016 13:42:48 +0000 (14:42 +0100)]
Fix the initscript/99stap/check.in syntax.

7 years agoAvoid creating a file called '&1' in testsuite/systemtap.pass1-4/semko.exp.
David Smith [Fri, 2 Dec 2016 17:28:34 +0000 (11:28 -0600)]
Avoid creating a file called '&1' in testsuite/systemtap.pass1-4/semko.exp.

7 years agoAdd python 2 and python3 probe support to existing tests.
David Smith [Fri, 2 Dec 2016 16:55:43 +0000 (10:55 -0600)]
Add python 2 and python3 probe support to existing tests.

* testsuite/systemtap.base/listing_mode.exp: Add python2 and python3
  support.
* testsuite/systemtap.unprivileged/unprivileged_probes.exp: Ditto.
* testsuite/lib/systemtap.exp: Add python2_p() and python3_p() procedures.
* testsuite/systemtap.base/listing_mode.py: New file.
* testsuite/systemtap.unprivileged/test.py: New file.

7 years agoImprove python probe listing.
David Smith [Fri, 2 Dec 2016 16:45:45 +0000 (10:45 -0600)]
Improve python probe listing.

* python/stap-resolve-module-function.py (_find_wildcarded_modules): Just
  ignore C builtin modules and C extensions instead of raising errors.
  (resolve_patterns): Don't clear the returned list of matches between
  wildcards.

7 years agosocket-events.stp example revamp WIP
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.

7 years agoFix listing python probes.
David Smith [Thu, 1 Dec 2016 18:55:25 +0000 (12:55 -0600)]
Fix listing python probes.

* tapset-python.cxx (python_builder::build): Fix listing python probes by
  marking the new location as well formed and using it in all the correct
  places.

7 years agoPR20879 and add variance to -t
Cody Santing [Thu, 1 Dec 2016 17:48:27 +0000 (12:48 -0500)]
PR20879 and add variance to -t

* runtime/linux/common_session_state.h: Add STAT_OP_VARIANCE parameter to stat session initializations.
* runtime/linux/probe_lock.h: Increment contention attempts.
* translate.cxx: Print variance and contention attempts if STP_TIMING.

7 years agoAdd support for python target variable numeric array indexing.
David Smith [Wed, 30 Nov 2016 16:53:38 +0000 (10:53 -0600)]
Add support for python target variable numeric array indexing.

* tapset-python.cxx (python_var_expanding_visitor::visit_target_symbol):
  Add support for numeric array indexing.
* tapset/python2.stp (Py2Dict_GetItem_FromLong): New function.
  (Py2Object_Repr): Add variant of Py2Object_Repr() that takes a numeric
  index.
  (python2_get_variable): Add variant of python2_get_variable() that takes
  a numeric index.
* tapset/python3.stp (Py3Dict_GetItem_FromLong): New function.
  (Py3Object_Repr): Add variant of Py3Object_Repr() that takes a numeric
  index.
  (python3_get_variable): Add variant of python3_get_variable() that takes
  a numeric index.

7 years agoFixed typo in tapset/python3.stp.
David Smith [Tue, 29 Nov 2016 22:07:31 +0000 (16:07 -0600)]
Fixed typo in tapset/python3.stp.

7 years agoMerge remote-tracking branch 'origin/master' into dsmith/python
David Smith [Tue, 29 Nov 2016 21:29:53 +0000 (15:29 -0600)]
Merge remote-tracking branch 'origin/master' into dsmith/python

7 years agoAdd support for getting simple python target variables in probes.
David Smith [Tue, 29 Nov 2016 21:29:09 +0000 (15:29 -0600)]
Add support for getting simple python target variables in probes.

* tapset-python.cxx (python_var_expanding_visitor::visit_target_symbol):
  Add support for getting simple python target variables.
  (python_builder::build): Add small compile fix for RHEL7 and update
  comments.
* tapset/python2.stp (python2_get_variable): New function.
* tapset/python3.stp (Py3Dict_GetItem): Add support for python 3
  dictionaries.
  (Py3Dict_Repr): Ditto.
  (Py3Object_Repr): Simplify and add support for dictionaries.
  (python3_get_variable): New function.
* session.cxx (systemtap_session::version): Report python2 and python3
  probe support.
* tapset/linux/syscalls.stpm (__pointer): On 32-bit platforms, return a
  32-bit value.

7 years agoAdd small fix to python 3 configure support.
David Smith [Tue, 29 Nov 2016 21:20:31 +0000 (15:20 -0600)]
Add small fix to python 3 configure support.

* configure.ac: If python3 can't be found, default to searching for
  'python3-config' (instead of '-config').
* configure: Regenerated.

7 years agoFix PR20820 by making optim_stats.exp smaller.
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.

7 years agoAutoreconf following previous commit b8d6168f1f8d8a303b0d.
Martin Cermak [Wed, 23 Nov 2016 19:06:37 +0000 (20:06 +0100)]
Autoreconf following previous commit b8d6168f1f8d8a303b0d.

7 years agoFix the boot time probing feature for RHEL6 and Fedora19+ systems.
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.

7 years agoNEWS: mention that .return { $var } should be replaced with @entry($var)
Frank Ch. Eigler [Wed, 23 Nov 2016 18:11:04 +0000 (13:11 -0500)]
NEWS: mention that .return { $var } should be replaced with @entry($var)

7 years agoAdded support for python 2 'long' int objects (from python3.stp).
David Smith [Mon, 21 Nov 2016 18:32:01 +0000 (12:32 -0600)]
Added support for python 2 'long' int objects (from python3.stp).

* tapset/python2.stp (Py2Long_AsLongLongAndOverflow_Small): New function,
  ported over from python3.stp.
  (Py2Long_AsLongLongAndOverflow_Big): Ditto.
  (Py2Long_AsLongLong): Ditto.
  (Py2Dict_GetItem): Add python 'long' support.
  (Py2Object_Repr): Ditto.

7 years agoAdded support for python dictionaries to tapset/python2.stp.
David Smith [Mon, 21 Nov 2016 18:11:10 +0000 (12:11 -0600)]
Added support for python dictionaries to tapset/python2.stp.

* tapset/python2.stp (Py2Dict_GetItem): New function.
  (Py2DictEntry_Repr): Ditto.
  (Py2Dict_Repr): Ditto.
  (Py2Object_Repr): Added dict support and simplified a bit.

7 years agoAdd support for '$$parms', '$$locals', and '$$vars' in python 3 probes.
David Smith [Fri, 18 Nov 2016 18:54:25 +0000 (12:54 -0600)]
Add support for '$$parms', '$$locals', and '$$vars' in python 3 probes.

* tapset/python3.stp: Add support for printing local variables.
* tapset/python2.stp: Corrected warning message.
* tapset-python.cxx (python_var_expanding_visitor::visit_target_symbol):
  Removed debug print.

7 years agoPR20821/PR14924: further gradual deprecation of .return { $var } use
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.

7 years agorpm_finder: colorize "missing kernel-devel" or "-debuginfo" messages
Frank Ch. Eigler [Fri, 18 Nov 2016 16:27:42 +0000 (11:27 -0500)]
rpm_finder: colorize "missing kernel-devel" or "-debuginfo" messages

7 years agoFix PR14924 by warning when not using @entry($var) in a return probe.
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.

7 years agotranslator pass-3: close auxiliary_outputs[] after we're done with them
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.

7 years agoFix typo.
David Smith [Wed, 16 Nov 2016 21:02:25 +0000 (15:02 -0600)]
Fix typo.

7 years agoAdd support for '$$parms', '$$locals', and '$$vars' in python 2 probes.
David Smith [Wed, 16 Nov 2016 20:54:43 +0000 (14:54 -0600)]
Add support for '$$parms', '$$locals', and '$$vars' in python 2 probes.

* tapset-python.cxx (python_var_expanding_visitor): New function.
  (python_builder::build): Use python_var_expanding_visitor to expand
  python variable requests in the probe body.
* tapset/python2.stp (Py2Int_AsLong): New function.
  (Py2Tuple_GetItem): Ditto.
  (Py2Tuple_Repr): Ditto.
  (Py2List_GetItem): Ditto.
  (Py2List_Repr): Ditto.
  (Py2Object_Repr): Ditto.
  (python2_get_typename): Ditto.
  (python2_get_locals): Ditto.

7 years agoUpdate sample command to take multiple keywords
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.

7 years agotestsuite: fix the `tail systemtap.sum` invocation
Martin Cermak [Mon, 14 Nov 2016 10:23:37 +0000 (11:23 +0100)]
testsuite: fix the `tail systemtap.sum` invocation

7 years agoRename 'python' probes to 'python2' probes.
David Smith [Fri, 11 Nov 2016 20:18:22 +0000 (14:18 -0600)]
Rename 'python' probes to 'python2' probes.

7 years agoAdd support for getting python 2 and python 3 backtraces.
David Smith [Fri, 11 Nov 2016 19:37:59 +0000 (13:37 -0600)]
Add support for getting python 2 and python 3 backtraces.

* tapset-python.cxx
  (python_functioncall_expanding_visitor::visit_functioncall): New function.
  (python_builder::build): Use the new
  python_functioncall_expanding_visitor class to expand/replace python
  backtrace requests in the probe body.
* tapset/python2.stp: New file.
* tapset/python3.stp: New file.

7 years agoNew example script socket-events.stp
Cody Santing [Fri, 11 Nov 2016 16:47:49 +0000 (11:47 -0500)]
New example script socket-events.stp

* general/socket-events.meta: Associated meta file
* general/socket-events.stp: Tracks life cycle and syscall events of all sockets of a specified PID.
* index.html: Automatically updated using perl script to include information on new example.
* index.txt: Same
* keyword-index.html: Same
* keyword-index.txt: Same
* metadatabase.db: Same

7 years agoRemoved debug prints from python/HelperSDT/__init__.py.
David Smith [Fri, 11 Nov 2016 14:47:05 +0000 (08:47 -0600)]
Removed debug prints from python/HelperSDT/__init__.py.

7 years agoFix PR20735 by updating kprobes.c to avoid a soft lockup.
David Smith [Thu, 10 Nov 2016 15:59:16 +0000 (09:59 -0600)]
Fix PR20735 by updating kprobes.c to avoid a soft lockup.

* runtime/linux/kprobes.c: Instead of grabbing the module mutex around
  calling kallsyms_on_each_symbol(), just disable/enable preemption
  instead to avoid a soft lockup.

7 years agonew sample: tcp_retransmission
Bingwu Yang [Tue, 8 Nov 2016 20:08:43 +0000 (15:08 -0500)]
new sample: tcp_retransmission

7 years agoHACKING: discourage posting of patches for machine-generated files
Frank Ch. Eigler [Mon, 7 Nov 2016 14:39:34 +0000 (09:39 -0500)]
HACKING: discourage posting of patches for machine-generated files

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