]> sourceware.org Git - systemtap.git/log
systemtap.git
6 years agostaptree pretty-print: mark up register/deref/bitfield nodes with "@" tag
Frank Ch. Eigler [Thu, 31 Aug 2017 19:03:43 +0000 (15:03 -0400)]
staptree pretty-print: mark up register/deref/bitfield nodes with "@" tag

Also, don't claim "fetch" for registers as they may be lvalues.

6 years agoAdd a minor update to the strace example and meta file.
David Smith [Thu, 31 Aug 2017 14:38:18 +0000 (09:38 -0500)]
Add a minor update to the strace example and meta file.

* testsuite/systemtap.examples/process/strace.stp (filter_p): Remove
  comment about PR6762, which has been fixed.
* testsuite/systemtap.examples/process/strace.meta: Run the script on a
  specific process, instead of on the entire system (where we would hit
  "probe overhead exceeded threshold").

6 years agoUpdate tapset/python2.stp for RHEL6-era systems.
David Smith [Thu, 31 Aug 2017 14:35:41 +0000 (09:35 -0500)]
Update tapset/python2.stp for RHEL6-era systems.

* tapset/python2.stp (Py2Long_AsLongLongAndOverflow_Small): Don't bother
  trying to see if the Py2LongObject is defined, go ahead and use it. The
  check to see if it is defined seems to fail.
  (Py2Long_AsLongLongAndOverflow_Big): Ditto.

6 years agoKFAIL more .callee tests in systemtap.unprivileged/unprivileged_myproc.exp.
David Smith [Wed, 30 Aug 2017 20:51:40 +0000 (15:51 -0500)]
KFAIL more .callee tests in systemtap.unprivileged/unprivileged_myproc.exp.

6 years agoSend the kernel build id to the http server.
Stan Cox [Wed, 30 Aug 2017 20:46:09 +0000 (16:46 -0400)]
Send the kernel build id to the http server.

* client-http.cxx (http_client::get_kernel_buildid) New.
(http_client_backend::find_and_connect_to_server):  Use it.

6 years agoFix PR22036 by handling "struct bio" kernel changes.
David Smith [Tue, 29 Aug 2017 21:27:23 +0000 (16:27 -0500)]
Fix PR22036 by handling "struct bio" kernel changes.

* buildrun.cxx (compile_pass): Add "autoconf"-style test for bi_opf field
  of the "bio" structure.
* runtime/linux/autoconf-bio-bi_opf.c: New file.
* tapset/linux/ioblock.stp (bio_op): Use new STAPCONF_BIO_BI_OPF define.

6 years agoFix PR22031 by initializing the context class instance before using it.
David Smith [Tue, 29 Aug 2017 20:26:38 +0000 (15:26 -0500)]
Fix PR22031 by initializing the context class instance before using it.

* dwflpp.cxx (dwflpp::literal_stmt_for_local): Initialize the context 'dw'
  field before using the context.

6 years agoFix PR22012 by updating the way we read user strings.
David Smith [Tue, 29 Aug 2017 16:03:06 +0000 (11:03 -0500)]
Fix PR22012 by updating the way we read user strings.

* runtime/linux/loc2c-runtime.h (_stp_deref_string_nofault): Renamed from
  kderef_string_() and modified to be able to read either a kernel or user
  string.
  (kderef_string): Modified to call the new _stp_deref_string_nofault().
* runtime/linux/copy.c (_stp_strncpy_from_user): Replace all code with a
  call to _stp_deref_string_nofault(). This avoids a "scheduling while
  atomic" kernel BUG seen when reading strings.

6 years agoFix spurious python2/python3 testing failures by increasing MAXACTION.
David Smith [Mon, 28 Aug 2017 21:19:30 +0000 (16:19 -0500)]
Fix spurious python2/python3 testing failures by increasing MAXACTION.

* testsuite/systemtap.python/python2.exp: Increased MAXACTION to avoid
  spurious failures.
* testsuite/systemtap.python/python3.exp: Ditto.

6 years agoFix comments in runtime/linux/loc2c-runtime.h.
David Smith [Mon, 28 Aug 2017 16:49:01 +0000 (11:49 -0500)]
Fix comments in runtime/linux/loc2c-runtime.h.

6 years agoPR22005: Fix @min() and @max() extractor functions.
Martin Cermak [Mon, 28 Aug 2017 11:01:40 +0000 (13:01 +0200)]
PR22005: Fix @min() and @max() extractor functions.

Commit 26382d613f4d26 introduced a regression in @min()
and @max() extractor functions.  Example:

$ stap -e 'global n probe oneshot {n<<<12 n<<<34 println(@max(n))}'
12
$

This commit fixes the regression and adds a testcase.

6 years agoProvide decoded env_str in arch-specific syscall.execve probes.
David Smith [Fri, 25 Aug 2017 20:19:02 +0000 (15:19 -0500)]
Provide decoded env_str in arch-specific syscall.execve probes.

* tapset/linux/arm/sysc_execve.stp: Commit be0c04a changed syscall.execve
  to provide decoded environment variables. Make similar changes to the
  old kernel arch-specific syscall.execve probes.
* tapset/linux/i386/sysc_execve.stp: Ditto.
* tapset/linux/ia64/sysc_execve.stp: Ditto.
* tapset/linux/powerpc/sysc_execve.stp: Ditto.
* tapset/linux/s390/sysc_execve.stp: Ditto.
* tapset/linux/x86_64/sysc_compat_execve.stp: Ditto.
* tapset/linux/x86_64/sysc_execve.stp: Ditto.
* tapset/linux/aux_syscalls.stp: Deprecate the unused __count_envp() and
  __count_compat_envp() functions.
