stap/eBPF language features brainstorm

William Cohen wcohen@redhat.com
Thu Jul 19 15:27:00 GMT 2018


On 07/11/2018 04:13 PM, Serhei Makarov wrote:
> Some very rough ideas on how to jam further desirable SystemTap language features into the constraints of eBPF. The goal isn't for total feature-parity with the kernel backend (that's not feasible) but for the restrictions to be clear and understandable, e.g.:

... 
> - Certain operations (e.g. foreach) can only be done in userspace. It's clearly documented which probes run in userspace (e.g. begin, end, selected ?timer probes).

A number of the systemtap script have idioms like the following from iotop.stp:

global io_stat,device
global read_bytes,write_bytes

...

probe timer.ms(5000) {
  /* write out data */
  /* clear data */
  delete io_stat
  delete device
  read_bytes = 0
  write_bytes = 0  
}

Is there some way to clear out all the previous entries in the bpf map from the timer probe?

-Will



More information about the Systemtap mailing list