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

7 years agoAdapt huge page systemtap scripts from blog article into examples
William Cohen [Thu, 22 Jun 2017 03:26:33 +0000 (23:26 -0400)]
Adapt huge page systemtap scripts from blog article into examples

People may be concerned about issues due to huge page operation overhead.  The
blog article at https://developers.redhat.com/blog/2014/03/10/examining-huge-pages-or-transparent-huge-pages-performance/
describes a number of the possible problems.  The example scripts in the article have been tweaked and added to the systemtap memory examples.

7 years agoAdd new probe alias input.char
Aaron Merey [Wed, 21 Jun 2017 16:13:21 +0000 (12:13 -0400)]
Add new probe alias input.char

input.char enables scripts to receive input from stdin during
module runtime. It is an alias for the probe procfs.write("__stdin").
The presence of this procfs probe puts the terminal in non-canonical mode
and causes a thread to spawn in staprun. This thread will read characters
from stdin one at a time and write them to /proc/systemtap/MODNAME/__stdin,
triggering the probe once per character.

An example of this functionality can be seen in EXAMPLES/general/eventcount_interactive.stp.
This script is a modified eventcount.stp where two of the display parameters can
be modified during runtime.

7 years agoUpdated the vm.oom_kill probe for more recent kernels.
David Smith [Wed, 21 Jun 2017 14:55:56 +0000 (09:55 -0500)]
Updated the vm.oom_kill probe for more recent kernels.

7 years agoUpdate several server tests.
David Smith [Tue, 20 Jun 2017 15:44:44 +0000 (10:44 -0500)]
Update several server tests.

* testsuite/systemtap.server/server.exp: Handle the change in
  setup_server() that no longer produces a "server.log" file.
* testsuite/systemtap.server/server_concurrency.exp: Ditto.
* testsuite/systemtap.server/server_req_size.exp: Ditto.

7 years agoAdd the beginnings of the http client code.
David Smith [Thu, 15 Jun 2017 20:59:10 +0000 (15:59 -0500)]
Add the beginnings of the http client code.

* http_client.cxx: New file.
* http_client.h: Ditto.
* session.cxx: Add '--use-http-server' argument. Handle 'http_servers' in
  copy constructor.
* session.h (systemtap_session): Add 'http_servers' member variable.
* main.cxx (passes_0_4): Use http server if requested.
* cmdline.cxx: Add '--use-http-server' argument.
* cmdline.h: Ditto.
* Makefile.am: Add http_client.cxx.
* Makefile.in: Regenerated.

7 years agoUpdated httpd/README.
David Smith [Wed, 14 Jun 2017 20:41:12 +0000 (15:41 -0500)]
Updated httpd/README.

7 years agoThe httpd server now captures stdout/stderr from systemtap.
David Smith [Wed, 14 Jun 2017 20:34:20 +0000 (15:34 -0500)]
The httpd server now captures stdout/stderr from systemtap.

* httpd/api.cxx (result_info::generate_response): Add the return code,
  stdout and stderr files. Change the way we output the module file
  name. Add the module mode.
  (build_info::module_build): Capture stdout and stderr from the module
  build.
* httpd/client.py: Download stdout/stderr files. Add a "stap -L" test.
* httpd/hello_world.stp: Test file.

7 years agoFixed PR21362 by eliminating syscall probe nesting.
David Smith [Wed, 14 Jun 2017 19:35:18 +0000 (14:35 -0500)]
Fixed PR21362 by eliminating syscall probe nesting.

* tapset/linux/sysc_semctl.stp: Update syscall gate macro calls.
* tapset/linux/sysc_semtimedop.stp: Ditto.
* tapset/linux/sysc_mq_open.stp: Replace numeric value with a symbolic
  constant.
* tapset/linux/sysc_lseek.stp: Add syscall gate macros and probe more
  compat entry points.
* tapset/linux/sysc_msgctl.stp: Ditto.
* tapset/linux/sysc_msgrcv.stp: Ditto.
* tapset/linux/sysc_msgsnd.stp: Ditto.
* tapset/linux/sysc_epoll_ctl.stp: Add syscall gate macros and some
  @__pointer() macro calls.