* NEWS: Mention deprecation.
* testsuite/buildok/aux_syscalls-embedded.stp: Handle deprecation.

6 years agoRevert "PR21891: perform _stext relocation on kprobes, fix kretprobe registration."
Aaron Merey [Fri, 25 Aug 2017 18:56:46 +0000 (14:56 -0400)]
Revert "PR21891: perform _stext relocation on kprobes, fix kretprobe registration."

This reverts commit ade4246e43fe0fac66798ce9c37d70f6766238a5.

6 years agoImprove s390x support in testsuite/systemtap.syscall/execve.c.
David Smith [Fri, 25 Aug 2017 18:51:00 +0000 (13:51 -0500)]
Improve s390x support in testsuite/systemtap.syscall/execve.c.

7 years agoTweak more systemtap.examples meta files to improve test passes.
David Smith [Thu, 24 Aug 2017 21:42:51 +0000 (16:42 -0500)]
Tweak more systemtap.examples meta files to improve test passes.

* testsuite/systemtap.examples/general/key.meta: Check that the probed
  kernel function exists before trying to compile/run the example.
* testsuite/systemtap.examples/general/keyhack.meta: Ditto.

7 years agoAdd a small fix to testsuite/systemtap.base/utrace_syscall_args.exp.
David Smith [Thu, 24 Aug 2017 17:43:22 +0000 (12:43 -0500)]
Add a small fix to testsuite/systemtap.base/utrace_syscall_args.exp.

* testsuite/systemtap.base/utrace_syscall_args.exp: Wait 5 seconds when
  running the target executable to be sure to give it time to run.

