summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorKaixu Xia2015-08-06 09:02:35 +0200
committerDavid S. Miller2015-08-10 07:50:06 +0200
commit35578d7984003097af2b1e34502bc943d40c1804 (patch)
treeb2eca5ddc9446e771dd5a9e1629b12f98b9f2bf0 /include/linux/bpf.h
parentbpf: Add new bpf map type to store the pointer to struct perf_event (diff)
downloadkernel-qcow2-linux-35578d7984003097af2b1e34502bc943d40c1804.tar.gz
kernel-qcow2-linux-35578d7984003097af2b1e34502bc943d40c1804.tar.xz
kernel-qcow2-linux-35578d7984003097af2b1e34502bc943d40c1804.zip
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>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 4fc1f4070789..f57d7fed9ec3 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -190,6 +190,7 @@ extern const struct bpf_func_proto bpf_map_lookup_elem_proto;
extern const struct bpf_func_proto bpf_map_update_elem_proto;
extern const struct bpf_func_proto bpf_map_delete_elem_proto;
+extern const struct bpf_func_proto bpf_perf_event_read_proto;
extern const struct bpf_func_proto bpf_get_prandom_u32_proto;
extern const struct bpf_func_proto bpf_get_smp_processor_id_proto;
extern const struct bpf_func_proto bpf_tail_call_proto;