* tapset/linux/s390/sysc_compat_fallocate.stp: Add syscall gate macro calls.
* tapset/linux/s390/sysc_compat_lookup_dcookie.stp: Ditto.
* tapset/linux/sysc_epoll_wait.stp: Ditto.
* tapset/linux/sysc_ftruncate.stp: Ditto.
* tapset/linux/sysc_getdents.stp: Ditto.
* tapset/linux/sysc_ni_syscall.stp: Ditto.
* tapset/linux/sysc_setfsgid.stp: Ditto.
* tapset/linux/sysc_setfsuid.stp: Ditto.
* tapset/linux/sysc_setgid.stp: Ditto.
* tapset/linux/sysc_setregid.stp: Ditto.
* tapset/linux/sysc_setresgid.stp: Ditto.
* tapset/linux/sysc_setresuid.stp: Ditto.
* tapset/linux/sysc_setreuid.stp: Ditto.
* tapset/linux/sysc_setuid.stp: Ditto.
* tapset/linux/sysc_sigsuspend.stp: Ditto.
* tapset/linux/sysc_truncate.stp: Ditto.
* tapset/linux/powerpc/sysc_sysctl32.stp: Ignore the compat_sys_sysctl()
  syscall, since it is just a wrapper around sys_sysctl().
* tapset/linux/powerpc/sysc_sys32_getdents.stp: Deleted comment.
* tapset/linux/powerpc/sysc_ppc64_personality.stp: Ignore the
  ppc64_personality() syscall, since it is just a wrapper around
  sys_personality().
* tapset/linux/syscalls.stpm: Add @__syscall_gate_noncompat_simple()
  macro.
* runtime/linux/compat_unistd.h: Added more syscall defines.
* testsuite/systemtap.syscall/test.tcl (run_one_test): Search for the
  syscall at the beginning of the line (to avoid matching nested syscalls).
* testsuite/systemtap.syscall/aio.c: Updated.
* testsuite/systemtap.syscall/getdents.c: Ditto.
* testsuite/systemtap.syscall/mq.c: Ditto.

7 years agoAdd file upload to the httpd server.
David Smith [Tue, 13 Jun 2017 15:51:45 +0000 (10:51 -0500)]
Add file upload to the httpd server.

* httpd/client.py: Move common code into a function. Add a second test
  case that uploads a script file.
* httpd/server.cxx (connection_info::post_files_cleanup): New function.
  (connection_info::postdataiterator): Handle files included with the POST
  request.
  (server::access_handler): Copy all the POST file info into the request.
* httpd/server.h (struct request): Add 'base_dir' and 'files' member
  variables.
* httpd/api.cxx (build_info::module_build): Do an unshare()/chdir() before
  the spatp_spawn if needed.

7 years agostaptree: put a warning block beside expression::print()
Frank Ch. Eigler [Mon, 12 Jun 2017 18:06:02 +0000 (14:06 -0400)]
staptree: put a warning block beside expression::print()

Note that a verbose-enough pretty-printer is important for
optimization (safety!) purposes, not just aesthetics.

7 years agoAdd httpd/README describing the web api.
David Smith [Thu, 8 Jun 2017 20:19:40 +0000 (15:19 -0500)]
Add httpd/README describing the web api.

7 years agoPerformed some code rearranging in the httpd server code.
David Smith [Thu, 8 Jun 2017 18:27:57 +0000 (13:27 -0500)]
Performed some code rearranging in the httpd server code.

* httpd/main.cxx: Moved code to api.cxx.
* httpd/api.cxx: New file.
* httpd/api.h: Ditto.
* httpd/Makefile.am (stap_httpd_SOURCES): Added api.cxx.
* httpd/Makefile.in: Regenerated.
* httpd/server.cxx: Add copyright header comment.
* httpd/server.h: Ditto.

7 years agoThe httpd server now support downloading the built module.
David Smith [Thu, 8 Jun 2017 16:34:15 +0000 (11:34 -0500)]
The httpd server now support downloading the built module.

* httpd/main.cxx (result_info::generate_file_response): New function.
  (class result_file_rh): New class.
  (main): Add result file request handler to the server.
* httpd/server.cxx (server::queue_response): Add code to handle file
  downloads.
* httpd/server.h (struct response): Add 'file' member variable.
* httpd/client.py: Add code to download module.

7 years agoThe httpd server now builds a kernel module and returns its information.
David Smith [Wed, 7 Jun 2017 17:28:51 +0000 (12:28 -0500)]
The httpd server now builds a kernel module and returns its information.

* httpd/main.cxx: Add code to actually build a kernel module. Add code to
  return information about the kernel module.
* httpd/client.py: Add code to expect the redirect from the build info to
  the build results.

7 years agoThe httpd server now produces valid JSON.
David Smith [Tue, 6 Jun 2017 13:55:18 +0000 (08:55 -0500)]
The httpd server now produces valid JSON.

* httpd/main.cxx (build_info::content): Output valid JSON.
* httpd/client.py: Expect a valid JSON response.

