]> sourceware.org Git - systemtap.git/log
systemtap.git
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).

7 years agofix _SC_CLK_TCK compile error on rhel7
Guilherme G. Piccoli [Wed, 5 Jul 2017 20:26:09 +0000 (16:26 -0400)]
fix _SC_CLK_TCK compile error on rhel7

7 years agodebuginfo diagnostics: complain about unresolved $vars better
Frank Ch. Eigler [Sat, 1 Jul 2017 01:00:10 +0000 (21:00 -0400)]
debuginfo diagnostics: complain about unresolved $vars better

dwarf_var_expanding_visitor::visit_target_symbol used to just quietly
sulk if a $context variable could not be resolved due to a null-die
reference scope.  This happens e.g. if no debuginfo was found for a
target binary, but the probe point was resolved perhaps due to symbol
tables.  It would result in a mystifying "unresolved target-symbol
expression" error.  The new message is thrown in context and treated
like a saved_conversion_error, with an explicit error::dwarf2 hint.

7 years agoRevert "Add preliminary http client support." while configure support is added.
Stan Cox [Fri, 30 Jun 2017 18:20:37 +0000 (14:20 -0400)]
Revert "Add preliminary http client support." while configure support is added.

This reverts commit 2dd0c8a2be917d57ee8bbf77789665ed2f937759.

7 years agoDisable page faults in _stp_valid_pc_addr().
David Smith [Fri, 30 Jun 2017 16:03:52 +0000 (11:03 -0500)]
Disable page faults in _stp_valid_pc_addr().

* runtime/stack.c (_stp_valid_pc_addr): According to the comment for
  access_ok(): "User context only. This function may sleep if pagefaults
  are enabled." So, disable pagefaults before calling access_ok().

