]> sourceware.org Git - systemtap.git/log
systemtap.git
6 years agoMade 'pylint' suggested changes to fedora_install_package.py.
David Smith [Thu, 14 Dec 2017 15:38:52 +0000 (09:38 -0600)]
Made 'pylint' suggested changes to fedora_install_package.py.

* httpd/docker/fedora_install_package.py: Made several small changes to
  make 'pylint' happy.

6 years agoUpdate the web service fedora package installer to use packages from koji.
David Smith [Wed, 13 Dec 2017 19:07:34 +0000 (13:07 -0600)]
Update the web service fedora package installer to use packages from koji.

* httpd/docker/fedora_install_package.py: Add support from downloading
  packages from koji, the fedora build system.
* httpd/docker/fedora.json: Add 'wget' and 'createrepo_c' to the base list
  of packages to be installed.

6 years agoBPF translator: change map type of internal globals
Aaron Merey [Tue, 12 Dec 2017 23:56:55 +0000 (18:56 -0500)]
BPF translator: change map type of internal globals

* bpf-translate.cxx (build_internal_globals): use BPF_MAP_TYPE_HASH
  instead of BPF_MAP_TYPE_ARRAY. The former supports atomic updates.

* stapbpf.cxx (init_internal_globals): replace BPF_EXIST with BPF_ANY
  since BPF hash maps elements have to be created before attempting
  to update them.

6 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Tue, 12 Dec 2017 19:53:26 +0000 (13:53 -0600)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

6 years agoGrab the stap output from the docker container.
David Smith [Tue, 12 Dec 2017 19:42:59 +0000 (13:42 -0600)]
Grab the stap output from the docker container.

* httpd/backends.cxx (docker_backend::generate_module): Cleanup the
  stdout/stderr capturing logic. Use "docker cp" to copy any results from
  the container image to the server.
* httpd/api.cxx (get_uuid_representation): Make non-static so other code
  can use.
* httpd/api.h: Add get_uuid_representation() declaration.

6 years agoMake consistent use of the term "build_id"
Stan Cox [Tue, 12 Dec 2017 19:26:51 +0000 (14:26 -0500)]
Make consistent use of the term "build_id"

