/usr/share/systemtap/tapset/bpf
NameSizeModeActions
aux_syscalls.stp9090644editdlrm
compatdefs.stp2030644editdlrm
context.stp60390644editdlrm
conversions.stp47270644editdlrm
exit.stp25830644editdlrm
logging.stp14630644editdlrm
syscalls.stpm2130644editdlrm
syscall_any.stp15690644editdlrm
syscall_num_arm.stp385880644editdlrm
syscall_num_arm64.stp865960644editdlrm
syscall_num_mips.stp1105340644editdlrm
syscall_num_powerpc.stp710860644editdlrm
syscall_num_riscv.stp484220644editdlrm
syscall_num_s390.stp680680644editdlrm
syscall_num_x86_64.stp656580644editdlrm
syscall_table.stp14910644editdlrm
target.stp14030644editdlrm
task.stp5830644editdlrm
time.stp5390644editdlrm
timestamp_gtod.stp21780644editdlrm
uconversions.stp80140644editdlrm
Edit: /usr/share/systemtap/tapset/bpf/logging.stp (1463B)
// logging tapset -- BPF version // Copyright (C) 2005-2021 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. function log (msg:string) { /* unprivileged */ /* bpf */ printf("%s\n", msg) } function warn (msg:string) { /* unprivileged */ /* bpf */ // TODO: _stp_warn intelligently determines whether msg has a newline printf("WARNING: %s\n", msg) } function exit () { /* unprivileged */ /* bpf */ _set_exit_status() _send_exit_msg() } %(systemtap_v >= "4.0" %? function abort () { /* unprivileged */ /* bpf */ // TODO PR27820: There may be a delay between setting exit status // and stapbpf.cxx disabling the probes. This could be solved // at the cost of setting a global var and adding a check to the // start of every probe. _set_exit_status() _send_exit_msg() _terminate() } %) function error (msg:string) { /* unprivileged */ /* bpf */ // If error is called within a try block, the instruction flow // will switch to the corresponding catch block. _jump_to_catch(msg) // Execution will reach here if error was called outside a try // block. In this case, the error message will be stored for // printing and the error status will be set. _register_error(msg) // Short-circuit the program to its exit. _terminate() }