7 years agoUpdate the syscall tapset for the 4.11 kernel (s390x, powerpc, aarch64).
David Smith [Thu, 1 Jun 2017 20:29:50 +0000 (15:29 -0500)]
Update the syscall tapset for the 4.11 kernel (s390x, powerpc, aarch64).

* tapset/linux/s390/aux_syscalls.stp (_arch_ptrace_argstr): Add
  PTRACE_SINGLEBLOCK support.
* tapset/linux/sysc_pwrite.stp: Fix compat 64-bit offset logic. Use
  @__compat_ulong() on the appropriate values. Probe the
  "compat_sys_s390_SYSCALL" function for s390 compat support.
* tapset/linux/s390/sysc_compat_fadvise64.stp: Ditto.
* tapset/linux/s390/sysc_compat_ftruncate64.stp: Ditto.
* tapset/linux/s390/sysc_compat_readahead.stp: Ditto.
* tapset/linux/sysc_io_cancel.stp: Use @__compat_ulong() on the
  appropriate values.
* tapset/linux/sysc_io_destroy.stp: Ditto.
* tapset/linux/sysc_io_getevents.stp: Ditto.
* tapset/linux/sysc_io_submit.stp: Ditto.
* tapset/linux/sysc_ioctl.stp: Ditto.
* tapset/linux/sysc_kexec_load.stp: Ditto.
* tapset/linux/sysc_pread.stp: Ditto.
* tapset/linux/sysc_ptrace.stp: Ditto.
* tapset/linux/sysc_fstatat.stp: Probe the "compat_sys_s390_SYSCALL"
  function for s390 compat support.
* tapset/linux/sysc_getegid.stp: Ditto.
* tapset/linux/sysc_geteuid.stp: Ditto.
* tapset/linux/sysc_getgid.stp: Ditto.
* tapset/linux/sysc_getgroups.stp: Ditto.
* tapset/linux/sysc_getuid.stp: Ditto.
* tapset/linux/sysc_lstat.stp: Ditto.
* tapset/linux/sysc_read.stp: Ditto.
* tapset/linux/sysc_setgroups.stp: Ditto.
* tapset/linux/sysc_stat.stp: Ditto.
* tapset/linux/sysc_write.stp: Ditto.
* tapset/linux/s390/sysc_getresgid16.stp: Ditto.
* tapset/linux/s390/sysc_getresuid16.stp: Ditto.
* tapset/linux/s390/sysc_compat_truncate64.stp: Ditto.
* tapset/linux/sysc_clock_nanosleep.stp: Use @__pointer() on pointer
  values.
* tapset/linux/sysc_copy_file_range.stp: Ditto.
* tapset/linux/sysc_execve.stp: Ditto.
* tapset/linux/sysc_fcntl.stp: Ditto.
* tapset/linux/sysc_fstatfs64.stp: Ditto.
* tapset/linux/sysc_futex.stp: Ditto.
* tapset/linux/sysc_futimesat.stp: Ditto.
* tapset/linux/sysc_mount.stp: Ditto.
* tapset/linux/sysc_mq_getsetattr.stp: Ditto.
* tapset/linux/sysc_mq_notify.stp: Ditto.
* tapset/linux/sysc_mq_open.stp: Ditto.
* tapset/linux/sysc_mq_timedreceive.stp: Ditto.
* tapset/linux/sysc_mq_timedsend.stp: Ditto.
* tapset/linux/sysc_nanosleep.stp: Ditto.
* tapset/linux/sysc_ppoll.stp: Ditto.
* tapset/linux/sysc_process_vm_readv.stp: Ditto.
* tapset/linux/sysc_process_vm_writev.stp: Ditto.
* tapset/linux/sysc_pselect6.stp: Ditto.
* tapset/linux/sysc_pselect7.stp: Ditto.
* tapset/linux/sysc_sched_getaffinity.stp: Ditto.
* tapset/linux/sysc_sched_setaffinity.stp: Ditto.
* tapset/linux/sysc_select.stp: Ditto.
* tapset/linux/sysc_settimeofday.stp: Ditto.
* tapset/linux/sysc_statfs.stp: Ditto.
* tapset/linux/sysc_statfs64.stp: Ditto.
* tapset/linux/sysc_timer_create.stp: Ditto.
* tapset/linux/sysc_timer_settime.stp: Ditto.
* tapset/linux/sysc_times.stp: Ditto.
* tapset/linux/sysc_utime.stp: Ditto.
* tapset/linux/sysc_utimensat.stp: Ditto.
* tapset/linux/sysc_utimes.stp: Ditto.
* tapset/linux/sysc_accept.stp: Make sure the 'call' socketcall() argument
  is treated as an 32-bit int.