* client-http.cxx (http_client::post):  Use term "build_id"
* httpd/api.cxx (build_collection_rh::POST:  Likewise.
* httpd/server.cxx (get_key_values):  Likewise.

6 years agoAdd another PR22551 fix by updating the use of timers for the 4.13 kernel.
David Smith [Mon, 11 Dec 2017 16:05:50 +0000 (10:05 -0600)]
Add another PR22551 fix by updating the use of timers for the 4.13 kernel.

* runtime/linux/timer_compatibility.h: Update for the
  4.13.16-202.fc26.x86_64 kernel, which has the TIMER_TRACE_FLAGMASK
  define (which we were using to determine the old vs. new timer
  interface).
* tapset-timers.cxx: Ditto.

6 years agoAdd environment variable support to http client/server.
Stan Cox [Thu, 7 Dec 2017 22:09:50 +0000 (17:09 -0500)]
Add environment variable support to http client/server.

* client-http.cxx (trace): Don't display large packets.
  (post):  Package file info as file_info array.  Package env vars as
     env_vars object collection.
* api.h/api.cxx (client_request_data):  Add env_vars
* backends.cxx (*::generate_module):  Handle env_vars
* server.cxx (get_key_values): Handle array of objects and object collection

6 years agoUpdated several tapsets for the 4.15 kernel.
David Smith [Thu, 7 Dec 2017 22:07:39 +0000 (16:07 -0600)]
Updated several tapsets for the 4.15 kernel.

* tapset/linux/linuxmib.stp: Update the 'DelayedACKs' probes to handle
  a missing '$data' parameter.
* tapset/linux/memory.stp: Handle missing '__GFP_COLD' flag.
* tapset/linux/nfsd.stp: Update the 'nfsd.proc4.rename' probe to handle
  upstream changes.
* tapset/linux/signal.stp: Update the 'signal.pending' probe to handle a
  missing '$sigsestsize' parameter.

6 years agoMake builds more reproducible by removing 'DATE' variable references.
Bernhard Wiedemann [Thu, 7 Dec 2017 15:57:40 +0000 (09:57 -0600)]
Make builds more reproducible by removing 'DATE' variable references.

* doc/Tapset_Reference_Guide/manpager.sh: Remove DATE reference.
* man/cs/stappaths.7.in: Ditto.

6 years agoFix PR22551 by updating the use of timers for the 4.15 kernel.
David Smith [Wed, 6 Dec 2017 20:37:42 +0000 (14:37 -0600)]
Fix PR22551 by updating the use of timers for the 4.15 kernel.

* runtime/linux/timer_compatibility.h: New file.
* runtime/time.c: Update timer callback function parameter type. Update
  timer initialization.
* runtime/transport/relay_v2.c: Ditto.
* runtime/transport/transport.c: Ditto.
* tapset-timers.cxx (timer_derived_probe_group::emit_module_decls):
  Ditto. Handle old and new timer callback interface.
* runtime/linux/runtime.h: Include timer_compatibility.h instead of timer.h.
* tapset/linux/scsi.stp: Ditto.

6 years agoMake builds more reproducible by removing unneeded autoconf 'DATE' variable.
Bernhard Wiedemann [Tue, 5 Dec 2017 18:33:16 +0000 (12:33 -0600)]
Make builds more reproducible by removing unneeded autoconf 'DATE' variable.

* configure.ac: Removed unneeded 'DATE' autoconf variable (which breaks
  build reproducibility).
* man/stappaths.7.in: Removed uneeded 'DATE' variable reference.
* Makefile.in: Regenerated.
* config.in: Ditto.
* configure: Ditto.
* doc/Makefile.in: Ditto.
* doc/SystemTap_Tapset_Reference/Makefile.in: Ditto.
* doc/beginners/Makefile.in: Ditto.
* httpd/Makefile.in: Ditto.
* httpd/docker/Makefile.in: Ditto.
* java/Makefile.in: Ditto.
* man/Makefile.in: Ditto.
* man/cs/Makefile.in: Ditto.
* python/Makefile.in: Ditto.
* stapbpf/Makefile.in: Ditto.
* stapdyn/Makefile.in: Ditto.
* staprun/Makefile.in: Ditto.

6 years agostap: Add shorthand option --bpf for --runtime=bpf
Martin Cermak [Fri, 1 Dec 2017 12:43:43 +0000 (13:43 +0100)]
stap: Add shorthand option --bpf for --runtime=bpf

* cmdline.h: Introduce LONG_OPT_RUNTIME_BPF.
* cmdline.cxx: Define --bpf as LONG_OPT_RUNTIME_BPF.
* session.cxx: Set the runtime option, show the feature
  in the --version output, document --bpf.
* man/stap.1.in: Document --bpf.

6 years agoTranslate server distro name to lower case.
Stan Cox [Wed, 29 Nov 2017 21:59:00 +0000 (16:59 -0500)]
Translate server distro name to lower case.

* httpd/backends.cxx local_backend::local_backend():  Translate distro
  name to lower case to match client.

6 years agoSend client http info as a single json form.
Stan Cox [Wed, 29 Nov 2017 16:30:47 +0000 (11:30 -0500)]
Send client http info as a single json form.

* client-http.cxx (http_client::get_data):  Create and send as a single
  json form.

* httpd/server.cxx (get_key_values):  Load key values from json form.

6 years agorhbz1490862: more kernel f2fs tracepoint header file workarounds
David Smith [Tue, 28 Nov 2017 20:35:06 +0000 (15:35 -0500)]
rhbz1490862: more kernel f2fs tracepoint header file workarounds

6 years agoUpdate the Czech version of manpages.
Martin Cermak [Tue, 28 Nov 2017 15:26:04 +0000 (16:26 +0100)]
Update the Czech version of manpages.

6 years agostap -k mode: only generate the .i file for the main lkm, not auxiliary built files
Frank Ch. Eigler [Tue, 28 Nov 2017 01:54:15 +0000 (20:54 -0500)]
stap -k mode: only generate the .i file for the main lkm, not auxiliary built files

* buildrun.cxx (make_make_cmd): Move the .i generation code from here ...
  (compile_pass): ... to here.

Reported-By: Torsten Polle <Torsten.Polle@gmx.de>
6 years agoAdd tracing of sent and received packets.
Stan Cox [Mon, 27 Nov 2017 22:00:13 +0000 (17:00 -0500)]
Add tracing of sent and received packets.

* client-http.cxx (http_client::trace):  New.
  (http_client::download):  Enable.

6 years agoFix stapbpf compile error on older kernels.
Aaron Merey [Wed, 22 Nov 2017 20:38:40 +0000 (15:38 -0500)]
Fix stapbpf compile error on older kernels.

* configure.ac: Check for the necessary declarations in linux/bpf.h instead of
  simply checking that linux/bpf.h exists. This avoids a compile error if
  linux/bpf.h exists but does not contain these declarations (as is the case
  with some older kernels). Replaced HAVE_LINUX_BPF_H with HAVE_BPF_DECLS.

* Makefile.am, stapbpf/Makefile.am, main.cxx: Replaced HAVE_LINUX_BPF_H with
  HAVE_BPF_DECLS.

* rest: changes caused by autoconf, automake and autoheader.

6 years agoActually run the stap command in the docker container.
David Smith [Mon, 20 Nov 2017 21:36:03 +0000 (15:36 -0600)]
Actually run the stap command in the docker container.

* httpd/backends.cxx (docker_backend::generate_module): Actually run the
  stap command in the docker container.
* httpd/docker/fedora_install_package.py: Renamed from
  fedora_install_packages.py. When installing a kernel, automatically
  install the kernel-devel package. Install each package's debuginfo.
* httpd/docker/Makefile.am: Handle fedora_install_package.py rename.
* httpd/docker/fedora.json: Ditto.
* httpd/docker/Makefile.in: Regenerated.

6 years agoFix PR22462 by updating the way we generate the Makefile.
David Smith [Mon, 20 Nov 2017 15:51:40 +0000 (09:51 -0600)]
Fix PR22462 by updating the way we generate the Makefile.

* buildrun.cxx (compile_pass): If the runtime path doesn't have any odd
  characters in it, don't bother quoting it in the generated Makefile.

6 years agostap -L: produce yum/dnf disagnostics if kernel-devel missing
Frank Ch. Eigler [Thu, 16 Nov 2017 22:18:57 +0000 (17:18 -0500)]
stap -L: produce yum/dnf disagnostics if kernel-devel missing

stap listing modes previously suppressed the rpm-finder's suggestions,
if not even kernel-devel was installed, leading to an opaque error
message about .../build/.config not being found.  Reenable warnings in
this case, for if kernel-devel was sought and missing, stap as a whole
will shut down soon anyway.

6 years agoActually commit web server changes.
David Smith [Thu, 16 Nov 2017 20:20:28 +0000 (14:20 -0600)]
Actually commit web server changes.

6 years agoUpdate the docker container builder for the web server.
David Smith [Thu, 16 Nov 2017 20:18:39 +0000 (14:18 -0600)]
Update the docker container builder for the web server.

* httpd/docker/fedora_install_packages.py: New file.
* httpd/docker/fedora.json: Change from stages to a scheme where we've got
  a docker 'header' and 'footer' items. Each package to be installed runs
  the 'install' item.
* httpd/docker/stap_build_docker_container.py: Handle changes to the
  distro JSON file.
* httpd/backends.cxx (docker_backend::docker_backend): Fix the docker
  build script path.
  (docker_backend::generate_module): Update the docker build script
  arguments.
* httpd/api.cxx (build_info::module_build): Pass the UUID down to the
  backends.
* httpd/backends.h (backend_base): Add a 'uuid' parameter to the
  generate_module() function declaration.
* httpd/docker/Makefile.am: Installs the fedora install package script.
* httpd/docker/Makefile.in: Regenerated.

6 years agoImplement http_client_backend::add_localization_variable
Stan Cox [Thu, 16 Nov 2017 20:01:02 +0000 (15:01 -0500)]
Implement http_client_backend::add_localization_variable

* client-http.cxx (http_client_backend::add_localization_variable):
  Add environment variable to vector.
  (http_client::post):  Post to server.

6 years agoAdd a small fix to python/Makefile.am.
David Smith [Thu, 16 Nov 2017 19:23:17 +0000 (13:23 -0600)]
Add a small fix to python/Makefile.am.

* python/Makefile.am: Add DESTDIR to pkglibexecpythondir.
* python/Makefile.in: Regenerated.

6 years agoAdded the initial httpd/docker directory.
David Smith [Tue, 14 Nov 2017 21:39:32 +0000 (15:39 -0600)]
Added the initial httpd/docker directory.

* httpd/docker/stap_build_docker_container.py: Python script that uses
  distro JSON data files to generate docker files.
* httpd/docker/fedora.json: Fedora docker file description.
* httpd/docker/Makefile.am: New file.
* httpd/docker/Makefile.in: Generated.
* httpd/Makefile.am: Added 'docker' subdirectory.
* py-compile: New file (copied from automake).
* configure.ac: Include the httpd/docker directory.
* Makefile.in: Regenerated.
* aclocal.m4: Ditto.
* configure: Ditto.
* doc/Makefile.in: Ditto.
* doc/SystemTap_Tapset_Reference/Makefile.in: Ditto.
* doc/beginners/Makefile.in: Ditto.
* httpd/Makefile.in: Ditto.
* java/Makefile.in: Ditto.
* man/Makefile.in: Ditto.
* man/cs/Makefile.in: Ditto.
* python/Makefile.in: Ditto.
* stapbpf/Makefile.in: Ditto.
* stapdyn/Makefile.in: Ditto.
* staprun/Makefile.in: Ditto.
* testsuite/Makefile.in: Ditto.
* testsuite/aclocal.m4: Ditto.

6 years agoThe web server now writes the client request data to a JSON file.
David Smith [Mon, 13 Nov 2017 22:34:36 +0000 (16:34 -0600)]
The web server now writes the client request data to a JSON file.

* httpd/api.h ("client_request_data"): Made 'struct client_request_data'
  into a class. Added a get_json_object() function declaration.
* httpd/api.cxx: Change the type on all 'client_request_data' variables.
  (response build_collection_rh::POST): Lowercase the distro name to make
  things easier when searching for a distro.
  (client_request_data::get_json_object): New function.
* httpd/backends.h: Change the type on all 'client_request_data'
  variables.
* httpd/backends.cxx: Change the type on all 'client_request_data'
  variables.
  (docker_backend::docker_backend): Lowercase the distro name to make
  things easier when searching for a distro.
  (docker_backend::generate_module): Grab a JSON representation of the
  client_request_data and write it to a file.

6 years agoFix a couple of subtle bugs in the web server POST parameter handling.
David Smith [Fri, 10 Nov 2017 19:46:53 +0000 (13:46 -0600)]
Fix a couple of subtle bugs in the web server POST parameter handling.

* httpd/server.cxx (get_key_values): Expect a 'post_params_t' instead of
  a 'struct request' pointer.
  (connection_info::postdataiterator): Be sure to only use 'size' bytes of
  'data', otherwise you can get junk values.
  (server::access_handler): Pass get_key_values a 'post_params_t' instead
  of a 'struct request' pointer.
* httpd/server.h: Define and use the 'post_params_t' type.

6 years agostapbpf: add perf probe support.
Aaron Merey [Fri, 10 Nov 2017 00:02:27 +0000 (19:02 -0500)]
stapbpf: add perf probe support.

* bpf-translate.cxx: translate perf_derived_probes.

* stapbpf.cxx: parse perf data from ELF file, load associated bpf progs
  and perf events.

* tapset-perfmon.cxx (sort_for_bpf): prepare perf probes and symbol names
  for translation.

* tapsets.h: add declarations for above.

* bpf_tests/: add two perf tests, fix typo in no_end.stp, rename timers.stp
  to timer1.stp, add new timer test.

6 years agoSave the package information on the web server side.
David Smith [Wed, 8 Nov 2017 22:12:09 +0000 (16:12 -0600)]
Save the package information on the web server side.

* httpd/api.cxx (build_collection_rh::POST): Package up the file
  information (name, package name, build id) from the client.
  (build_info::parse_cmd_args): Fix the argument handling. We need to
  add an argument 0 to make getopt_long() happy. Grab the right perpass
  verbosity level as our level.
* httpd/api.h: Add the 'file_info' structure.

6 years agoRework the web client package information to be valid JSON.
David Smith [Wed, 8 Nov 2017 16:41:52 +0000 (10:41 -0600)]
Rework the web client package information to be valid JSON.

* client-http.cxx (http_client::post): Rework the package information to
  be valid JSON. Turn the package information inside out so that instead
  of one array of multiple fields, we'll have multiplie single-dimension
  arrays.

6 years agoMove the web server unzip logic to its proper place.
David Smith [Mon, 6 Nov 2017 15:50:50 +0000 (09:50 -0600)]
Move the web server unzip logic to its proper place.

* httpd/api.cxx (build_collection_rh::POST): Move the unzip logic to
  build_info::module_build().
  (build_info::module_build): Do the unzip here, so that we don't slow
  down the thread handling http requests.

6 years agoThe web server now tries to build a docker container.
David Smith [Fri, 3 Nov 2017 20:06:13 +0000 (15:06 -0500)]
The web server now tries to build a docker container.

* httpd/backends.cxx (local_backend::generate_module): No longer fail if
  the stdout/stderr files already exist.
  (docker_backend::docker_backend): Clear out the docker path if we
  couldn't find the docker executable. Fix choping off the json file
  extension.
  (docker_backend::generate_module): Run the script that builds the
  docker container.
* httpd/api.cxx (parse_cmd_args): New function.
  (module_build): Call parse_cmd_args(). Always create the stdout/stderr
  files, so the client will always have something to grab.
* httpd/api.h (client_request_data): Add 'verbose' field.
* httpd/Makefile.am: Add ../cmdline.cxx to the list of files to be compiled.
* httpd/Makefile.in: Regenerated.

6 years agostapbpf: Call perf_event_open with group_fd.
Aaron Merey [Fri, 3 Nov 2017 18:55:50 +0000 (14:55 -0400)]
stapbpf: Call perf_event_open with group_fd.

* stapbpf.cxx (register_timers): Using group_fd ensures that all
  probes are armed at the same time.

6 years agostapbpf: Add timer probe support.
Aaron Merey [Fri, 3 Nov 2017 18:35:06 +0000 (14:35 -0400)]
stapbpf: Add timer probe support.

* bpf-translate.cxx: translate hrtimer_derived_probes and timer_derived_probes.

* stapbpf.cxx: parse timer data from ELF file, load timer bpf programs and
  open timer perf events.

* tapset-timers.cxx (sort_for_bpf): Organize timer probes and prepare timer
  symbol names for ELF file.

* tapsets.h: Add declarations for above.

* bpf_tests/timers.stp: New test for timer probes.

6 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Wed, 1 Nov 2017 19:57:30 +0000 (14:57 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

6 years agoAdd comments to httpd/backends.cxx.
David Smith [Wed, 1 Nov 2017 19:57:10 +0000 (14:57 -0500)]
Add comments to httpd/backends.cxx.

6 years agobpf translator: remove unused variable.
Aaron Merey [Tue, 31 Oct 2017 22:41:04 +0000 (18:41 -0400)]
bpf translator: remove unused variable.

6 years agobpf translator: add prologue that checks exit status.
Aaron Merey [Tue, 31 Oct 2017 18:27:33 +0000 (14:27 -0400)]
bpf translator: add prologue that checks exit status.

* bpf-translate.cxx (bpf_unparser::add_prologue): adds instructions that
  checks exit status and immediately returns from probe handler if true.

* exit3.stp: test whether prologue works correctly.

* bpf_tests/: remove manual exit status checks from various tests.

6 years agoNew example: capture_ssl_master_secrets.stp.
Timo Juhani Lindfors [Tue, 31 Oct 2017 18:17:25 +0000 (13:17 -0500)]
New example: capture_ssl_master_secrets.stp.

Tested to work with Debian 9 openssl and gnutls.

6 years agoMatch non-executable shared libraries in glob patterns (author credit fix)
Timo Juhani Lindfors [Mon, 30 Oct 2017 20:56:10 +0000 (16:56 -0400)]
Match non-executable shared libraries in glob patterns (author credit fix)

6 years agoMatch non-executable shared libraries in glob patterns.
David Smith [Mon, 30 Oct 2017 20:39:11 +0000 (15:39 -0500)]
Match non-executable shared libraries in glob patterns.

Shared libraries in Debian do not have executable permissions. This
patch makes glob patterns work for those. Debian policy 8.1:

"Shared libraries should not be installed executable, since the dynamic
linker does not require this and trying to execute a shared library
usually results in a core dump."

6 years agoAdd a small improvement to testsuite/semok/twenty.stp
David Smith [Mon, 30 Oct 2017 20:25:21 +0000 (15:25 -0500)]
Add a small improvement to testsuite/semok/twenty.stp

* testsuite/semok/twenty.stp: Instead of piping stap's output to "wc",
  instead send it to /dev/null. This uses less memory on the system and
  avoids masking the return value of stap (by getting the return value of
  "wc").

6 years agoAdd a small fix to the copy_file() utility function.
David Smith [Mon, 30 Oct 2017 18:28:32 +0000 (13:28 -0500)]
Add a small fix to the copy_file() utility function.

* util.cxx (copy_file): Removed an unnecessary unlink() call.

6 years agoImprove the way the web client/server sends files.
David Smith [Mon, 30 Oct 2017 18:05:18 +0000 (13:05 -0500)]
Improve the way the web client/server sends files.

* client-http.cxx (http_client): Rename the 'script_files' variable to
  'files'.
  (http_client::post): No longer assume the first file is a script.
  (add_file): Renamed from 'add_script_file'. Just add the file.
  (http_client_backend::include_file_or_directory): Rewrite to be like the
  nss client.
  (http_client_backend::package_request): If we've seen some files the
  need to be transferred, package them up into a zip file.
  (add_tapsets): Deleted function.
  (http_client_backend::add_tmpdir_file): Just remember we added a file.
* client-http.h (client_backend): Remove the 'request_files' variable and
  add the 'files_seen' variable.
* httpd/api.cxx (POST): Unzip the client zip file if present.

6 years agoImprove the way a script is read from standard input.
David Smith [Mon, 30 Oct 2017 17:57:07 +0000 (12:57 -0500)]
Improve the way a script is read from standard input.

* main.cxx (passes_0_4): Instead of passing 'cin' to parse(), pass it the
  session 'stdin_script' variable.
* csclient.cxx (create_request): Instead of copying the script from
  standard input, copy it from the session 'stdin_script' variable.
* session.h (s): Add the 'stdin_script' variable.
* session.cxx (systemtap_session): Copy the 'stdin_script' variable in the
  copy constructor.
* testsuite/systemtap.server/server.exp: Add 2 tests for getting a script
  from standard input.

6 years agoGet the "drm" and "snd_pcm" tracepoint groups working on rawhide.
David Smith [Thu, 26 Oct 2017 15:35:03 +0000 (10:35 -0500)]
Get the "drm" and "snd_pcm" tracepoint groups working on rawhide.

* tapsets.cxx (tracepoint_extra_decls): Add extra decls for the "fsi" and
  "snd_pcm" tracepoint groups. Add a few other decls for existing groups.

6 years agoFix BZ1506230 by fixing netdev.receive probe to work on kernels after v3.14.
Lukas Herbolt [Wed, 25 Oct 2017 20:47:18 +0000 (15:47 -0500)]
Fix BZ1506230 by fixing netdev.receive probe to work on kernels after v3.14.

6 years agoAdd a minor update to systemtap.stress/tapset_functions.exp.
David Smith [Wed, 25 Oct 2017 13:26:19 +0000 (08:26 -0500)]
Add a minor update to systemtap.stress/tapset_functions.exp.

* testsuite/systemtap.stress/tapset_functions.exp: Change the name of the
  "testscript" test to "tapset_functions testscript" test so its name
  sticks out a bit more on failure.

6 years agoMade a coupe of buildok tests executable.
David Smith [Wed, 25 Oct 2017 13:21:12 +0000 (08:21 -0500)]
Made a coupe of buildok tests executable.

6 years agoFix PR22327 by updating the loadavg tapset.
David Smith [Wed, 25 Oct 2017 13:17:33 +0000 (08:17 -0500)]
Fix PR22327 by updating the loadavg tapset.

* tapset/linux/loadavg.stp: Ditto.
* testsuite/buildok/loadavg-embedded.stp: New test.

6 years agoSimplify some "autoconf" tests related to the kernel's sched header file.
David Smith [Wed, 25 Oct 2017 13:15:27 +0000 (08:15 -0500)]
Simplify some "autoconf" tests related to the kernel's sched header file.

* buildrun.cxx (compile_pass): Replace the STAPCONF_SCHED_MM_H,
  STAPCONF_SCHED_TASK_STACK_H, and STAPCONF_UAPI_LINUX_SCHED_TYPES
  "autoconf" tests with the STAPCONF_LINUX_SCHED_HEADERS "autoconf" test.
* runtime/compatdefs.h: Use the STAPCONF_LINUX_SCHED_HEADERS define before
  including <linux/sched/*.h>.
* runtime/linux/access_process_vm.h: Ditto.
* tapset/linux/aux_syscalls.stp: Ditto.
* tapset/linux/timestamp_monotonic.stp: Ditto.
* runtime/linux/autoconf-linux-sched_headers.c: New autoconf-style test.
* runtime/linux/autoconf-sched-mm.c: Deleted.
* runtime/linux/autoconf-sched-task_stack.c: Ditto.
* runtime/linux/autoconf-uapi-linux-sched-types.c: Ditto.

6 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Fri, 20 Oct 2017 19:55:08 +0000 (14:55 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

6 years agoThe web server now gives a better error message on an unsupported request.
David Smith [Fri, 20 Oct 2017 19:52:06 +0000 (14:52 -0500)]
The web server now gives a better error message on an unsupported request.

* httpd/backends.cxx: Provide a new "default" backend, which just returns
  a reasonable error message (that this server cannot support the request).
* httpd/api.cxx (module_build): Improved error message.

6 years agocoverity tweak - close fds in dying threads
Frank Ch. Eigler [Fri, 20 Oct 2017 15:04:56 +0000 (11:04 -0400)]
coverity tweak - close fds in dying threads

6 years agorhbz1504009: let dtrace -G -o /dev/null run, as in autoconf
Frank Ch. Eigler [Fri, 20 Oct 2017 14:01:58 +0000 (10:01 -0400)]
rhbz1504009: let dtrace -G -o /dev/null run, as in autoconf

commit c245153ca193c471a8c broke the ability of dtrace to be tested in
autoconf "-G -o /dev/null" usage, because its output file name was too
simple a function of the input name, and normal users can't write to
/dev/null.dtrace-temp.c .  Now we back down to mkstemp, like before,
upon a failure of the simple concatenated name.

6 years agocoverity fixes
Frank Ch. Eigler [Fri, 20 Oct 2017 02:22:57 +0000 (22:22 -0400)]
coverity fixes

One pthread_create() RC check, one extra-initialized variable.

6 years agobpf translator: avoid attaching tags to format string more than once.
Aaron Merey [Thu, 19 Oct 2017 20:31:55 +0000 (16:31 -0400)]
bpf translator: avoid attaching tags to format string more than once.

* bpf-translate.cxx (print_format_add_tag): return immediately if
  tag is true.

* staptree.h (print_format): add boolean member 'tag'.

6 years agoImprove web service startup a bit.
David Smith [Thu, 19 Oct 2017 18:24:06 +0000 (13:24 -0500)]
Improve web service startup a bit.

* client-http.cxx (http_client::download): If verbose is >= 4, set the
  VERBOSE curl option so that all packets are dumped.
  (http_client_backend::find_and_connect_to_server): Instead of trying to
  GET the /builds directory (which isn't implemented), grab the base
  server directory.
* httpd/server.cxx (server::server): Add a base directory request
  handler.
* httpd/server.h: Move 'class server' constructor into server.cxx.

6 years agoAdd string trim utility functions.
David Smith [Thu, 19 Oct 2017 18:19:04 +0000 (13:19 -0500)]
Add string trim utility functions.

* util.cxx (ltrim): New function.
  (rtrim): Ditto.
  (trim): Ditto.
  (get_distro_info): Trim 'name' and 'version' items.
* util.h: Add trim function declarations.
* tapset-mark.cxx (mark_builder::build): Use new trim functions.
* tapsets.cxx (dwarf_builder::build): Ditto.

6 years agostap -V -- bump last-known-kernel version number to 4.14-rc4, overlooked from PRERELE...
Frank Ch. Eigler [Wed, 18 Oct 2017 23:46:51 +0000 (19:46 -0400)]
stap -V -- bump last-known-kernel version number to 4.14-rc4, overlooked from PRERELEASE handling

6 years agobump version numbers for future release 3.3
Frank Ch. Eigler [Wed, 18 Oct 2017 21:56:52 +0000 (17:56 -0400)]
bump version numbers for future release 3.3

6 years agoregen docs as per 'scripts/update-docs' release-3.2
Frank Ch. Eigler [Wed, 18 Oct 2017 17:59:37 +0000 (13:59 -0400)]
regen docs as per 'scripts/update-docs'

6 years agoupdate remaining PRERELEASE timestamps
Frank Ch. Eigler [Wed, 18 Oct 2017 17:22:22 +0000 (13:22 -0400)]
update remaining PRERELEASE timestamps

6 years agospec file typo fixes
Frank Ch. Eigler [Wed, 18 Oct 2017 16:39:12 +0000 (12:39 -0400)]
spec file typo fixes

bpf is too new for rhel7

6 years agosystemtap.spec: fix typo
Aaron Merey [Wed, 18 Oct 2017 17:10:33 +0000 (13:10 -0400)]
systemtap.spec: fix typo

6 years agosystemtap.spec: add bpf macro
Aaron Merey [Wed, 18 Oct 2017 16:29:08 +0000 (12:29 -0400)]
systemtap.spec: add bpf macro

6 years agoAdd a minor fix to testsuite/systemtap.pass1-4/semok.exp.
David Smith [Wed, 18 Oct 2017 13:50:40 +0000 (08:50 -0500)]
Add a minor fix to testsuite/systemtap.pass1-4/semok.exp.

* testsuite/systemtap.pass1-4/semok.exp (dyninst_kfails): Add twenty.stp
  as a dyninst KFAIL since it is a kernel-only test.

6 years agoimprove error message for bad assignment lvalue
Frank Ch. Eigler [Wed, 18 Oct 2017 11:24:56 +0000 (07:24 -0400)]
improve error message for bad assignment lvalue

Handle cases such as

   if (a || b = c) { }

better.

6 years agoPrerelease updates.
Aaron Merey [Tue, 17 Oct 2017 21:16:23 +0000 (17:16 -0400)]
Prerelease updates.

* AUTHORS: add new authors.

* po/: updated with scripts/update-docs.

* staprun.c: updated copyright years.

6 years agoelaborate.cxx: skip add_global_var_display if using bpf runtime.
Aaron Merey [Tue, 17 Oct 2017 17:07:03 +0000 (13:07 -0400)]
elaborate.cxx: skip add_global_var_display if using bpf runtime.

add_global_var_display might synthesize a probe containing foreach
statements which stapbpf does not currently support.

6 years agostapbpf: flush output buffer after every printf.
Aaron Merey [Tue, 17 Oct 2017 16:47:23 +0000 (12:47 -0400)]
stapbpf: flush output buffer after every printf.

* bpfinterp.cxx: fflush may be needed in case the output is buffered
  for too long.

* stapbpf.cxx, bpfinterp.h: replace printf with fprintf incase -o option
  was used.

6 years agobpf translator: access front of vector only if it's nonempty.
Aaron Merey [Tue, 17 Oct 2017 00:37:23 +0000 (20:37 -0400)]
bpf translator: access front of vector only if it's nonempty.

* bpf-translate.cxx: this check is necessary for scripts that
  contain global variable initializations but no begin probes.

6 years agostapbpf: remove hardware perf events dependency.
Aaron Merey [Tue, 17 Oct 2017 00:08:17 +0000 (20:08 -0400)]
stapbpf: remove hardware perf events dependency.

* stapbpf.cxx (create_group_fds): change perf event group leader
  from hardware type to software type.

* bpf_tests/context_vars1.stp: remove unused variable.

* bpf_tests/printf.stp: ensure kernel probe only triggers once.

6 years agoAdd the server.exp change that was supposed to go in commit 504364331.
David Smith [Mon, 16 Oct 2017 21:03:16 +0000 (16:03 -0500)]
Add the server.exp change that was supposed to go in commit 504364331.

6 years agoAdd a minor server fix.
David Smith [Mon, 16 Oct 2017 20:42:39 +0000 (15:42 -0500)]
Add a minor server fix.

* stap-serverd.cxx (filter_response_file): Only filter the server's home
  directory if it isn't "/".

6 years agoFix PR22278 by fixing server breakage caused by commit 586c8666a.
David Smith [Mon, 16 Oct 2017 20:30:52 +0000 (15:30 -0500)]
Fix PR22278 by fixing server breakage caused by commit 586c8666a.

* csclient.cxx (create_request): Let the backend add the argument in
  include_file_or_directory().
* testsuite/systemtap.server/server.exp: Add 3 simple tests: a filename, a
  "-L", and a "-I tapset -e SCRIPT".
* testsuite/lib/systemtap.exp (stap_run_batch): If the "filename" argument
  is empty, assume this stap command line doesn't need a file.

6 years agoFix the bpf.exp test case for systems without bpf support.
David Smith [Mon, 16 Oct 2017 15:07:46 +0000 (10:07 -0500)]
Fix the bpf.exp test case for systems without bpf support.

* testsuite/systemtap.bpf/bpf.exp: Use bpf_p() to know when to run the test.
* testsuite/lib/systemtap.exp (bpf_p): New function.

6 years agobpf translation error handling: try tracking derived_probe token
Frank Ch. Eigler [Sat, 14 Oct 2017 21:11:16 +0000 (17:11 -0400)]
bpf translation error handling: try tracking derived_probe token

BPF translation internals involve data structures that do not track
the staptree level entities they are based on.  So when an error
occurs, there's no quick way to mapping it back to the token, for an
ideal error message.  translate_bpf_pass() now tries to track a
last-token* as it goes translating all the probe bodies to bpf, so
that a semantic_error can be synthesized if needed.

This is still far from ideal; a single exception causes giving up
trying all the remaining probes; and all begin/end probes are
translated into single larger bpf programs, so it's harder to narrow
down the cause.  Baby steps.

6 years agobpf translator: catch runtime_errors
Frank Ch. Eigler [Fri, 13 Oct 2017 23:00:37 +0000 (19:00 -0400)]
bpf translator: catch runtime_errors

Some simple test cases can run up against bpf-translate limitations.
Those that are signalled with a runtime_error exception need to be
caught at least in translate_bpf_pass() and a message improvised, so
that there is something more to go on than an anonymous pass-4
failure.

6 years agostap-report: add BPF related kconfig fields
Frank Ch. Eigler [Fri, 13 Oct 2017 14:25:07 +0000 (10:25 -0400)]
stap-report: add BPF related kconfig fields

6 years agoMake small improvements to the systemtap server testsuite.
David Smith [Fri, 13 Oct 2017 20:52:44 +0000 (15:52 -0500)]
Make small improvements to the systemtap server testsuite.

* testsuite/systemtap.server/server.exp: When restarting the avahi daemon,
  try to fix a restart failure.
* testsuite/systemtap.server/client.exp (list_servers): Add debug output.
* testsuite/lib/systemtap.exp (shutdown_server): Try to ensure that the
  systemtap server is really gone before returning.

6 years agoAllow '+' characters in kernel names.
David Smith [Fri, 13 Oct 2017 20:47:15 +0000 (15:47 -0500)]
Allow '+' characters in kernel names.

* session.cxx (parse_cmdline): Allow '+' in kernel names, to handle
  kernels like '4.14.0-0.rc3.git0.1.fc28.x86_64+debug'.

6 years agoAdd syscalls.stpm to tapset/bpf to avoid compilation warnings.
David Smith [Fri, 13 Oct 2017 14:42:48 +0000 (09:42 -0500)]
Add syscalls.stpm to tapset/bpf to avoid compilation warnings.

* tapset/bpf/syscalls.stpm: Add macro file for bpf to make compiling the
  python2 tapset stop complaining about @__pointer() not being defined.

6 years agoFixed PR22287 by updating the ioblock tapset.
David Smith [Thu, 12 Oct 2017 21:47:16 +0000 (16:47 -0500)]
Fixed PR22287 by updating the ioblock tapset.

* tapset/linux/ioblock.stp (disk_get_part_start_sect): New function.
  (bio_rw_str): Handles 'struct bio' changes from kernel commit 74d46992e.
  (__bio_devname): Ditto.
  (ioblock.request): Ditto.
  (ioblock_trace.bounce): Ditto.
  (ioblock_trace.request): Ditto.
  (ioblock_trace.end): Ditto.
* tapset/linux/dev.stp (bdevname): Extract code into into disk_name() and
  just call it.
* buildrun.cxx (compile_pass): Add exportconf test for disk_get_part().
* testsuite/buildok/dev-embedded.stp: Updated.

6 years agoman stapprobes: tweak uprobe-perf probe templates to match metavariables
Frank Ch. Eigler [Thu, 12 Oct 2017 19:36:03 +0000 (15:36 -0400)]
man stapprobes: tweak uprobe-perf probe templates to match metavariables

6 years agoAdd stapbpf.8 to stapbpf directory.
Aaron Merey [Thu, 12 Oct 2017 17:50:04 +0000 (13:50 -0400)]
Add stapbpf.8 to stapbpf directory.

6 years agoAdd stapbpf man page, update NEWS and stap man page with stapbpf info.
Aaron Merey [Thu, 12 Oct 2017 17:42:09 +0000 (13:42 -0400)]
Add stapbpf man page, update NEWS and stap man page with stapbpf info.

6 years agostapbpf: add while loop test
Aaron Merey [Thu, 12 Oct 2017 17:38:22 +0000 (13:38 -0400)]
stapbpf: add while loop test

* while.stp: basic test for while loops.

* array.stp: changed location of exit call.

6 years agoUpdated the sysc_msgctl and sysc_shmctl tapsets for rawhide.
David Smith [Thu, 12 Oct 2017 15:19:57 +0000 (10:19 -0500)]
Updated the sysc_msgctl and sysc_shmctl tapsets for rawhide.

* tapset/linux/sysc_msgctl.stp: Updated to handle parameter name change.
* tapset/linux/sysc_shmctl.stp: Ditto.

6 years agoAdd some testsuite test kernel module fixes for rawhide.
David Smith [Thu, 12 Oct 2017 14:46:59 +0000 (09:46 -0500)]
Add some testsuite test kernel module fixes for rawhide.

* testsuite/systemtap.base/stap_hwbkpt_kmod.c: Add fixes for
  rawhide. Include <linux/sched.h> and <linux/uaccess.h>, not
  <asm/uaccess.h>.
* testsuite/systemtap.base/stap_kmodule.c: Ditto.
* testsuite/systemtap.context/systemtap_test_module1.c: Ditto.
* testsuite/systemtap.printf/memory1_module.c: Ditto.

6 years agoGet the "xdp" and "bridge" tracepoint groups working on rawhide.
David Smith [Wed, 11 Oct 2017 21:33:06 +0000 (16:33 -0500)]
Get the "xdp" and "bridge" tracepoint groups working on rawhide.

* tapsets.cxx (tracepoint_extra_decls): Added extra decls for the "xdp"
  and "bridge" tracepoint groups.

6 years agostapbpf: fix call to bpf helper during array store.
Aaron Merey [Wed, 11 Oct 2017 18:21:50 +0000 (14:21 -0400)]
stapbpf: fix call to bpf helper during array store.

* bpf-translate.cxx (emit_store): move "flags" argument to register 4 before
  calling bpf_map_update_elem.

* bpf_tests/array.stp: new test for array stores and loads.

6 years agoUpdate the server_locale.exp test case to avoid spurious failures.
David Smith [Wed, 11 Oct 2017 15:53:19 +0000 (10:53 -0500)]
Update the server_locale.exp test case to avoid spurious failures.

* testsuite/systemtap.server/server_locale.exp: Handle the case where the
  French langpack isn't installed on the system. Do a French sniff test
  before trying to use the French locale.

6 years agoFixed server breakage caused by commit 586c8666a.
David Smith [Tue, 10 Oct 2017 15:33:47 +0000 (10:33 -0500)]
Fixed server breakage caused by commit 586c8666a.

* client-nss.h (client_backend): Removed 'server_tmpdir' declaration that
  shadowed the declaration in the base class. This caused the code in
  csclient.cxx to get the wrong value for 'server_tmpdir'.

6 years agoDo better cleanup when the web server gets an error.
David Smith [Mon, 9 Oct 2017 15:51:42 +0000 (10:51 -0500)]
Do better cleanup when the web server gets an error.

* httpd/backends.cxx (generate_module): Be sure to cleanup the
  posix_span_file_actions, even if we get an error.

6 years agostapbpf: fix global variable initialization bug.
Aaron Merey [Fri, 6 Oct 2017 23:34:24 +0000 (19:34 -0400)]
stapbpf: fix global variable initialization bug.

* bpf-translate.cxx: The translator now adds assignment statements to
  the beginning of the "stap_begin" bpf program in order to initialize
  global variables with any user-supplied default values. Currently there
  is no support for string literals, the translator will still ignore them.
  (struct init_block): manages the resources associated with these
  assignments.

* tapsets.cxx(sort_for_bpf), tapset-been.cxx (sort_for_bpf): immediately
  returns if the probe group pointer is NULL.

* bpf_tests: added new tests and fixed a syntax error in globals1.stp and
  globals2.stp.

6 years agoAdd a PR20516 workaround by using kallsyms_lookup_name to find udelay_simple.
David Smith [Fri, 6 Oct 2017 15:32:53 +0000 (10:32 -0500)]
Add a PR20516 workaround by using kallsyms_lookup_name to find udelay_simple.

* runtime/linux/common_session_state.h (stp_session_init): Use
  kallsyms_lookup_name() to find udelay_simple() if it exists but isn't
  exported.
* runtime/linux/runtime.h: Ditto.
* buildrun.cxx (compile_pass): Add an new autoconf test for
  udelay_simple().
* runtime/linux/autoconf-udelay_simple.c: New file.

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