STAPBPF(8)                 System Manager's Manual                STAPBPF(8)

NAME         top

       stapbpf - systemtap bpf runtime

SYNOPSIS         top

       stapbpf [ OPTIONS ] MODULE

DESCRIPTION         top

       The stapbpf program is the BPF back-end of the Systemtap tool.  It
       expects a bpf-elf file produced by the front-end stap tool, when run
       with --runtime=bpf.

       Splitting the systemtap tool into a front-end and a back-end allows a
       user to compile a systemtap script on a development machine that has
       the debugging information needed to compile the script and then
       transfer the resulting shared object to a production machine that
       doesn't have any development tools or debugging information

       Please refer to stappaths(7) for the version number, or run

        $ rpm -q systemtap # (for Fedora/RHEL)
        $ apt-get -v systemtap # (for Ubuntu)

OPTIONS         top

       The stapbpf program supports the following options.  Any other option
       prints a list of supported options.

       -v     Verbose mode.

       -V     Print version number and exit.

       -w     Suppress warnings from the script.

       -h     Print help message.

       -x PID The '_stp_target' variable will be set to PID.

       -o FILE
              Send output to FILE.

ARGUMENTS         top

       MODULE is the path of a bpf-elf file produced by the front-end stap
       tool, when run with --runtime=bpf.

EXAMPLES         top

       Here is a very basic example of how to generate a stapbpf module.
       First, use stap to compile a script.  The stap program will report
       the name of the resulting module in the current working directory.

        $ stap --runtime=bpf -p4 -e 'probe begin { printf("Hello World!\n");
       exit() }'

       Run stapbpf with the pathname to the module as an argument.

        $ stapbpf ./
        Hello World!

       If the -p4 option is omitted, stap will invoke stapbpf automatically.

LIMITATIONS         top

       This runtime is in an early stage of development and it currently
       lacks support for a number of features available in the default
       runtime.  A subset of the following probe points is supported:


       In general, probes based on the kprobes, uprobes, tracepoint and perf
       infrastructures are supported. See stapprobes(3stap) for more infor‐
       mation on the probe points and which tracing infrastructures they are
       based on.

       for loops, foreach loops and while loops are usable only in begin and
       end probes.  try statements are not supported.

       There is limited support for string operations. String variables and
       literals are limited to 64 characters, except for printf format
       strings, which are limited to 256 characters.

       A subset of the statistical aggregate functionality is available,
       with support only for the @count(), @sum(), @avg() extractor func‐

       The name of the bpf-elf file produced by the front-end stap tool
       should not be changed.


       See the stap(1) manual page for additional information on safety and

SEE ALSO         top

       stap(1), stapprobes(3stap), staprun(8), stapex(3stap)

BUGS         top

       Use the Bugzilla link of the project web page or our mailing list. , <>.

COLOPHON         top

       This page is part of the systemtap (a tracing and live-system
       analysis tool) project.  Information about the project can be found
       at ⟨⟩.  If you have a bug report for
       this manual page, send it to  This page was
       obtained from the project's upstream Git repository
       ⟨git://⟩ on 2020-05-27.  (At that
       time, the date of the most recent commit that was found in the repos‐
       itory was 2020-05-26.)  If you discover any rendering problems in
       this HTML version of the page, or you believe there is a better or
       more up-to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not part
       of the original manual page), send a mail to


Pages that refer to this page: stap(1)