* tapset/linux/sysc_accept4.stp: Ditto.
* tapset/linux/sysc_bind.stp: Ditto.
* tapset/linux/sysc_connect.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/sysc_execveat.stp: Fix calling the nd_syscall 'int_arg()'
  function on '$flags' in dw_syscall.compat_execveat. Use @__pointer() on
  pointer values.
* tapset/linux/aux_syscalls.stp: Initialize structure to make gcc happy.
* tapset/linux/arm64/syscall_num.stp: Add "statx" syscall.
* tapset/linux/s390/syscall_num.stp: Ditto.
* tapset/linux/powerpc/syscall_num.stp: Add "copy_file_range" and
  "statx" syscalls.
* testsuite/systemtap.syscall/aio.c: Updated with syscall wrappers.
* testsuite/systemtap.syscall/ioperm.c: Ditto.
* testsuite/systemtap.syscall/clock.c: Add a return value to the regexp.
* testsuite/systemtap.syscall/copy_file_range.c: Corrected types from
  'off_t' to 'loff_t'.
* testsuite/systemtap.syscall/fadvise64.c: Add a "return 0" from main() so
  that systemtap doesn't complain about the target exiting with a non-zero
  exit code.
* testsuite/systemtap.syscall/getgroups.c: Ditto.
* testsuite/systemtap.syscall/memfd_create.c: Add s390 31-bit regex support.
* testsuite/systemtap.syscall/readdir.c: Ditto.
* testsuite/systemtap.syscall/sched_attr.c: Ditto.
* testsuite/systemtap.syscall/stat.c: Ditto.
* testsuite/systemtap.syscall/uselib.c: Ditto.
* testsuite/systemtap.syscall/seccomp.c: Add s390 31-bit support and allow
  for the syscall to be unimplemented.
* testsuite/systemtap.syscall/ptrace.c: For s390, undefine PTRACE_GETREGS
  if we've got PTRACE_SINGLEBLOCK (since they have the same value).
* testsuite/systemtap.syscall/userfaultfd.c: Handle userfaultfd() being
  unimplemented.
* testsuite/systemtap.syscall/tapset/syscall.stp: Updated.

7 years agoThe httpd server now expects the command line to be sent tokenized.
David Smith [Tue, 30 May 2017 21:56:58 +0000 (16:56 -0500)]
The httpd server now expects the command line to be sent tokenized.

* httpd/server.cxx (get_key_values): Expect each request parameter to
  possibly have multiple values.
* httpd/server.h (struct request): Ditto
* httpd/main.cxx (string build_info::content): Output the command line
  arguments as an JSON array instead of as a single value.
  (build_info::start_module_build): New function.
  (response build_collection::POST): Expect each request parameter to
  possibly have multiple values.
* httpd/client.py: Pass the command line arguments as an array of strings
  instead of as one string.

7 years agoAdd httpd signal handling.
David Smith [Tue, 23 May 2017 21:33:23 +0000 (16:33 -0500)]
Add httpd signal handling.

* httpd/server.cxx (server::stop): New function.
  (server::wait): Ditto.
* httpd/server.h: Add condition variable to wait on.
* httpd/main.cxx (build_info::content): Put the json object when we're
  done with it.
  (cleanup): New function.
  (signal_thread): Ditto.
  (setup_main_signals): Ditto.
  (main): Call signal handling functions.

7 years agoAdd httpd python test client.
David Smith [Mon, 22 May 2017 21:27:04 +0000 (16:27 -0500)]
Add httpd python test client.

7 years agoAdd the linux probe_lock.h contention change to dyninst
Stan Cox [Sat, 13 May 2017 11:01:03 +0000 (07:01 -0400)]
Add the linux probe_lock.h contention change to dyninst

* runtime/dyninst/probe_lock.h: Increment contention attempts.

7 years agoFix manpage typo
Stan Cox [Fri, 12 May 2017 19:33:49 +0000 (15:33 -0400)]
Fix manpage typo

7 years agostap-report: search out other vmlinu{x,z,id} files for buildid reporting
Frank Ch. Eigler [Fri, 12 May 2017 17:36:04 +0000 (13:36 -0400)]
stap-report: search out other vmlinu{x,z,id} files for buildid reporting

7 years agoAdd httpd server updates.
David Smith [Fri, 12 May 2017 16:36:24 +0000 (11:36 -0500)]
Add httpd server updates.

* httpd/server.cxx (server::access_handler): Save regexp matches.
  (server::queue_response): Add response headers.
