2
Fork 0
mirror of https://sourceware.org/git/systemtap.git synced 2025-11-15 16:13:45 +00:00
No description
Find a file
Frank Ch. Eigler 53c48b5502
PR33428: imply kernel<vmlinux.h>, check by file name, cont'd
Linux 5.7+ includes a vmlinux.h file ... but previous code looked for
version 6.7+ by mistake.  Might as well just look for the vmlinux.h
file directly in the build tree, and leave a little diagnostic note.
2025-11-12 18:51:26 -05:00
doc PRERELEASE: update-docs 2025-10-29 21:52:17 -04:00
emacs Update emacs/systemtap-mode.el for emacs 27 2020-09-16 15:19:43 -04:00
httpd post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
includes PR33347: autoconf the "R" .section flag in sdt.h 2025-09-01 16:29:19 -04:00
initscript rhbz2041596: replace /var/run -> /run throughout 2022-01-17 15:19:32 -05:00
interactive-notebook post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
java post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
language-server PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
m4 autoconfigury: rebuild on Fedora 36 2022-10-11 10:50:44 -04:00
man PR33428: imply kernel<vmlinux.h> in kernel-side @cast() for type info 2025-09-15 13:07:36 -04:00
po PRERELEASE update-po 2025-10-29 16:51:26 -04:00
python post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
runtime Support new lsm_get_self_attr and lsm_set_self_attr syscalls 2025-11-06 23:00:05 +01:00
scripts Update scripts/dump-syscalls.sh 2025-10-31 18:53:37 +01:00
stap-exporter post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
stapbpf post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
stapdyn post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
staprun post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
tapset Support new lsm_get_self_attr and lsm_set_self_attr syscalls 2025-11-06 23:00:05 +01:00
testsuite Support new lsm_get_self_attr and lsm_set_self_attr syscalls 2025-11-06 23:00:05 +01:00
vim PR25186: tweak vim augroup name for non-conflict with some vim versions 2019-11-24 17:36:48 -05:00
.gitignore Added emacs, vscode and eclipse usage recipes 2023-02-03 11:08:56 -05:00
.mailmap AUTHORS micro canonicalization 2024-11-07 09:27:01 -05:00
ABOUT-NLS
aclocal.m4 post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
analysis.cxx PR31242: Support namespaced include directories in Dyninst 2024-01-18 14:33:44 -05:00
analysis.h Avoid triggering error with -Werror=unused-value 2022-03-01 16:03:54 -05:00
ar-lib configury: complete auto* regeneration for AM_PROG_AR use 2020-09-18 14:05:48 -04:00
AUTHORS PRERELEASE: authors 2025-10-30 10:47:35 -04:00
AUTHORS.sh
bpf-base.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
bpf-bitset.cxx Revert "Revert all bpf patches" 2017-05-08 07:24:40 -07:00
bpf-bitset.h set2: Return this from assignment operator 2021-05-19 16:29:30 -04:00
bpf-internal.h fixup for squash: bump copyyears in bpf-{base,translate} 2022-10-26 16:29:53 -04:00
bpf-opt.cxx stapbpf (for PR27030) tentative regalloc fix: zero unused regs 2020-12-15 15:43:16 -05:00
bpf-shared-globals.h pr23478 WIP: rework bpf foreach to handle multi-key array 2021-08-24 12:52:39 -04:00
bpf-translate.cxx bpf-translate.cxx: fix build against upcoming gcc-14 (-Werror=calloc-transposed-args) 2023-12-25 06:05:01 -05:00
bpf.h Revert "Revert all bpf patches" 2017-05-08 07:24:40 -07:00
buildrun.cxx PR33574: runtime/linux/stap_fs.h incompatible with kernel-6.18 2025-10-24 12:13:10 +02:00
buildrun.h
cache.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
cache.h
client-http.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
client-http.h mechanical prerelease copyright notice year# changes 2018-10-12 16:52:23 -04:00
client-nss.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
client-nss.h mechanical prerelease copyright notice year# changes 2018-10-12 16:52:23 -04:00
cmdline.cxx PR30321 Privilege separation if invoked as root 2024-04-26 17:22:26 +02:00
cmdline.h PR30321 Privilege separation if invoked as root 2024-04-26 17:22:26 +02:00
compile configury: regenerate with autoconf 1.15 2016-03-18 12:20:15 -04:00
config.guess Update to newer config.guess to support RISC-V 2021-09-06 22:21:27 -04:00
config.in PR32788: parallelize pass-1 2025-03-12 21:56:54 -04:00
config.rpath gettextize to gettext 0.19 2015-07-09 10:55:14 -04:00
config.sub configury: regenerate with autoconf 1.15 2016-03-18 12:20:15 -04:00
configure PR33347: autoconf the "R" .section flag in sdt.h 2025-09-01 16:29:19 -04:00
configure.ac PR33347: autoconf the "R" .section flag in sdt.h 2025-09-01 16:29:19 -04:00
COPYING
coveragedb.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
coveragedb.h
csclient.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
csclient.h mechanical prerelease copyright notice year# changes 2018-10-12 16:52:23 -04:00
cscommon.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
cscommon.h Have the stap server mok sign modules using stap --sign-module=PATH 2022-04-12 11:21:01 -04:00
depcomp configury: regenerate with autoconf 1.15 2016-03-18 12:20:15 -04:00
dtrace.in dtrace.in: add emacs mode marker for python 2023-02-27 09:37:19 -05:00
dwarf_wrappers.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
dwarf_wrappers.h PR20042: support tracepoints with function-pointer args 2016-05-06 16:43:37 -07:00
dwflpp.cxx dwflpp.cxx: Prevent deref of past-the-end iterator 2025-08-14 13:01:39 -04:00
dwflpp.h PR30123: rework dwarf4/5 DW_AT_data_bit_offset support 2023-03-09 17:08:32 -05:00
elaborate.cxx elaborate.cxx: fix build with GCC 13 2025-08-28 13:58:51 -04:00
elaborate.h PR30570: Improved type inference within the try block to handle elided cases 2023-06-28 09:17:49 -04:00
EXAMPLES
git_version.sh PR31703: git_version.sh: tolerate absence of /bin/which 2024-05-06 11:37:38 -04:00
HACKING Conscious language initiatives: replaced whitelist->passlist, blacklist->blocklist, master->main/primary. Some occurences of master and slave may not be able to be replaced at this point, eg. name of a terminology or usage of other programs interface. 2020-12-02 11:51:15 -05:00
hash.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
hash.h
INSTALL
install-sh configury: regenerate with autoconf 1.15 2016-03-18 12:20:15 -04:00
interactive.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
interactive.h Add initial "interactive mode" support. 2015-07-20 11:17:33 -05:00
INTERNALS interned_string: drop magic c_str() implementation 2015-08-18 13:24:16 -04:00
loc2stap.cxx loc2stap.cxx: Add partial support for DW_OP_bra in DWARF location lists 2024-04-23 14:11:18 -04:00
loc2stap.h Make declarations consistent with corresponding definitions 2021-05-05 15:19:58 -04:00
macros.systemtap.in rhbz1584705: add a %_systemtap_datadir rpm macro too 2018-07-08 11:42:47 -04:00
main.cxx PR32788: parallelize pass-1 2025-03-12 21:56:54 -04:00
Makefile.am PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
Makefile.in post-release 5.4 configury regen on fedora42 2025-06-07 10:43:15 -04:00
mdfour.c
mdfour.h
missing configury: regenerate with autoconf 1.15 2016-03-18 12:20:15 -04:00
NEWS PRERELEASE: authors, news, samples index 2025-10-29 17:06:34 -04:00
nss-server-info.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
nss-server-info.h mechanical prerelease copyright notice year# changes 2018-10-12 16:52:23 -04:00
nsscommon.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
nsscommon.h Always use nssInit for http and nss server. 2018-11-06 12:09:58 -05:00
parse.cxx PR32788: parallelize pass-1 2025-03-12 21:56:54 -04:00
parse.h PR32788: parallelize pass-1 2025-03-12 21:56:54 -04:00
privilege.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
privilege.h
py-compile Added the initial httpd/docker directory. 2017-11-14 15:39:32 -06:00
README (buildbot bump3) 2025-01-18 07:32:18 -05:00
README.security
README.stapregex
README.unprivileged
remote.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
remote.h PR30321 Privilege separation if invoked as root 2024-04-26 17:22:26 +02:00
rpm_finder.cxx PR29094: Include rpm/rpmcrypto.h when required 2022-04-27 14:14:17 -04:00
rpm_finder.h
run-stap.in run-stap.in: forget about bundled elfutils build mode 2020-07-11 12:37:21 -04:00
runtest.sh
sdt_types.h Improve public domain dedication language. 2017-06-27 01:52:48 +02:00
session.cxx prerelease: showing good support on linux 6.18-rc3 2025-10-28 15:03:02 -04:00
session.h PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
setupdwfl.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
setupdwfl.h
smileytap.svg
stap-authorize-cert.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stap-env PR18162: map aarch64->arm64 for stap-server -a use 2015-03-25 15:53:45 -04:00
stap-gen-cert.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stap-prep RHBZ2297063: stap-prep should not have DEBUGINFOD_PROGRESS chattiness 2024-07-11 18:42:29 -04:00
stap-profile-annotate.in stap-profile-annotate.in: 2022-05-11 14:04:13 -04:00
stap-report stap-report: Display amount of free and used memory in the system 2025-11-07 15:05:37 +01:00
stap-server Fix rhbz1378462 by updating the path to stap-gen-cert in stap-server. 2016-09-22 15:10:29 +02:00
stap-server.conf rhbz2041596: replace /var/run -> /run throughout 2022-01-17 15:19:32 -05:00
stap-server.service set -i as default for stap-server.service 2016-05-19 14:13:03 -04:00
stap-serverd.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stap-sign-module.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stap-start-server
stap-stop-server
staplog.c deprecate STP_TRANSPORT_VERSION=1 (rhel4 relayfs) 2020-09-18 14:05:48 -04:00
stapregex-defines.h stapregex PR15065 (4/8) :: switch DFA engine to an unsigned char type 2017-09-07 23:06:07 -04:00
stapregex-dfa.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stapregex-dfa.h fix PR30395: Regex code has invalid memory reads caught by KASAN 2023-05-08 08:12:59 -04:00
stapregex-parse.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stapregex-parse.h stapregex PR15065 (5/8) :: correctly number tags in stapregex-parse 2017-09-07 23:06:11 -04:00
stapregex-tree.cxx stapregex PR15065 (8/8) :: add back re2c's mini-optimizer 2017-09-07 23:06:28 -04:00
stapregex-tree.h stapregex PR15065 (8/8) :: add back re2c's mini-optimizer 2017-09-07 23:06:28 -04:00
stapregex.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stapregex.h stapregex PR15065 (4/8) :: switch DFA engine to an unsigned char type 2017-09-07 23:06:07 -04:00
staptree.cxx staptree.cxx: tweak atomic<> usage for type hygiene 2025-03-18 19:48:51 -04:00
staptree.h PR32788: parallelize pass-1 2025-03-12 21:56:54 -04:00
staputil.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
staputil.h PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
stapvirt.c stapvirt.c: More gcc-14 -Werror=calloc-transposed-args compatibility 2024-01-18 16:37:39 -05:00
stringtable.cxx PR32788: parallelize pass-1 2025-03-12 21:56:54 -04:00
stringtable.h PR32788: parallelize pass-1 2025-03-12 21:56:54 -04:00
systemtap.spec PRERELEASE: authors, news, samples index 2025-10-29 17:06:34 -04:00
tapset-been.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-debuginfod.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-dynprobe.cxx Revert "add support of compilation against clang and llvm's libc++" 2025-01-17 20:36:16 -05:00
tapset-dynprobe.h
tapset-mark.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-method.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-netfilter.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-perfmon.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-procfs.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-python.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapset-timers.cxx PR32856: Use STP_TIMER_DELETE_SYNC macro in generated instrumentation 2025-04-28 17:30:22 -04:00
tapset-utrace.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
tapsets.cxx PR33428: imply kernel<vmlinux.h>, check by file name, cont'd 2025-11-12 18:51:26 -05:00
tapsets.h PR27410: Probe processes using debuginfod 2023-08-25 10:20:09 -04:00
task_finder.cxx PR32652: build compatibility with -Werror + dyninst 13 + gcc14 2025-02-06 18:24:01 -05:00
task_finder.h
translate.cxx Deliberate syntax error reverted 2025-10-24 20:27:35 +02:00
translate.h
translator-output.cxx translate.cxx: Make stap-symbols.h a separate CU. 2019-12-18 16:47:12 -08:00
translator-output.h translator: ditch one assert(0) 2020-05-28 11:25:01 -04:00
version.h PR29668 - make rpm target 2022-10-11 16:41:23 +02:00
zanata.xml Conscious language initiatives: replaced whitelist->passlist, blacklist->blocklist, master->main/primary. Some occurences of master and slave may not be able to be replaced at this point, eg. name of a terminology or usage of other programs interface. 2020-12-02 11:51:15 -05:00

