]> sourceware.org Git - systemtap.git/commit
stapbpf PR24528 housekeeping :: introduce enum bpf_target
authorSerhei Makarov <smakarov@redhat.com>
Thu, 20 Jun 2019 17:14:39 +0000 (13:14 -0400)
committerSerhei Makarov <smakarov@redhat.com>
Thu, 20 Jun 2019 17:20:54 +0000 (13:20 -0400)
commit267ce709b9ea5bc2393d4c5f5954926b8667e24d
tree582d54ea09791b47906e0ed02dc122be659841e9
parent47c3f6c601745de829017ede704fc7e8c01f50de
stapbpf PR24528 housekeeping :: introduce enum bpf_target

Some housekeeping work to allow generating different code for the
less-restrictive userspace BPF interpreter vs. the more-restrictive
in-kernel BPF JIT interpreter.

* bpf-internal.h (enum bpf_target): New enum to track target BPF version.
  (struct program::target): New field,
  tracks the BPF version this program is intended for.
  (struct program::program): Require target to be specified on creation.
* bpf-base.cxx (struct program::program): Initialize target field.

* bpf-translate.cxx (translate_bpf_pass): Specify targets of each program,
  for now begin/end probes are being emitted for userspace BPF,
  all other probes are being emitted for in-kernel BPF.

Down the line we may have a userspace timer probe (PR23477)..
bpf-base.cxx
bpf-internal.h
bpf-translate.cxx
This page took 0.028989 seconds and 5 git commands to generate.