* httpd/main.cxx: Add initial support for build info.
* httpd/Makefile.am: Link with the json-c library.
* httpd/server.h (struct request): Add 'matches' variable.
* configure.ac: Add the json-c library as a requirement of the httpd
  server.
* config.in: Regenerated.
* configure: Ditto.
* httpd/Makefile.in: Ditto.

7 years agostap-report: also include RELOC/RANDOMIZE kconfig lines
Frank Ch. Eigler [Fri, 12 May 2017 14:59:30 +0000 (10:59 -0400)]
stap-report: also include RELOC/RANDOMIZE kconfig lines

7 years agoUse @task() @cast-wrapper for task->mm in tapset, so that debuginfo not needed
Mikael Dubik [Fri, 12 May 2017 13:41:39 +0000 (09:41 -0400)]
Use @task() @cast-wrapper for task->mm in tapset, so that debuginfo not needed

7 years agoUpdated the list of tested kernel versions to include 4.11.
David Smith [Thu, 11 May 2017 13:35:33 +0000 (08:35 -0500)]
Updated the list of tested kernel versions to include 4.11.

7 years agoMark several tests as needing uprobes.
David Smith [Wed, 10 May 2017 16:36:47 +0000 (11:36 -0500)]
Mark several tests as needing uprobes.

* testsuite/systemtap.base/at_var_void_stmt.exp: Don't run the test if we
  don't have uprobes.
* testsuite/systemtap.base/auto_path.exp: Ditto.
* testsuite/systemtap.base/pr18649.exp: Ditto.
* testsuite/systemtap.base/set_user.exp: Ditto.
* testsuite/systemtap.context/usymfileline.exp: Ditto.
* testsuite/systemtap.exelib/pthreadprobes.exp: Ditto.

7 years agoAdd small testsuite fixes for 4.11 kernels.
David Smith [Tue, 9 May 2017 21:39:11 +0000 (16:39 -0500)]
Add small testsuite fixes for 4.11 kernels.

* testsuite/buildok/twentyseven.stp: Avoid missing inlined function
  arguments by probing 'kernel.function("do_execve").call'.
* testsuite/buildok/thirtyone.stp: On 4.11 kernels, handle the vfs_stat()
  function being renamed to vfs_statx().
* testsuite/systemtap.pass1-4/buildok.exp: Add kfails for
  buildok/fortyfour.stp and buildok/map_probe_cond.stp if we don't have
  uprobes.
* testsuite/systemtap.pass1-4/buildok-interactive.exp: Ditto.

7 years agoAdd missing @cast() calls for 4.11 kernels.
David Smith [Tue, 9 May 2017 21:32:25 +0000 (16:32 -0500)]
Add missing @cast() calls for 4.11 kernels.

* tapset/linux/task.stp: Add a "signal_struct" cast to
  _task_rlimit_cur().
* tapset/linux/task.stpm: Fix @mm() macro for kernels >= 2.6.34, where the
  mm_struct definition has moved to <linux/mm_types.h>
* tapset/linux/proc_mem.stp (proc_mem_size): Use the @mm() macro to cast
  values to a mm_struct.
  (proc_mem_txt): Ditto.
  (proc_mem_data): Ditto.
* tapset/linux/context.stp (cmdline_args): Ditto.
* tapset/linux/context-envvar.stp (env_var): Ditto.

7 years agoAvoid missing "task_stack()" definition on 4.11 kernels.
David Smith [Tue, 9 May 2017 21:20:41 +0000 (16:20 -0500)]
Avoid missing "task_stack()" definition on 4.11 kernels.

* runtime/compatdefs.h: If <linux/sched/task_stack.h> exists, include
  it. This avoids a missing task_stack() definition.
* buildrun.cxx (compile_pass): Add autoconf test for
  <linux/sched/task_stack.h>.
* runtime/linux/autoconf-sched-task_stack.c: New file.

7 years agoRevert all bpf patches
Richard Henderson [Thu, 4 May 2017 18:55:47 +0000 (11:55 -0700)]
Revert all bpf patches