systemtap: a linux trace/probe tool

Visit the project web site at <http://sourceware.org/systemtap>,
for documentation and mailing lists for developers and users.

This is free software.
See the COPYING file for redistribution/modification terms.
See the INSTALL file for generic build instructions.
See the HACKING file for contribution advice.

Prerequisites:

- linux kernel
- kernel module build environment (kernel-devel rpm) and/or dyninst
- optionally, debugging information for kernel/user-space being instrumented
- C compiler (same as what kernel was compiled with), to build kernel modules
- C++11 compiler such as gcc 4.8+, to build systemtap itself
- elfutils 0.151+ with libdwfl for debugging information parsing
- Python for tools which are scripts, such as dtrace(1)
- root privileges

Installation steps:

- If equipped with elfutils version 0.178 or later, try using debuginfod
  for automatic debuginfo downloading.  This experimental public server
  may be enough:
  % export DEBUGINFOD_URLS=https://debuginfod.elfutils.org/
  % export DEBUGINFOD_PROGRESS=1
  See https://sourceware.org/elfutils/Debuginfod.html for more details.
  
- Otherwise, install any debuginfo packages you need, for kernel
  and/or userspace.  On modern Fedora, # debuginfo-install kernel [...]
  
  (Beware of confusion between kernel vs. kernel-debug vs kernel-PAE etc.
  variants.  Each likely has a corresponding development and debuginfo
  package.)

