On 12/12/17 1:03 AM, Peter Zijlstra wrote:
On Mon, Dec 11, 2017 at 11:39:02AM -0800, Yonghong Song wrote:
The usage:
struct perf_event_query_bpf *query = malloc(...);
query.ids_len = ids_len;
err = ioctl(pmu_efd, PERF_EVENT_IOC_QUERY_BPF, &query);
You didn't spot the fixes to your changelog ;-) The above should read
something like:
struct perf_event_query_bpf *query =
malloc(sizeof(*query) + sizeof(u32) * ids_len);
query->ids_len = ids_len;
err = ioctl(pmu_efd, PERF_EVENT_IOC_QUERY_BPF, query);
sure. I fixed up this nit in commit log of patch 1 and in test_progs.c
of patch 2.