summaryrefslogtreecommitdiff
path: root/include/uapi/linux/bpf_perf_event.h
diff options
context:
space:
mode:
authorTeng Qin <qinteng@fb.com>2018-03-06 10:55:01 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2018-03-08 02:22:34 +0100
commit95da0cdb723260362fc126a563285ac66a193da7 (patch)
treedb1eb572476d510c1a2e06c18c3ad6d4a79a0060 /include/uapi/linux/bpf_perf_event.h
parenta366e300ae9fc466d333e6d8f2bc5d58ed248041 (diff)
bpf: add support to read sample address in bpf program
This commit adds new field "addr" to bpf_perf_event_data which could be read and used by bpf programs attached to perf events. The value of the field is copied from bpf_perf_event_data_kern.addr and contains the address value recorded by specifying sample_type with PERF_SAMPLE_ADDR when calling perf_event_open. Signed-off-by: Teng Qin <qinteng@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/uapi/linux/bpf_perf_event.h')
-rw-r--r--include/uapi/linux/bpf_perf_event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf_perf_event.h b/include/uapi/linux/bpf_perf_event.h
index 8f95303f9d80..eb1b9d21250c 100644
--- a/include/uapi/linux/bpf_perf_event.h
+++ b/include/uapi/linux/bpf_perf_event.h
@@ -13,6 +13,7 @@
struct bpf_perf_event_data {
bpf_user_pt_regs_t regs;
__u64 sample_period;
+ __u64 addr;
};
#endif /* _UAPI__LINUX_BPF_PERF_EVENT_H__ */