- Install the systemtap package.
  On modern Fedora, # yum install systemtap systemtap-runtime

Build steps:

- Consider installing the kernel-debuginfo, kernel-devel, gcc and
  dependent packages (or see below if you are building your own
  kernels from source).  If using only the pure-userspace dyninst
  backend, install gcc and dyninst-devel.
  
- If available, install your distribution's copy of elfutils and its
  development headers/libraries.
  Or if desired, build elfutils separately one time, and install
  it to /usr/local.
  See https://elfutils.org/
  elfutils version 0.178 introduces automatic debuginfo downloading,
  which can makes systemtap usage easier.

- On modern Fedora, install general optional build-requisites:
  # yum-builddep systemtap
  On modern Debian/Ubuntu, similarly:
  # apt-get build-dep systemtap

- Download systemtap sources:
  https://sourceware.org/systemtap/ftp/releases/
  https://sourceware.org/systemtap/ftp/snapshots/
  (or)
  git clone git://sourceware.org/git/systemtap.git
      (or) https://sourceware.org/git/systemtap.git

- Build systemtap normally:
  % .../configure [other autoconf options]
  Add env LDFLAGS=-L/path/ CPPFLAGS=-I/path/ before configure
  to locate libraries in non-system directories.

  Consider configuring with "--prefix=DIRECTORY" to specify an
  installation directory other than /usr/local.  It can be an ordinary
  personal directory.

  % make all
  # make install
  To uninstall systemtap:
  # make uninstall

  Alternately, on a Fedora-like system:
  % make rpm
  # rpm -i /path/to/rpmbuild/.../systemtap*rpm


