linux/include
Paul Chaignon f603e84ab7
bpf: Print breakdown of insns processed by subprogs
When using global functions (i.e. subprogs), the verifier performs
function-by-function verification. In that case, the sum of the
instructions processed in each global function and in the main program
counts towards the 1 million instructions limit. Only that sum is
reported in the verifier logs.

While starting to use global functions in Cilium (finally!), we found it
can be useful to have the breakdown per global function, to understand
exactly where the budget is currently spent. This patch implements this
breakdown, under BPF_LOG_STATS, as done for the stack depths.

When iterating over subprogs, we need to skip the hidden subprogs at the
end because they don't have a corresponding func_info_aux entry and
calling bpf_subprog_is_global() would result in an OOB access.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/bpf/5590f9c67e614ec9054d0c7e74e87cc690a52c56.1777538384.git.paul.chaignon@gmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-04-30 13:18:44 +02:00
..
acpi Power management updates for 7.1-rc1 2026-04-13 19:47:52 -07:00
asm-generic mm.git review status for linus..mm-nonmm-stable 2026-04-16 20:11:56 -07:00
clocksource
crypto This update includes the following changes: 2026-04-15 15:22:26 -07:00
cxl
drm ttm/pool: port to list_lru. (v2) 2026-04-08 06:52:47 +10:00
dt-bindings Support for Mobileye EyeQ6Lplus 2026-04-17 08:53:23 -07:00
hyperv
keys
kunit
kvm
linux bpf: Print breakdown of insns processed by subprogs 2026-04-30 13:18:44 +02:00
math-emu
media
memory
misc
net mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
pcmcia
ras
rdma
rv
scsi
soc
sound ASoC: Updates for v7.1 2026-04-13 18:09:48 +02:00
target
trace bpf: Add sleepable support for raw tracepoint programs 2026-04-22 22:44:24 +02:00
uapi bpf: Extend BTF UAPI vlen, kinds to use unused bits 2026-04-20 17:52:48 -07:00
ufs
vdso
video
xen xen/grant-table: guard gnttab_suspend/resume with CONFIG_HIBERNATE_CALLBACKS 2026-04-10 11:07:21 +02:00
Kbuild