I think that I do as a next
#BPF exercise a "poor man's" flame graph generator for
#TPM driver, meaning no interaction and make most of VT output ;-)
I could also consider to do it for
#kernel #keyring later on but TPM driver is easier to scope: only look at events that end up to tpm_transmit().
Instead of "perf sampling approach" I'm planning to use BPF ring buffer and use that to all backtraces to tpm_transmit() to the user space host program. Then the host program implemented with C will post-process that queue in parallel.
Frequency of TPM commands is low enough so that 1:1 granularity should be possible.
Can't wait to get this done, will be a fun tool for future patch reviews I make ;-)
#eBPF