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)
commit35578d7984003097af2b1e34502bc943d40c1804
treeb2eca5ddc9446e771dd5a9e1629b12f98b9f2bf0
parentea317b267e9d03a8241893aa176fba7661d07579
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