This reverts commits:
02a3ce26f69233fce8d175fbf248a6b9b1f4a654
ceac2b1bcf5170848e0aca7595e6b8222e122e7b
24a49c47f3a76a8058cf6545de5968fe8a036d5b
7f1e56e9fe2f94ab181481396068d09ab8c42ce8
009ff1576c6990db63f48a57234f2d5454f63bf5
8e39930950bfd916971e1df132b6abf269fbe314
03629ed30d3334aebe0ebe2c57ae9b2fb90eab4d
7ca1ffe6e431e4818a9a479935d75a428d2aaf57
0603c3e9f86c47f3b5096a8060bed35f71d1d6e4
cbceaaecb14cfb81ae4d6e88e3495edc02e6efbf
567e36b73db7ce7c293d2e8f5378d3968f5838af
ee54f2bab5265d044955d1d29a8564b778c21416
51be46c30ade0a9b0dc1fe0b96f00922f9ae5a78
7e2cd9f56293f69718df015c96cab37960e0e032

7 years agoFix my typo in systemtap.spec.
David Smith [Thu, 4 May 2017 19:02:16 +0000 (14:02 -0500)]
Fix my typo in systemtap.spec.

7 years agoAdd support for the httpd code to systemtap.spec, defaulting to "off".
David Smith [Thu, 4 May 2017 18:51:08 +0000 (13:51 -0500)]
Add support for the httpd code to systemtap.spec, defaulting to "off".

7 years agoEmit deref_fault labels
Richard Henderson [Wed, 26 Apr 2017 18:47:12 +0000 (11:47 -0700)]
Emit deref_fault labels

We used to emit these during dwflpp::express_as_string, after we'd
generated the rest of the body of the embeddedcode node.  Emitting
these unconditionally is, for now at least, easier than walking the
tree to figure out if they're needed.

The __attribute__ syntax for labels dates from gcc 4.2.

7 years agoFix some errors in the loc2stap rewrite
Richard Henderson [Fri, 21 Apr 2017 21:12:33 +0000 (14:12 -0700)]
Fix some errors in the loc2stap rewrite

The old code had some hidden side effects within translate_location,
wherein we failed to save the result of the dereference.

7 years agoRemove duplication in deprecated tapset functions
Cody Santing [Wed, 3 May 2017 16:31:39 +0000 (12:31 -0400)]
Remove duplication in deprecated tapset functions

* Removed systemtap version compile conditions on
deprecated functions.  Deprecated functions now refer to their
replacements rather than being a direct copy.

7 years agoman stapprobes: mention that process.begin enumerates
Frank Ch. Eigler [Wed, 3 May 2017 14:58:43 +0000 (10:58 -0400)]
man stapprobes: mention that process.begin enumerates

7 years agoMake changes for RHEL6 in the http web service server code.
David Smith [Tue, 2 May 2017 17:11:29 +0000 (12:11 -0500)]
Make changes for RHEL6 in the http web service server code.

* configure.ac: Accept version 2.17.0 of the uuid library (for RHEL6).
* httpd/Makefile.am: Add ../util.cxx for regexp support that works on
  RHEL6.
* httpd/main.cxx: Ditto.
* httpd/server.cxx: Ditto.
* httpd/server.h: Ditto.
* configure: Regenerated.
* httpd/Makefile.in: Ditto.

7 years agoAdded initial http web service server code.
David Smith [Mon, 1 May 2017 20:55:51 +0000 (15:55 -0500)]
Added initial http web service server code.

* httpd/Makefile.am
* httpd/Makefile.in: Generated.
* httpd/main.cxx: httpd main program source.
* httpd/server.cxx: httpd server framework
* httpd/server.h: httpd server include file
* configure.ac: Make sure we have the microhttpd and uuid libraries before
  trying to build the httpd code.
* Makefile.am: Added 'httpd' subdirectory.
* Makefile.in: Regenerated.
* config.in: Ditto.
* configure: Ditto.

7 years agoPR20988: New strpos() tapset function
Martin Cermak [Thu, 27 Apr 2017 15:54:24 +0000 (17:54 +0200)]
PR20988: New strpos() tapset function

* tapset/string.stp: New strpos() tapset function
* testsuite/systemtap.string/strpos.{stp,exp}: New testcase

7 years agoPR21435: Convenience groupadd for the make install target
Martin Cermak [Thu, 27 Apr 2017 15:52:52 +0000 (17:52 +0200)]
PR21435: Convenience groupadd for the make install target

7 years agoAdd S390 DWARF register names
Richard Henderson [Tue, 25 Apr 2017 17:30:54 +0000 (19:30 +0200)]
Add S390 DWARF register names

Give bpf-translate.cxx mappings for the DWARF register names for S390.

7 years agoAdd PPC DWARF register names
Richard Henderson [Tue, 25 Apr 2017 17:23:58 +0000 (19:23 +0200)]
Add PPC DWARF register names

Give bpf-translate.cxx mappings for the DWARF register names for PPC.

