]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU...
authorKaixu Xia <xiakaixu@huawei.com>
Thu, 6 Aug 2015 07:02:35 +0000 (07:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Aug 2015 05:50:06 +0000 (22:50 -0700)
commit4f69e65de2d0077917a60a8f2df38456acd34566
treeb2eca5ddc9446e771dd5a9e1629b12f98b9f2bf0
parent275a5a31501ecf44a72060313273b01a7afe3b3d
bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter

According to the perf_event_map_fd and index, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.

Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/verifier.c
kernel/trace/bpf_trace.c