On Tue, Aug 6, 2019 at 4:42 PM Daniel Xu <dxu@xxxxxxxxx> wrote: > > --- > tools/include/uapi/linux/perf_event.h | 23 ++++++++++ > .../selftests/bpf/prog_tests/attach_probe.c | 43 +++++++++++++++++++ > 2 files changed, 66 insertions(+) > > diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h > index 7198ddd0c6b1..4a5e18606baf 100644 > --- a/tools/include/uapi/linux/perf_event.h > +++ b/tools/include/uapi/linux/perf_event.h Please split header sync into separate patch, this will cause problems syncing libbpf to Github. > @@ -447,6 +447,28 @@ struct perf_event_query_bpf { > __u32 ids[0]; > }; > [...] > ssize_t base_addr; > + struct perf_event_query_kprobe kprobe_query; > + struct perf_event_query_kprobe kretprobe_query; Add = {} and avoid using memsets below. > > base_addr = get_base_addr(); > if (CHECK(base_addr < 0, "get_base_addr", > @@ -116,6 +119,46 @@ void test_attach_probe(void) > /* trigger & validate kprobe && kretprobe */ > usleep(1); > [...]