7 years agoAvoid server test failures by fixing test server startup/shutdown.
David Smith [Tue, 25 Apr 2017 19:48:13 +0000 (14:48 -0500)]
Avoid server test failures by fixing test server startup/shutdown.

* testsuite/lib/systemtap.exp: Avoid 'output: can't read "logfile": no
  such variable' tcl errors when starting systemtap server by properly
  handling server logfile.

7 years agoMerge remaining compat and nd_compat syscalls per PR20333.
Martin Cermak [Tue, 25 Apr 2017 09:58:12 +0000 (11:58 +0200)]
Merge remaining compat and nd_compat syscalls per PR20333.

7 years agoGet loc2stap.cxx working with the gcc 4.4 compiler (RHEL6-era).
David Smith [Mon, 17 Apr 2017 16:12:04 +0000 (11:12 -0500)]
Get loc2stap.cxx working with the gcc 4.4 compiler (RHEL6-era).

* loc2stap.cxx: Change some std::to_string() calls to lex_cast() calls to
  make the RHEL6 compiler happy. Also adjust a structure initialization.

7 years agoAdd aarch64 DWARF register names
William Cohen [Mon, 17 Apr 2017 02:57:34 +0000 (22:57 -0400)]
Add aarch64 DWARF register names

To allow systemtap to compile on aarch64 machines with kernels that
supports BPF bpf-translate.cxx needs to have mappings for the DWARF
register names for aarch64.

7 years agoAdd ARM DWARF register names
William Cohen [Sun, 16 Apr 2017 19:44:27 +0000 (15:44 -0400)]
Add ARM DWARF register names

To allow systemtap to compile on 32-bit ARM machines with kernels that
supports BPF bpf-translate.cxx needs to have mappings for the DWARF
register names for ARM.

7 years agoconfigure: Check for linux/bpf.h header.
Mark Wielaard [Fri, 14 Apr 2017 11:52:39 +0000 (13:52 +0200)]
configure: Check for linux/bpf.h header.

Don't build bpf backend support if there is no bpf.h header.
Skip translate_bpf_pass if there is no bpf support.
Regenerate configure and Makefile.in.

7 years agostapbpf/libbpf.c: Define __NR_bpf and initialize anonymous bpf_attr union.
Mark Wielaard [Fri, 14 Apr 2017 10:44:36 +0000 (12:44 +0200)]
stapbpf/libbpf.c: Define __NR_bpf and initialize anonymous bpf_attr union.

__NR_bpf might not be defined in older headers, if so define it ourselves.
Older GCC have trouble initializing anonymous struct fields in a union
directly. Initialize them more explicitly.

7 years agostapbpf/stapbpf.cxx: Define PERF_EVENT_IOC_SET_BPF.
Mark Wielaard [Fri, 14 Apr 2017 10:43:38 +0000 (12:43 +0200)]
stapbpf/stapbpf.cxx: Define PERF_EVENT_IOC_SET_BPF.

PERF_EVENT_IOC_SET_BPF was introduced in 4.1, define it if unknown.

7 years agobpf-translate.cxx: Include elfutils/version.h and check Strent exists.
Mark Wielaard [Fri, 14 Apr 2017 10:40:57 +0000 (12:40 +0200)]
bpf-translate.cxx: Include elfutils/version.h and check Strent exists.

Before elfutils 0.167 the strtab functions were only available through
the unsupported libebl library.

7 years agoloc2stap.cxx (location_context::translate): Initialize implicit_value.
Mark Wielaard [Fri, 14 Apr 2017 10:12:44 +0000 (12:12 +0200)]
loc2stap.cxx (location_context::translate): Initialize implicit_value.

Prevent a error with GCC -Werror=missing-field-initializers.
Explicit set length and data.

7 years agoFix -Wimplicit-fallthrough build errors for bpf code
William Cohen [Wed, 12 Apr 2017 20:13:25 +0000 (16:13 -0400)]
Fix -Wimplicit-fallthrough build errors for bpf code

GCC7 will now error implicit fallthrough's as per sourceware.org/PR7652

7 years agoSquashed commit of the eBPF backend for stap
Richard Henderson [Wed, 5 Apr 2017 17:03:42 +0000 (10:03 -0700)]
Squashed commit of the eBPF backend for stap

7 years agostap-report: also collect kbuild gcc command lines
Frank Ch. Eigler [Mon, 10 Apr 2017 17:45:49 +0000 (13:45 -0400)]
stap-report: also collect kbuild gcc command lines

7 years agoFix PR21363 by getting _struct_sched_attr_u() working on rawhide.
David Smith [Fri, 7 Apr 2017 15:13:41 +0000 (10:13 -0500)]
Fix PR21363 by getting _struct_sched_attr_u() working on rawhide.

