bt(5), btrace(8): execute END probe and print non-empty maps upon exit()
BPFTrace's exit() statement executes the END probe (if any) and prints
the contents of all non-empty maps before terminating the interpreter.
Implement this in btrace(8) with a halting check after each statement.
If a statement causes the program to halt, the condition bubbles up to
the top-level evaluation loop and causes rules_teardown() to run
immediately.
btrace(8) still performs a full rules_setup() if exit() is called
during the BEGIN probe, though the top-level evaluation loop is never
run.
One edge-like case: an exit() from the END probe is treated as an
early return; END is not executed multiple times.
Thread: https://marc.info/?l=openbsd-tech&m=
169765169420751&w=2
ok mpi@