perfmon: fix perf event user page read 80/33380/5
authorBenoît Ganne <bganne@cisco.com>
Thu, 5 Aug 2021 09:47:52 +0000 (11:47 +0200)
committerDamjan Marion <dmarion@me.com>
Fri, 20 Aug 2021 11:22:29 +0000 (11:22 +0000)
commit4e3af51a66384295eec5b1cf980ef4d88b949e1d
treec7b3db4ba08b676099adbcf830232f7476fd37a2
parent03f2a015999ed9ba34041afb408a22ea5fe601ff
perfmon: fix perf event user page read

When mmap()-ing perf event in userspace, we must adhere to the kernel
update protocol to read consistent values.
Also, 'offset' is an offset to add to the counter value, not to apply
to the PMC index.

Type: fix

Change-Id: I59106bb3a48185ff3fcb0d2f09097269a67bb6d6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/plugins/perfmon/dispatch_wrapper.c