perf-tools
perf-tools copied to clipboard
Fix filter intended to exclude perf's own writes.
I noticed that the write_workaround
code paths weren't working as intended (which is bad, since perf
recording its own writes causes something of a feedback loop).
The idea behind the trick being used is that sh
substitutes its PID for $$
; then exec
replaces sh
with perf
(keeping the same PID), so we have managed to put perf
's own PID in the filter, which successfully excludes perf
's writes. (Yay!)
This patch just restores the exec
s, which must have gone missing at some point, and without which we are excluding sh
's writes instead.