On Thu, Sep 20, 2018 at 10:25:45AM -0300, Arnaldo Carvalho de Melo wrote: > PeterZ provided a patch introducing PERF_RECORD_MUNMAP, went nowhere due > to having to cope with munmapping parts of existing mmaps, etc. > > I'm still more in favour of introduce PERF_RECORD_MUNMAP, even if for > now it would be used just in this clean case for undoing a > PERF_RECORD_MMAP for a BPF program. > > The ABI is already complicated, starting to use something called > PERF_RECORD_MMAP for unmmaping by just using a NULL name... too clever, > I think.
Agreed, the PERF_RECORD_MUNMAP patch was fairly trivial, the difficult part was getting the perf tool to dtrt for that use-case. But if we need unmap events, doing the unmap record now is the right thing.