samples/bpf: add example to test reading address
authorTeng Qin <qinteng@fb.com>
Tue, 6 Mar 2018 18:55:02 +0000 (10:55 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 8 Mar 2018 01:22:34 +0000 (02:22 +0100)
commit12fe12253c56a26e591ceefbdf0998b391022003
tree822b9bb7680c97b84f98f8d471b297637048d473
parent95da0cdb723260362fc126a563285ac66a193da7
samples/bpf: add example to test reading address

This commit adds additional test in the trace_event example, by
attaching the bpf program to MEM_UOPS_RETIRED.LOCK_LOADS event with
PERF_SAMPLE_ADDR requested, and print the lock address value read from
the bpf program to trace_pipe.

Signed-off-by: Teng Qin <qinteng@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/trace_event_kern.c
samples/bpf/trace_event_user.c