- Run systemtap:

  To run systemtap after installation, add $prefix/bin to your $PATH, or
  refer to $prefix/bin/stap directly.  If you keep your build tree
  around, you can also use the "stap" binary there.  

  Some samples should be available under $prefix/share/doc/systemtap/examples.

  For the normal linux-kernel-module based backend, run "stap" as
  root.  If desired, create "stapdev" and "stapusr" entries in
  /etc/groups.  Any users in "stapdev"+"stapusr" will be able to run
  systemtap as if with root privileges.  Users in "stapusr" only may
  launch (with "staprun") pre-compiled probe modules (created by "stap
  -p4 ...") that a system administrator copied under
  /lib/modules/`uname -r`/systemtap.  "stapusr" may also be permitted
  to create arbitrary unprivileged systemtap scripts of their own.
  See README.unprivileged for additional setup instructions.

  To run a simple test.
  # stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'

  To run the full test suite from the build tree, install dejagnu,
  then run with root privileges:
  # make installcheck

  For the prototype dyninst pure-userspace backend, run "stap" as any user.
  % stap --runtime=dyninst -e 'probe process.function("*") { 
                               println(pn(), ":", $$parms) }' -c 'ls'

  For the prototype bpf backend, run "stap" as "root"
  # stap --runtime=bpf -e 'probe kernel.function("do_exit") {
                                 printf("bye %d\n", pid()) }'



Tips:

- By default, systemtap looks for the debug info in these locations:
  /boot/vmlinux-`uname -r`
  /usr/lib/debug/lib/modules/`uname -r`/vmlinux
  /lib/modules/`uname -r`/vmlinux
  /lib/modules/`uname -r`/build/vmlinux


Building a kernel.org kernel:

- Build the kernel using your normal procedures.  Enable
  CONFIG_DEBUG_INFO, CONFIG_KPROBES, CONFIG_RELAY, CONFIG_DEBUG_FS,
  CONFIG_MODULES, CONFIG_MODULE_UNLOAD, CONFIG_UPROBES if able
- % make modules_install install headers_install
- Boot into the kernel.

- If you wish to leave the kernel build tree in place, simply run
  % stap -r /path/to/kernel/build/tree [...]
  You're done.

- Or else, if you wish to install the kernel build/debuginfo data into
  a place where systemtap will find it without the "-r" option:
  % ln -s /path/to/kernel/build/tree /lib/modules/RELEASE/build 

- Instead of using the "-r" option, you can also use the environment 
  variable SYSTEMTAP_RELEASE to direct systemtap to the kernel data.