diff options
author | Kaixu Xia <xiakaixu@huawei.com> | 2015-08-06 03:02:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-10 01:50:06 -0400 |
commit | 47efb30274cbec1bd3c0c980a7ece328df2c16a8 (patch) | |
tree | 1393486ec4906557cdb1d9173e6e2e675bab3354 /samples/bpf/bpf_helpers.h | |
parent | 35578d7984003097af2b1e34502bc943d40c1804 (diff) |
samples/bpf: example of get selected PMU counter value
This is a simple example and shows how to use the new ability
to get the selected Hardware PMU counter value.
Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/bpf_helpers.h')
-rw-r--r-- | samples/bpf/bpf_helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h index c77c872fe8ee..3a44d3a272af 100644 --- a/samples/bpf/bpf_helpers.h +++ b/samples/bpf/bpf_helpers.h | |||
@@ -31,6 +31,8 @@ static unsigned long long (*bpf_get_current_uid_gid)(void) = | |||
31 | (void *) BPF_FUNC_get_current_uid_gid; | 31 | (void *) BPF_FUNC_get_current_uid_gid; |
32 | static int (*bpf_get_current_comm)(void *buf, int buf_size) = | 32 | static int (*bpf_get_current_comm)(void *buf, int buf_size) = |
33 | (void *) BPF_FUNC_get_current_comm; | 33 | (void *) BPF_FUNC_get_current_comm; |
34 | static int (*bpf_perf_event_read)(void *map, int index) = | ||
35 | (void *) BPF_FUNC_perf_event_read; | ||
34 | 36 | ||
35 | /* llvm builtin functions that eBPF C program may use to | 37 | /* llvm builtin functions that eBPF C program may use to |
36 | * emit BPF_LD_ABS and BPF_LD_IND instructions | 38 | * emit BPF_LD_ABS and BPF_LD_IND instructions |