Re: [PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread Alexei Starovoitov
On 7/23/15 6:54 PM, xiakaixu wrote: 于 2015/7/24 6:59, Alexei Starovoitov 写道: On 7/23/15 2:42 AM, Kaixu Xia wrote: 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 ... +struct bpf_map_def SEC("maps")

Re: [PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread xiakaixu
于 2015/7/24 6:59, Alexei Starovoitov 写道: > On 7/23/15 2:42 AM, Kaixu Xia wrote: >> 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 > ... >> +struct bpf_map_def SEC("maps") my_map = { >> +.type =

Re: [PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread Alexei Starovoitov
On 7/23/15 2:42 AM, Kaixu Xia wrote: 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 ... +struct bpf_map_def SEC("maps") my_map = { + .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, + .key_size =

[PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread Kaixu Xia
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 --- samples/bpf/Makefile | 4 +++ samples/bpf/bpf_helpers.h | 2 ++ samples/bpf/tracex6_kern.c | 26 ++ samples/bpf/tracex6_user.c | 67

Re: [PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread Alexei Starovoitov
On 7/23/15 2:42 AM, Kaixu Xia wrote: 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 xiaka...@huawei.com ... +struct bpf_map_def SEC(maps) my_map = { + .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, +

Re: [PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread xiakaixu
于 2015/7/24 6:59, Alexei Starovoitov 写道: On 7/23/15 2:42 AM, Kaixu Xia wrote: 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 xiaka...@huawei.com ... +struct bpf_map_def SEC(maps) my_map = { +.type =

Re: [PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread Alexei Starovoitov
On 7/23/15 6:54 PM, xiakaixu wrote: 于 2015/7/24 6:59, Alexei Starovoitov 写道: On 7/23/15 2:42 AM, Kaixu Xia wrote: 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 xiaka...@huawei.com ... +struct

[PATCH v3 3/3] samples/bpf: example of get selected PMU counter value

2015-07-23 Thread Kaixu Xia
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 xiaka...@huawei.com --- samples/bpf/Makefile | 4 +++ samples/bpf/bpf_helpers.h | 2 ++ samples/bpf/tracex6_kern.c | 26 ++