7 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Stan Cox [Fri, 30 Jun 2017 14:54:15 +0000 (10:54 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

7 years agoAdd preliminary http client support.
Stan Cox [Fri, 30 Jun 2017 14:52:07 +0000 (10:52 -0400)]
Add preliminary http client support.

7 years agoloc2c-runtime: Rely on inline functions more than macros
Richard Henderson [Tue, 27 Jun 2017 22:17:10 +0000 (15:17 -0700)]
loc2c-runtime: Rely on inline functions more than macros

Since we lack hygienic macros in C, temp variables from one macro/scope
can interfere with same-named variables in another macro/scope.  We cannot
remove the use of macros entirely, because DEREF_FAULT includes a goto.

Remove as much code, and as many block-local variables, as possible from
the macros.

7 years agoDEREF_FAULT: print hex better, without #token
Frank Ch. Eigler [Wed, 28 Jun 2017 17:41:40 +0000 (13:41 -0400)]
DEREF_FAULT: print hex better, without #token

With deref() constructs being nested, the expression parameters is now
frequently generated C goo that a stap user cannot be expected to understand.
We no longer print that part in the DEREF_FAULT handler, leaving only the
faulting address.

Before:

ERROR: read fault [man error::fault] at 0x          (null) ((({ u64 _v; int _e = _stp_deref_nofault_(&_v, (8), (void *)(unsigned long)((((l->l__fb_0) + (((int64_t)-96LL))))), (((mm_segment_t) { (((1UL << 47) - ((1UL) << 12))) }))); if (_e) ({ snprintf(c-

After:

ERROR: read fault [man error::fault] at 0x0 near identifier '$j' at ../../systemtap2/testsuite/systemtap.base/implicitptr.stp:4:7

7 years agostap -k: generate a .i file too in $TMPDIR
Frank Ch. Eigler [Tue, 27 Jun 2017 22:37:42 +0000 (18:37 -0400)]
stap -k: generate a .i file too in $TMPDIR

This allows problem diagnosis of complex interactions between the
generated-code and the runtime.

7 years agorestore testsuite/systemtap.base/at_var.stp to normal test mode
Frank Ch. Eigler [Wed, 28 Jun 2017 17:30:56 +0000 (13:30 -0400)]
restore testsuite/systemtap.base/at_var.stp to normal test mode

7 years agostap -k: generate a .i file too in $TMPDIR
Frank Ch. Eigler [Tue, 27 Jun 2017 22:37:42 +0000 (18:37 -0400)]
stap -k: generate a .i file too in $TMPDIR

This allows problem diagnosis of complex interactions between the
generated-code and the runtime.

7 years agospec/configury: require sqlite > 3.7
Frank Ch. Eigler [Tue, 27 Jun 2017 14:33:25 +0000 (10:33 -0400)]
spec/configury: require sqlite > 3.7

sqlite-devel is not specific enough for recent (sample
keyword-searching) capabilities.

7 years agoNEWS: add placeholder for kernel version porting
Frank Ch. Eigler [Fri, 23 Jun 2017 13:50:24 +0000 (09:50 -0400)]
NEWS: add placeholder for kernel version porting

7 years agoImprove public domain dedication language.
Richard Fontana [Mon, 26 Jun 2017 21:55:32 +0000 (17:55 -0400)]
Improve public domain dedication language.

A friend contacted me about the legal header in these two files,
arguing that it "makes very little sense", I think because of the
juxtaposition of the copyright notice with the public domain
assertion. Following one of his suggestions I replaced it with a
reference to CC0.

Signed-off-by: Richard Fontana <rfontana@redhat.com>
7 years agoReworked/reorganized the NSS client code to handle the HTTP client code.
David Smith [Mon, 26 Jun 2017 21:52:43 +0000 (16:52 -0500)]
Reworked/reorganized the NSS client code to handle the HTTP client code.

* csclient.cxx: Moved lots of code to new file client-nss.cxx. Reorganized
  so that both the NSS and HTTP clients use the same framework.
* csclient.h: Added declaration of new 'client_backend' class and updated.
* configure.ac: Define NEED_BASE_CLIENT_CODE if either HAVE_NSS or
  HAVE_HTTP_SUPPORT is defined.
* Makefile.am: Compile csclient.css if NEED_BASE_CLIENT_CODE is defined.
* Makefile.in: Regenerated.
* config.in: Ditto.
* configure: Ditto.
* client-http.cxx: Renamed and rewored from http_client.cxx.
* client-http.h: New file.
* client-nss.h: Ditto.
* http_client.cxx: Deleted.
* http_client.h: Deleted.
* main.cxx (interactive_mode): Calls renamed nss_client_* server
  functions.
* interactive.cxx: Ditto.
* session.cxx (systemtap_session): Updated.
* session.h: Ditto.
* util.cxx (read_from_file): Moved from csclient.cxx.
  (write_to_file): Ditto.
* util.h: Added declarations.

7 years agoAdd __label__ for each deref_fault in tapsets
Richard Henderson [Mon, 26 Jun 2017 17:14:45 +0000 (10:14 -0700)]
Add __label__ for each deref_fault in tapsets

When adding our own error handling, privatize the label.

7 years agoUpdated tapset/linux/x86_64/sysc_arch_prctl.stp for newer kernels.
David Smith [Fri, 23 Jun 2017 19:43:16 +0000 (14:43 -0500)]
Updated tapset/linux/x86_64/sysc_arch_prctl.stp for newer kernels.

* tapset/linux/x86_64/sysc_arch_prctl.stp: Updated and added 32-bit
  support for newer kernels.
* tapset/linux/x86_64/syscall_num.stp: Added 32-bit arch_prctl().
* testsuite/systemtap.syscall/arch_prctl.c: Updated.

7 years agoUpdate testsuite/systemtap.syscall/poll.c for newer kernels.
David Smith [Fri, 23 Jun 2017 18:48:27 +0000 (13:48 -0500)]
Update testsuite/systemtap.syscall/poll.c for newer kernels.

* testsuite/systemtap.syscall/poll.c: Handle newer kernels that implement
  epoll_wait() in terms of epoll_pwait().

7 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Fri, 23 Jun 2017 18:07:32 +0000 (13:07 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

7 years agoUpdate tapset/linux/ioscheduler.stp for newer kernels.
David Smith [Fri, 23 Jun 2017 18:07:16 +0000 (13:07 -0500)]
Update tapset/linux/ioscheduler.stp for newer kernels.

7 years agosyscall.execve probes: provide decoded env_str
Daan Spitz [Fri, 23 Jun 2017 13:30:24 +0000 (09:30 -0400)]
syscall.execve probes: provide decoded env_str

Pretty-print $envp same way as $argv.

7 years agofollowup to 5cdaa947cbb, avoid using _a symbols
Frank Ch. Eigler [Thu, 22 Jun 2017 22:03:36 +0000 (18:03 -0400)]
followup to 5cdaa947cbb, avoid using _a symbols

Just superstition perhaps, but restore earlier version's use of
'addr' identifier in the *deref macros.

7 years agoFix another compile error in staprun/monitor.c.
David Smith [Thu, 22 Jun 2017 21:26:43 +0000 (16:26 -0500)]
Fix another compile error in staprun/monitor.c.

* staprun/monitor.c (redirect_stdin): Fix "comparison is always true due
  to limited range of data type" compile problem by correctly calling
  getchar().

7 years agoUpdate testsuite's kernel debuginfo smoke test.
David Smith [Thu, 22 Jun 2017 20:48:39 +0000 (15:48 -0500)]
Update testsuite's kernel debuginfo smoke test.

* testsuite/lib/systemtap.exp (environment_sanity_test): Since we've
  merged the syscall and nd_syscall tapsets, we can't probe 'syscall.open'
  for a kernel debuginfo smoke test. Instead, we've got to probe
  'dw_syscall.open'.

7 years agoFix unprivileged_probes.exp python[23] probe support.
David Smith [Thu, 22 Jun 2017 20:42:02 +0000 (15:42 -0500)]
Fix unprivileged_probes.exp python[23] probe support.

* testsuite/systemtap.unprivileged/unprivileged_probes.exp
  (test_restricted_probes): Handle python2 and python3 probes correctly.

7 years agotesting-only patch to track down why $argv[0] read-faults
Frank Ch. Eigler [Thu, 22 Jun 2017 20:02:42 +0000 (16:02 -0400)]
testing-only patch to track down why $argv[0] read-faults

7 years agoUpdated testsuite/buildok/seventeen.stp for newer kernels.
David Smith [Thu, 22 Jun 2017 20:02:23 +0000 (15:02 -0500)]
Updated testsuite/buildok/seventeen.stp for newer kernels.

7 years agoloc2c-runtime.h: in deref calls, tolerate nested calling
Frank Ch. Eigler [Thu, 22 Jun 2017 19:59:22 +0000 (15:59 -0400)]
loc2c-runtime.h: in deref calls, tolerate nested calling

With the loc2stap code, it is possible to see constructs like
deref(8, deref(8, deref(8, deref(8, fetch_register(4))))
so the addr field is itself a deref.  This blows up if the deref
macro copies the addr parameter multiple times, with a glorious
exponential fanout!  So now we use a temporary variable within
the macro, to hold the address value, then reuse that.

7 years agotranslator for embeddedcode: don't emit deref_fault pseudo-labels
Frank Ch. Eigler [Thu, 22 Jun 2017 19:49:39 +0000 (15:49 -0400)]
translator for embeddedcode: don't emit deref_fault pseudo-labels

We will aim to rely on the single solitary deref_fault: label
emitted at the tail of functions / probes boilerplate, rather
than labels that may be nested within generated code.  This
also needs the old-fashioned CATCH_DEREF_FAULT macro for
embedded-C code to no longer define the label.

7 years agoimplicptr.c test case: defeat more compiler optimizations
Frank Ch. Eigler [Thu, 22 Jun 2017 19:48:43 +0000 (15:48 -0400)]
implicptr.c test case: defeat more compiler optimizations

Force the compiler to not optimize away a few more locals.

7 years agoUpdate the python2 tapset for upstream python changes.
David Smith [Thu, 22 Jun 2017 18:37:22 +0000 (13:37 -0500)]
Update the python2 tapset for upstream python changes.

* tapset/python2.stp: New python2 version no longer use PyLong_Object
  (that has been folded into PyInt_Object). Handle this.

7 years agoFix compile error in staprun/monitor.c.
David Smith [Thu, 22 Jun 2017 17:43:34 +0000 (12:43 -0500)]
Fix compile error in staprun/monitor.c.

* staprun/monitor.c: Make sure termios.h gets included no matter if
  HAVE_MONITOR_LIBS is defined.

7 years agoUpdate tracepoint finding logic for newer kernels.
David Smith [Thu, 22 Jun 2017 15:32:34 +0000 (10:32 -0500)]
Update tracepoint finding logic for newer kernels.

* tapsets.cxx (tracepoint_extra_decls): Add support for the 'afs'
  group. Update support for the "wbt" and "timer" groups.

7 years agoregenerate examples index
William Cohen [Thu, 22 Jun 2017 13:38:47 +0000 (09:38 -0400)]
regenerate examples index

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