7 years agoPerform process cleanup in testsuite/systemtap.interactive/*.exp.
David Smith [Thu, 24 Aug 2017 16:00:59 +0000 (11:00 -0500)]
Perform process cleanup in testsuite/systemtap.interactive/*.exp.

* testsuite/systemtap.interactive/char_and_line.exp: Be sure to kill
  systemtap at the end of the test and wait on it to finish.
* testsuite/systemtap.interactive/input.char.exp: Ditto.
* testsuite/systemtap.interactive/input.line.exp: Ditto.

7 years agoAdd a small fix to testsuite/lib/stapi.exp.
David Smith [Thu, 24 Aug 2017 15:45:54 +0000 (10:45 -0500)]
Add a small fix to testsuite/lib/stapi.exp.

* testsuite/lib/stapi.exp (stapi_exit): Make sure we're killing the
  interactive stap process, not just the last spawned process.

7 years agoAdd a fix to the 'container_check' example.
David Smith [Thu, 24 Aug 2017 15:42:58 +0000 (10:42 -0500)]
Add a fix to the 'container_check' example.

* testsuite/systemtap.examples/profiling/container_check.stp: Handle the
  fact that the kernel functions ns_capable() and capable() have different
  function signatures. On RHEL6 systems, we were getting bogus output.

7 years agoTweak some systemtap.examples meta files to improve test passes.
David Smith [Thu, 24 Aug 2017 15:34:22 +0000 (10:34 -0500)]
Tweak some systemtap.examples meta files to improve test passes.

* testsuite/systemtap.examples/memory/hugepage_collapse.meta: Check that
  the probed kernel function exists before trying to compile/run the
  example.
* testsuite/systemtap.examples/memory/hugepage_split.meta: Ditto.
* testsuite/systemtap.examples/general/func_time_stats.meta: Probe
  syscall.read instead of syscall.nanosleep, since we're much more likely
  to hit that syscall.

7 years agoPR21891: perform _stext relocation on kprobes, fix kretprobe registration.
Aaron Merey [Wed, 23 Aug 2017 22:54:49 +0000 (18:54 -0400)]
PR21891: perform _stext relocation on kprobes, fix kretprobe registration.

* stapbpf/stapbpf.cxx (maybe_collect_kprobe): read value of _stext from
  /proc/kallsyms and add to kprobe symbol offsets.
* tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): set symbol_name
  to funcname for kretprobes.

7 years agoFix PR21998 by updating tapset/linux/ip.stp.
David Smith [Wed, 23 Aug 2017 21:00:24 +0000 (16:00 -0500)]
Fix PR21998 by updating tapset/linux/ip.stp.

* tapset/linux/ip.stp: Use the new 'iphdr_cast' macro to properly cast a
  value to a iphdr struture pointer. For RHEL6, this fixes some "kbuild
  exited with status: 2" warnings.

7 years agoAdd small fixes in tapset/linux/memory.stp.
David Smith [Wed, 23 Aug 2017 19:05:21 +0000 (14:05 -0500)]
Add small fixes in tapset/linux/memory.stp.

* tapset/linux/memory.stp: Handle the case where __GFP_MEMALLOC doesn't
  exist (like on RHEL6). In __vm.kmalloc_node.kp, add @entry() around
  variables in a return probe.

7 years agoFix PR21996 by updating DEREF_FAULT for dyninst.
David Smith [Wed, 23 Aug 2017 16:34:56 +0000 (11:34 -0500)]
Fix PR21996 by updating DEREF_FAULT for dyninst.

* runtime/loc2c-runtime.h (DEREF_FAULT): Fix dyninst compile errors on
  32-bit systems where 'intptr_t' is an 'int'. Be sure to cast to 'long'
  in DEREF_FAULT and STORE_DEREF_FAULT before printing the value with
  "%lx".

7 years agoFix PR21991 by casting to a 64-bit value when shifting.
David Smith [Wed, 23 Aug 2017 13:42:17 +0000 (08:42 -0500)]
Fix PR21991 by casting to a 64-bit value when shifting.

* translate.cxx (c_unparser::visit_binary_expression): Cast to 64-bits to
  avoid gcc "shift count >= width of type" errors on 32-bit systems.

7 years agoFix the testsuite/buildok/[nd_]syscalls-arch-detailed.stp tests.
David Smith [Tue, 22 Aug 2017 21:17:37 +0000 (16:17 -0500)]
Fix the testsuite/buildok/[nd_]syscalls-arch-detailed.stp tests.

* testsuite/buildok/nd_syscalls-arch-detailed.stp: Mark the
  nd_syscall.vm86 probe as optional.
* testsuite/buildok/syscalls-arch-detailed.stp: Ditto.

7 years agoFix tapset/linux/timestamp_monotonic.stp on newer kernels.
David Smith [Tue, 22 Aug 2017 21:16:06 +0000 (16:16 -0500)]
Fix tapset/linux/timestamp_monotonic.stp on newer kernels.

* tapset/linux/timestamp_monotonic.stp: Be sure to include header files to
  get cpu_clock() and local_clock() defined.

7 years agoUse @entry() in a return probe in tapset/linux/ipmib.stp.
David Smith [Tue, 22 Aug 2017 19:44:59 +0000 (14:44 -0500)]
Use @entry() in a return probe in tapset/linux/ipmib.stp.

7 years agoAdd and use a new macro @inet_sock_cast().
David Smith [Tue, 22 Aug 2017 19:44:03 +0000 (14:44 -0500)]
Add and use a new macro @inet_sock_cast().

* tapset/linux/inet.stpm: Added new macro file.
* tapset/linux/inet_sock.stp: Use new @inet_sock_cast() macro to
  standardize casting a pointer to a "struct inet_sock".
* tapset/linux/ip.stp: Ditto.
* tapset/linux/tcp.stp: Ditto.

7 years agoPR21984: Fix "cast to pointer from integer of different size" errors.
David Smith [Tue, 22 Aug 2017 15:15:29 +0000 (10:15 -0500)]
PR21984: Fix "cast to pointer from integer of different size" errors.

* runtime/linux/loc2c-runtime.h: Modify the __Xread() and __Xwrite()
  macros for 32-bit systems so that 64-bit values are handled properly.
* tapset/linux/atomic.stp: Make sure all pointer values are cast
  properly. Their values must be cast to a 'uintptr_t' value then the
  final pointer type value. This is necessary for 32-bit systems (since
  systemtap variables are 64-bits). Some pointer casts weren't cast to a
  numeric value, some were cast to a signed value, etc. Standardize all of
  them.
* tapset/linux/aux_syscalls.stp: Ditto.
* tapset/linux/conversions-guru.stp: Ditto.
* tapset/linux/conversions.stp: Ditto.
* tapset/linux/i386/aux_syscalls.stp: Ditto.
* tapset/linux/ioblock.stp: Ditto.
* tapset/linux/ioscheduler.stp: Ditto.
* tapset/linux/ip.stp: Ditto.
* tapset/linux/ipmib.stp: Ditto.
* tapset/linux/kprocess.stp: Ditto.
* tapset/linux/netfilter.stp: Ditto.
* tapset/linux/nfs.stp: Ditto.
* tapset/linux/nfsd.stp: Ditto.
* tapset/linux/proc_mem.stp: Ditto.
* tapset/linux/rcu.stp: Ditto.
* tapset/linux/s390/aux_syscalls.stp: Ditto.
* tapset/linux/signal.stp: Ditto.
* tapset/linux/socket.stp: Ditto.
* tapset/linux/task.stp: Ditto.
* tapset/linux/tcp.stp: Ditto.
* tapset/linux/tcpmib.stp: Ditto.
* tapset/linux/x86_64/aux_syscalls.stp: Ditto.
* tapset/string.stp: Ditto.
* tapset/uconversions-guru.stp: Ditto.
* tapset/uconversions.stp: Ditto.

7 years agoAdd a minor fix to testsuite/systemtap.onthefly/uprobes_onthefly.exp.
David Smith [Thu, 17 Aug 2017 20:34:07 +0000 (15:34 -0500)]
Add a minor fix to testsuite/systemtap.onthefly/uprobes_onthefly.exp.

7 years agoSend rpmname and buildid to http server.
Stan Cox [Thu, 17 Aug 2017 18:46:27 +0000 (14:46 -0400)]
Send rpmname and buildid to http server.

* client-http.cxx (get_rpmname):  New to get the rpmname of a file.
  (process_buildid, get_buildid): New to get the buildid of a file.
  (post):  Also send rpmname and buildid
* main.cxx (passes_0_4):  Invoke http client after elaboration pass.

7 years agoadd PRERELEASE marker to stapbpf startup line
Frank Ch. Eigler [Wed, 16 Aug 2017 16:14:45 +0000 (12:14 -0400)]
add PRERELEASE marker to stapbpf startup line

7 years agoSend over the linux distribution info to the http server.
David Smith [Wed, 16 Aug 2017 15:39:45 +0000 (10:39 -0500)]
Send over the linux distribution info to the http server.

* httpd/backends.cxx (local_backend::local_backend): Get the distro name
  and arch.
  (local_backend::can_generate_module): Check the distro name and arch.
  (docker_backend::docker_backend): Get the list of JSON docker data files.
  (docker_backend::can_generate_module): Check the arch and see if we have
  a JSON docker data file for that distro.
* httpd/api.cxx (response build_collection_rh::POST): Look for 'distro_name'
  and 'distro_version' tags.
* httpd/api.h (client_request_data): Added 'distro_name' and
  'distro_version' fields.
* util.cxx (get_distro_info): New function.
* util.h: Add get_distro_info() declaration.
* httpd/client.py: Send over the distro information.

7 years agodtrace: Allow for reproducible .o file builds.
Bernhard M. Wiedemann [Mon, 14 Aug 2017 21:33:33 +0000 (16:33 -0500)]
dtrace: Allow for reproducible .o file builds.

* dtrace.in: When building packages like libvirt on openSUSE that
  link a libvirt_probes.o from dtrace, the build results differed
  across builds. This is because the source's temporary filename
  was in the .o. Make the temporary filename reproducible.

7 years agoFix client-http.cxx compile errors with libcurl-7.55.
David Smith [Mon, 14 Aug 2017 19:42:36 +0000 (14:42 -0500)]
Fix client-http.cxx compile errors with libcurl-7.55.

* client-http.cxx: Remove inclusion of <curl/curlbuild.h>, which doesn't
  exist in libcurl-7.55. We evidently weren't using it anyway.

7 years agoFix rpm_finder.cxx compile errors with rpm 4.13.90.
David Smith [Mon, 14 Aug 2017 18:32:16 +0000 (13:32 -0500)]
Fix rpm_finder.cxx compile errors with rpm 4.13.90.

* rpm_finder.cxx (missing_rpm_enlist): Replace deprecated headerSprintf()
  function calls with headerFormat() function calls.

7 years agoMake a small improvement in the http server "docker" backend.
David Smith [Fri, 11 Aug 2017 18:48:52 +0000 (13:48 -0500)]
Make a small improvement in the http server "docker" backend.

* httpd/backends.cxx (docker_backend): Make sure the docker executable
  exists before trying to use the docker backend.

7 years agoFix PR21802 by improving the syscall test cases.
David Smith [Fri, 11 Aug 2017 14:36:51 +0000 (09:36 -0500)]
Fix PR21802 by improving the syscall test cases.

* testsuite/systemtap.syscall/syscall.exp: Add logic to use the
  'CHECK_ONLY' environment variable to limit the syscalls tested.
* testsuite/systemtap.syscall/nd_syscall.exp: Ditto.

7 years agoMake small improvements to systemtap.base/perf.exp.
David Smith [Fri, 11 Aug 2017 14:29:16 +0000 (09:29 -0500)]
Make small improvements to systemtap.base/perf.exp.

* testsuite/systemtap.base/perf.exp: Compile the test executable with
  debuginfo. Make the test notice if the scripts don't compile.

7 years agoFor rawhide, fix casting issues in the nd_syscall tapset.
David Smith [Fri, 11 Aug 2017 13:20:54 +0000 (08:20 -0500)]
For rawhide, fix casting issues in the nd_syscall tapset.

* tapset/linux/syscalls.stpm: Add the 'ulong_cast' and 'uint_cast' macros
  to properly do casting for rawhide (4.13.0-0.rc3.git4.1.fc27.x86_64)
  systems.
* tapset/linux/sysc_accept.stp: Use the new macros when needed.
* tapset/linux/sysc_accept4.stp: Ditto.
* tapset/linux/sysc_bind.stp: Ditto.
* tapset/linux/sysc_chmod.stp: Ditto.
* tapset/linux/sysc_connect.stp: Ditto.
* tapset/linux/sysc_fchmod.stp: Ditto.
* tapset/linux/sysc_fchmodat.stp: Ditto.
* tapset/linux/sysc_getpeername.stp: Ditto.
* tapset/linux/sysc_getsockname.stp: Ditto.
* tapset/linux/sysc_getsockopt.stp: Ditto.
* tapset/linux/sysc_listen.stp: Ditto.
* tapset/linux/sysc_recv.stp: Ditto.
* tapset/linux/sysc_recvfrom.stp: Ditto.
* tapset/linux/sysc_recvmsg.stp: Ditto.
* tapset/linux/sysc_send.stp: Ditto.
* tapset/linux/sysc_sendmmsg.stp: Ditto.
* tapset/linux/sysc_sendmsg.stp: Ditto.
* tapset/linux/sysc_sendto.stp: Ditto.
* tapset/linux/sysc_setsockopt.stp: Ditto.
* tapset/linux/sysc_shutdown.stp: Ditto.
* tapset/linux/sysc_socket.stp: Ditto.
* tapset/linux/sysc_socketpair.stp: Ditto.
* tapset/linux/s390/sysc_compat_fadvise64.stp: Ditto.
* tapset/linux/s390/sysc_mmap.stp: Ditto.
* tapset/linux/s390/sysc_mmap2.stp: Ditto.
* tapset/linux/x86_64/sysc_mmap.stp: Ditto.

7 years agoFix PR21917 by making _stp_module_panic_notifier more robust.
David Smith [Mon, 7 Aug 2017 20:58:06 +0000 (15:58 -0500)]
Fix PR21917 by making _stp_module_panic_notifier more robust.

* runtime/transport/symbols.c (_stp_module_panic_notifier): Be more
  paranoid about relay data buffers.

7 years agoFix deref handling on 32-bit kernels.
David Smith [Thu, 3 Aug 2017 19:23:28 +0000 (14:23 -0500)]
Fix deref handling on 32-bit kernels.

* runtime/linux/loc2c-runtime.h (__stp_deref_nocheck_): Fix i386/arm
  systems where handling 8-byte values in one operation isn't possible.
  (__stp_store_deref_nocheck_): Ditto.

7 years agoFix PR21901 by releasing locks in the correct order in runtime/stp_utrace.c.
David Smith [Thu, 3 Aug 2017 18:46:31 +0000 (13:46 -0500)]
Fix PR21901 by releasing locks in the correct order in runtime/stp_utrace.c.

* runtime/stp_utrace.c (utrace_reset): Be sure to release the locks in the
  order we take them, otherwise we get an "inconsistent lock state" kernel
  warning.

7 years agoPR14021: Handle --sysroot=/
Cody Santing [Wed, 2 Aug 2017 19:32:20 +0000 (15:32 -0400)]
PR14021: Handle --sysroot=/

* setupdwfl.cxx: Make sure kernel_release is passed to
dwfl_linux_kernel_report_offline rather than an absolute path for the
case of --sysroot=/

7 years agoDefine a dummy translate_bpf_pass() for non-bpf systems (like RHEL6).
David Smith [Tue, 1 Aug 2017 19:26:12 +0000 (14:26 -0500)]
Define a dummy translate_bpf_pass() for non-bpf systems (like RHEL6).

7 years agoFix: BPF patches break the elfutils out of tree compilation.
Torsten Polle [Tue, 1 Aug 2017 18:10:10 +0000 (13:10 -0500)]
Fix: BPF patches break the elfutils out of tree compilation.

7 years ago--runtime=bpf fixups, part 1/n
Frank Ch. Eigler [Tue, 1 Aug 2017 17:01:16 +0000 (13:01 -0400)]
--runtime=bpf fixups, part 1/n

* main.cxx: Don't be sensitive to HAVE_LINUX_BPF_H in redundant
  decisions.
* stapbpf: Clear bpf_attr's before passing to kernel, else -EINVAL.
  Use log_level for verbosity for bpf syscall and elsewhere.  Unshare
  random text buffers and bpf's designated bpf_log_buf.

7 years agoPR10296 partial fix: Avoid netfilter "might_sleep" kernel BUGs.
David Smith [Mon, 31 Jul 2017 22:15:38 +0000 (17:15 -0500)]
PR10296 partial fix: Avoid netfilter "might_sleep" kernel BUGs.

* runtime/linux/netfilter.c: To avoid "sleeping function called from
  invalid context" kernel bugs, switch from using 'for_each_net_rcu()' to
  using 'for_each_net()'. This avoids putting us into atomic context.

7 years agoSupport inlined local_clock()/cpu_clock().
Torsten Polle [Mon, 31 Jul 2017 20:19:18 +0000 (15:19 -0500)]
Support inlined local_clock()/cpu_clock().

The following kernel commit inlines local_clock()/cpu_clock(), which
breaks the detection of whether they are supported by the kernel.

    commit 2c923e94cd9c6acff3b22f0ae29cfe65e2658b40
    Author: Daniel Lezcano <daniel.lezcano@linaro.org>
    Date:   Mon Apr 11 16:38:34 2016 +0200

7 years agoFix PR21859 by locking the module mutex.
David Smith [Fri, 28 Jul 2017 16:19:10 +0000 (11:19 -0500)]
Fix PR21859 by locking the module mutex.

* runtime/linux/kprobes.c (stapkp_init): Lock the module_mutex when
  calling kallsyms_on_each_symbol().
  (stapkp_refresh): Ditto.

7 years agoCorrect a small bug in the aio syscall testcase.
David Smith [Fri, 28 Jul 2017 13:10:23 +0000 (08:10 -0500)]
Correct a small bug in the aio syscall testcase.

7 years agoFix syscall.{preadv,pwritev} 'offset' variable handling.
David Smith [Thu, 27 Jul 2017 17:32:54 +0000 (12:32 -0500)]
Fix syscall.{preadv,pwritev} 'offset' variable handling.

* tapset/linux/syscalls.stpm (__pos_from_hilo): New macro.
* tapset/linux/sysc_preadv.stp: Uses @__pos_from_hilo() macro to get the
  correct 'offset' value.
* tapset/linux/sysc_preadv2.stp: Ditto.
* tapset/linux/sysc_pwritev.stp: Ditto.
* tapset/linux/sysc_pwritev2.stp: Ditto.
* testsuite/systemtap.syscall/preadv.c (__preadv2): Renamed from
  'preadv2', since glibc 2.25 has implemented 'preadv2'.
* testsuite/systemtap.syscall/pwritev.c (__pwritev2): Renamed from
  'pwritev2', sine glibc 2.25 has implemented 'pwritev2'.

7 years agosyscall.execveat probes: provide decoded env_str
David Smith [Wed, 26 Jul 2017 21:04:24 +0000 (16:04 -0500)]
syscall.execveat probes: provide decoded env_str

* tapset/linux/sysc_execveat.stp: Commit be0c04a changed syscall.execve to
  provide decoded environment variables. Make similar changes for
  syscall.execveat.
* testsuite/systemtap.syscall/execve.c: Update for output change.
* testsuite/systemtap.syscall/execveat.c: Ditto.

7 years agoUpdate tapset/linux/sysc_sigpending.stp for rawhide.
David Smith [Wed, 26 Jul 2017 15:54:30 +0000 (10:54 -0500)]
Update tapset/linux/sysc_sigpending.stp for rawhide.

* tapset/linux/sysc_sigpending.stp: On rawhide kernels, the argumenmt to
  compat_sys_sigpending() has been renamed to 'set32'.

7 years agoFix PR21834 by updating the netfilter probes for new kernels.
David Smith [Wed, 26 Jul 2017 15:19:36 +0000 (10:19 -0500)]
Fix PR21834 by updating the netfilter probes for new kernels.

* runtime/linux/netfilter.c: New file containing
  nf_register_hook/nf_unregister_hook.
* tapset-netfilter.cxx (netfilter_derived_probe_group::emit_module_decls):
  Include "linux/netfilter.c".
* buildrun.cxx (compile_pass): Add exportconf test for "nf_register_hook".

7 years agoUpdated tapset/linux/memory.stp for rawhide kernels.
David Smith [Tue, 25 Jul 2017 21:09:42 +0000 (16:09 -0500)]
Updated tapset/linux/memory.stp for rawhide kernels.

* tapset/linux/memory.stp (__gfp_flag_str): Updated for rawhide kernels
  with the current list of flags.

7 years agoUpdated tapset/linux/ioblock.stp for rawhide kernels.
David Smith [Tue, 25 Jul 2017 20:26:02 +0000 (15:26 -0500)]
Updated tapset/linux/ioblock.stp for rawhide kernels.

* tapset/linux/ioblock.stp: The following kernel commit reworked the
  struct bio 'bi_error' field into the new 'bi_status' field. Handle the
  change.

     commit 4e4cbee93d56137ebff722be022cae5f70ef84fb
     Author: Christoph Hellwig <hch@lst.de>
     Date:   Sat Jun 3 09:38:06 2017 +0200

         block: switch bios to blk_status_t

7 years agoUpdated testsuite/buildok/fortytwo.stp for rawhide.
David Smith [Tue, 25 Jul 2017 20:07:46 +0000 (15:07 -0500)]
Updated testsuite/buildok/fortytwo.stp for rawhide.

* testsuite/buildok/fortytwo.stp: Updated for rawhide kernels,
  4.13.0-0.rc1.git4.1.fc27.x86_64, where the kernel function
  'do_readv_writev' no longer exists. Instead, probe
  'do_iter_readv_writev'.

7 years agoMerge branch 'rth/bpf' post-bpf-merge
Richard Henderson [Tue, 25 Jul 2017 02:28:37 +0000 (19:28 -0700)]
Merge branch 'rth/bpf'

7 years agoHandle implicit_pointer within translate_array
Richard Henderson [Mon, 24 Jul 2017 18:31:41 +0000 (11:31 -0700)]
Handle implicit_pointer within translate_array

7 years agoHandle implicit_pointer within translate_base_ref
Richard Henderson [Mon, 24 Jul 2017 18:13:46 +0000 (11:13 -0700)]
Handle implicit_pointer within translate_base_ref

7 years agoexamples eventcount.meta/.txt: replace "eventcount_interactive" with "eventcount". pre-bpf-merge
Aaron Merey [Mon, 24 Jul 2017 15:03:16 +0000 (11:03 -0400)]
examples eventcount.meta/.txt: replace "eventcount_interactive" with "eventcount".

7 years agoRevert "fix _stp_lookup_bad_addr arg-3 type"
Frank Ch. Eigler [Mon, 24 Jul 2017 14:05:59 +0000 (10:05 -0400)]
Revert "fix _stp_lookup_bad_addr arg-3 type"

This reverts commit 7cc81e9a8197d3aa61291a9bd23266f0f5613ff1.

7 years agoautocast support: bring back early manual functionall->synth-decl referent
Frank Ch. Eigler [Mon, 24 Jul 2017 13:55:39 +0000 (09:55 -0400)]
autocast support: bring back early manual functionall->synth-decl referent

When synthesizing dwarf-related functions, we can usually rely on
pass-2 symbol resolution to match up the functioncall*s with the
functiondecl*s.  But in the case of autocast handling, synth function
generation is for whatever reason delayed past this point in pass-2,
so we have to manually resolve symbols/referents to some extent.

7 years agofix _stp_lookup_bad_addr arg-3 type
Frank Ch. Eigler [Fri, 21 Jul 2017 19:40:48 +0000 (15:40 -0400)]
fix _stp_lookup_bad_addr arg-3 type

The bpf branch converts this former macro into an inline function,
so stricter type checking applies.  This explicit cast makes several
pass-4 errors go poof!

7 years agoexamples: eventcount.stp supports modifying certain parameters at runtime.
Aaron Merey [Fri, 21 Jul 2017 22:57:21 +0000 (18:57 -0400)]
examples: eventcount.stp supports modifying certain parameters at runtime.

* eventcount.stp: Merged with eventcount_interactive.stp. Filtering
  by process name can now be controlled at runtime.

7 years agoMerge branch 'rth/bpf' into rth/merge
Richard Henderson [Fri, 21 Jul 2017 06:23:00 +0000 (20:23 -1000)]
Merge branch 'rth/bpf' into rth/merge

7 years agoReplace spinlocks in runtime/mempool.c with stp style raw spinlocks.
David Smith [Fri, 21 Jul 2017 19:05:56 +0000 (14:05 -0500)]
Replace spinlocks in runtime/mempool.c with stp style raw spinlocks.

* runtime/mempool.c: For the preempt-rt kernel, replace spinlocks with raw
  spinlocks.

7 years agojava stapbm: don't swallow stderr
Frank Ch. Eigler [Fri, 21 Jul 2017 17:56:35 +0000 (13:56 -0400)]
java stapbm: don't swallow stderr

In case of installation errors, messages printed to stderr are
important to show to users, even without $SYSTEMTAP_VERBOSE.

7 years agoPR12811: handle null java object arguments
Frank Ch. Eigler [Fri, 21 Jul 2017 17:55:26 +0000 (13:55 -0400)]
PR12811: handle null java object arguments

Neither the pre-3.1 nor post-3.1 java helpersdt C code could handle
null java-object pointers, whoops!  Now we render them as "(null)"
strings.

7 years agoAvoid sign-extension of lvalues
Richard Henderson [Fri, 21 Jul 2017 06:05:16 +0000 (23:05 -0700)]
Avoid sign-extension of lvalues

As commented, we may well require sign-extension of the
rvalue that gets assigned to the lvalue.  But the previous
code didn't do that; we certainly get away with it for x86.

7 years agonew example: sizeof_interactive.stp
Aaron Merey [Thu, 20 Jul 2017 23:06:17 +0000 (19:06 -0400)]
new example: sizeof_interactive.stp

Interactive version of EXAMPLES/general/sizeof.stp.

7 years agoUpdate testsuite/systemtap.base/stap_hwbkpt_kmod.c for newer kernels.
David Smith [Thu, 20 Jul 2017 17:43:34 +0000 (12:43 -0500)]
Update testsuite/systemtap.base/stap_hwbkpt_kmod.c for newer kernels.

7 years agoFix PR21726 by replacing access_ok() calls.
David Smith [Thu, 20 Jul 2017 14:47:49 +0000 (09:47 -0500)]
Fix PR21726 by replacing access_ok() calls.

* runtime/stack.c (_stp_valid_pc_addr): Removed function.
  (_stp_stack_unwind_one_kernel): Call _stp_lookup_bad_addr() instead of
  _stp_valid_pc_addr().
  (_stp_stack_unwind_one_user): Ditto.
* tapset/linux/nfs.stp: Call _stp_lookup_bad_addr() instead of
  access_ok().
* runtime/linux/loc2c-runtime.h: Add _stp_lookup_bad_addr() macro to
  safely call lookup_bad_addr().

7 years agoAdd unsigned right shift operator
Richard Henderson [Thu, 20 Jul 2017 10:18:58 +0000 (03:18 -0700)]
Add unsigned right shift operator

Use >>> as suggestd by fche, replacing the u>> placeholder
that I had forgotten about upon initiating the loc2stap branch.

7 years agoFix extension from target_register
Richard Henderson [Thu, 20 Jul 2017 06:51:51 +0000 (23:51 -0700)]
Fix extension from target_register

7 years agoFix systemtap.printf/pretty-bits.exp
Richard Henderson [Wed, 19 Jul 2017 19:18:25 +0000 (12:18 -0700)]
Fix systemtap.printf/pretty-bits.exp

7 years agoFix systemtap.examples/process/proctop
Frank Ch. Eigler [Wed, 19 Jul 2017 18:50:26 +0000 (11:50 -0700)]
Fix systemtap.examples/process/proctop

7 years agoFix formatting in procfs_multi_write.exp
Aaron Merey [Wed, 19 Jul 2017 16:28:22 +0000 (12:28 -0400)]
Fix formatting in procfs_multi_write.exp

7 years agoAdd probe alias input.line, allow multiple procfs.write probes for a single file.
Aaron Merey [Wed, 19 Jul 2017 15:59:56 +0000 (11:59 -0400)]
Add probe alias input.line, allow multiple procfs.write probes for a single file.

* man/stapprobes.3stap: updated section on input probes.
* runtime/procfs-probes.c (struct stap_procfs_probe): member write_probe renamed to
  write_probes. Type of member changed to struct stap_probe**.
  (_stp_proc_write_file): now handles multiple write probes.
* runtime/procfs.c (_stp_create_procfs): no longer exits when trying to create
  a proc file that already exists.
* tapset-procfs.cxx (struct procfs_probe_set): member write_probe renamed to
  write_probes. Type of member changed to vector<procfs_derived_probe*>.
  (procfs_derived_probe_group::emit_module_decls): now handles multiple
  write_probes.
* tapset/input.stp: added alias input.line.

7 years agoFix a small systemtap server memory leak.
David Smith [Tue, 18 Jul 2017 21:49:12 +0000 (16:49 -0500)]
Fix a small systemtap server memory leak.

* client-nss.cxx (nss_client_backend::unpack_response): Add missing
  globfree() call.
  (add_server_trust): Ditto.
* nsscommon.cxx (clean_cert_db): Ditto.
  (add_client_cert): Ditto.
* stap-serverd.cxx (handleRequest): Ditto.

7 years agoAdd a minor RHEL6 fix to configure for the libcurl check.
David Smith [Tue, 18 Jul 2017 21:31:07 +0000 (16:31 -0500)]
Add a minor RHEL6 fix to configure for the libcurl check.

* configure.ac: Relax the libcurl check a bit for RHEL6-based systems.
* configure: Regenerated.

7 years agoImprove the http server "local" backend.
David Smith [Tue, 18 Jul 2017 21:28:17 +0000 (16:28 -0500)]
Improve the http server "local" backend.

* httpd/backends.cxx (local_backend::local_backend): Look for all the
  kernels this system can compile a module for.
  (local_backend::can_generate_module): Make sure this system can compile
  a module for the target kernel.
  (docker_backend): Add class start.
* httpd/api.cxx (result_info::generate_response): Can now return an error
  status.
  (response build_collection_rh::POST): Fixed typo in error message.
  (build_info::set_result): New function.
  (build_info::module_build): Always specify the kernel version in the
  stap command line. Generate an error result if needed. Return an error
  if no suitable backend can be found. Call globfree() when needed.
  (get_backends): Add docker backend.

7 years agoPR21283: Add remote_id/remote_uri dyninst funcs
Cody Santing [Tue, 18 Jul 2017 18:31:43 +0000 (14:31 -0400)]
PR21283: Add remote_id/remote_uri dyninst funcs

* remote.cxx: If in dyninst mode, pass staprun args as a global
variable, _stp_dyninst_remote
* tapset/dyninst/context.stp: Add tapset functions

7 years agoPR21283: --dyninst with --remote
Cody Santing [Thu, 6 Jul 2017 20:01:09 +0000 (16:01 -0400)]
PR21283: --dyninst with --remote

* remote.cxx: Remove '-d' option being passed to stapsh.
* staprun/stapsh.c: Detect if in dyninst mode based on module extension.

7 years agoPR21283 initial commit
Cody Santing [Tue, 6 Jun 2017 18:20:06 +0000 (14:20 -0400)]
PR21283 initial commit

* remote.cxx: detect dyninst mode then adjust the extension of the
module being sent to .so.  Also passes a new '-d' argument to stapsh
signifying dyninst mode.
* staprun/stapsh.c: if in dyninst mode, call stapdyn vs staprun

7 years agoloc2stap: tolerate inconvenient dwarf locations
Frank Ch. Eigler [Tue, 18 Jul 2017 02:14:01 +0000 (22:14 -0400)]
loc2stap: tolerate inconvenient dwarf locations

We can't handle loc_noncontiguous and loc_implicit_pointer properly,
but shouldn't segv.

7 years agoFix vta-test.exp
Richard Henderson [Mon, 17 Jul 2017 18:42:43 +0000 (11:42 -0700)]
Fix vta-test.exp

7 years agosupport nested $var[$var2] constructs
Frank Ch. Eigler [Mon, 17 Jul 2017 00:02:42 +0000 (20:02 -0400)]
support nested $var[$var2] constructs

We need some nonobvious magic in order to enable proper recursive
rewriting of the nested context variable structures in
target_symbol->components[].

7 years agoFix systemtap.base/pointer_array.stp
Frank Ch. Eigler [Sat, 15 Jul 2017 17:12:24 +0000 (10:12 -0700)]
Fix systemtap.base/pointer_array.stp

And 3 others.  Apply the components to function arguments properly.

7 years agoAdded a temporary PR21726 workaround.
David Smith [Fri, 14 Jul 2017 14:10:32 +0000 (09:10 -0500)]
Added a temporary PR21726 workaround.

7 years agoFix typo in last
Richard Henderson [Thu, 13 Jul 2017 17:19:41 +0000 (07:19 -1000)]
Fix typo in last

7 years agoGet buildrun.cxx working on non C++11 compilers.
David Smith [Wed, 12 Jul 2017 14:46:50 +0000 (09:46 -0500)]
Get buildrun.cxx working on non C++11 compilers.

* buildrun.cxx (make_make_cmd): Add a fix for gcc 4.4.7 (in RHEL 6), which
  doesn't have C++11's 'back' function.

7 years agoFix sign-extension on loads
Richard Henderson [Wed, 12 Jul 2017 00:59:58 +0000 (17:59 -0700)]
Fix sign-extension on loads

7 years agoAdd preliminary client support.
Stan Cox [Tue, 11 Jul 2017 20:01:26 +0000 (16:01 -0400)]
Add preliminary client support.

    * configure.ac: HAVE_HTTP_SUPPORT requires libcurl and jsonc
    * Makefile.am: Likewise.
    * client-http.cxx: Preliminary client support.
    * client-http.h: Likewise.
    * configure: Regenerated.
    * Makefile.in: Likewise.
    * doc/Makefile.in: Likewise.
    * doc/SystemTap_Tapset_Reference/Makefile.in: Likewise.
    * doc/beginners/Makefile.in: Likewise.
    * httpd/Makefile.in: Likewise.
    * java/Makefile.in: Likewise.
    * man/Makefile.in: Likewise.
    * man/cs/Makefile.in: Likewise.
    * python/Makefile.in: Likewise.
    * stapdyn/Makefile.in: Likewise.
    * staprun/Makefile.in: Likewise.

7 years agoReorganize http server to support multiple compile backends.
David Smith [Tue, 11 Jul 2017 12:32:27 +0000 (07:32 -0500)]
Reorganize http server to support multiple compile backends.

* httpd/api.cxx: Move local backend code to backends.cxx.
* httpd/Makefile.am: Added backends.cxx.
* httpd/Makefile.in: Regenerated.
* httpd/api.h: Added client_request_data structure definition.
* httpd/backends.cxx: New file.
* httpd/backends.h: New file.

7 years agotmp2
Richard Henderson [Mon, 10 Jul 2017 23:18:48 +0000 (16:18 -0700)]
tmp2

7 years agotmp
Richard Henderson [Mon, 10 Jul 2017 07:02:48 +0000 (00:02 -0700)]
tmp

7 years agoFix bounding of shifts
Richard Henderson [Mon, 10 Jul 2017 06:16:01 +0000 (23:16 -0700)]
Fix bounding of shifts

Shifting an int64_t by 64 is illegal.  But frankly, using
min(max(x, 0), 63) is just as arbitrary as (x & 63).

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