* buildrun.cxx (compile_pass): Add autoconf test to check for the
  existence of <uapi/linux/sched/types.h>
* tapset/linux/aux_syscalls.stp: Include <uapi/linux/sched/types.h> if
  STAPCONF_UAPI_LINUX_SCHED_TYPES is defined.
* runtime/linux/autoconf-uapi-linux-sched-types.c: New autoconf test.

7 years agoUpdate tracepoint finding logic for the 'swiotlb' tracepoint group.
David Smith [Wed, 5 Apr 2017 17:50:43 +0000 (12:50 -0500)]
Update tracepoint finding logic for the 'swiotlb' tracepoint group.

* tapsets.cxx (tracepoint_extra_decls): Add support for the 'swiotlb'
  tracepoint group.

7 years agoAdd a new tracepoint test to check compile requirements for each group.
David Smith [Wed, 5 Apr 2017 16:05:04 +0000 (11:05 -0500)]
Add a new tracepoint test to check compile requirements for each group.

* testsuite/systemtap.base/tracepoints_list.exp: Add a new test where we
  make sure that each tracepoint group's compile tweaks are sufficient in
  itself.

7 years agoFix several small items found by a coverty code scan.
David Smith [Wed, 5 Apr 2017 15:28:39 +0000 (10:28 -0500)]
Fix several small items found by a coverty code scan.

* tapsets.cxx (uprobe_derived_probe_group): Add constructor to initialize
  'max_perf_counters'.
* session.cxx (parse_cmdline): Be sure check 'optarg' is NULL before
  trying to use it.
* elaborate.cxx (stat_decl_collector::visit_stat_op): Make sure that if
  iterator is at the end, we don't try to access it anyway.

7 years agoFix PR21353 by correctly handling the compat arch fcntl syscall
Martin Cermak [Wed, 5 Apr 2017 12:45:16 +0000 (14:45 +0200)]
Fix PR21353 by correctly handling the compat arch fcntl syscall

7 years agoman: add a note about direct pointer dereferencing
Ruslan Kuprieiev [Tue, 4 Apr 2017 13:06:52 +0000 (16:06 +0300)]
man: add a note about direct pointer dereferencing

It is currently not very clear how to dereference a pointer to
a basic type, so lets add two notes about it to man pages.

Signed-off-by: Ruslan Kuprieiev <rkuprieiev@cloudlinux.com>
7 years agoPR21297 Add support for new statx syscall
Martin Cermak [Tue, 4 Apr 2017 08:25:22 +0000 (10:25 +0200)]
PR21297 Add support for new statx syscall

tapset/linux/aux_syscalls.stp: Add _statx_mask_str()
tapset/linux/i386/syscall_num.stp: Add statx syscall info
tapset/linux/x86_64/syscall_num.stp: Ditto
tapset/linux/sysc_statx.stp: New syscall tapset
testsuite/buildok/nd_syscalls2-detailed.stp: New buildok test
testsuite/buildok/syscalls2-detailed.stp: Ditto
testsuite/systemtap.syscall/stat.c: New statx syscall subtest

7 years agoAdd a minor tweak to syscall_consistency.exp.
David Smith [Mon, 3 Apr 2017 15:48:51 +0000 (10:48 -0500)]
Add a minor tweak to syscall_consistency.exp.

* testsuite/systemtap.syscall/syscall_consistency.exp (get_syscalls):
  Provide a default value for the 'scname' variable.

7 years agoTweak elfutils version discovery in the testsuite.
David Smith [Fri, 31 Mar 2017 19:36:40 +0000 (14:36 -0500)]
Tweak elfutils version discovery in the testsuite.

* testsuite/lib/systemtap.exp (get_system_info): If we're running a
  version of systemtap compiled with version X of elfutils, but running
  with version Y of elfutils (where Y > X), the elfutils version gets
  reported as 'Y/X'. Make sure to parse this correctly.

7 years agoComment in session.cxx to explain elfutils build/run version strings.
Frank Ch. Eigler [Fri, 31 Mar 2017 12:28:05 +0000 (08:28 -0400)]
Comment in session.cxx to explain elfutils build/run version strings.

7 years agoNo longer kfail semok/autocast14.stp.
David Smith [Wed, 29 Mar 2017 20:15:03 +0000 (15:15 -0500)]
No longer kfail semok/autocast14.stp.

* testsuite/systemtap.pass1-4/semok.exp: Since code to fix PR18079 has
  been committed, remove the kfail for semok/autocast14.stp.

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