Skip to content

Commit df063c8

Browse files
liu-song-6acmel
authored andcommitted
tools headers uapi: Sync tools/include/uapi/linux/perf_event.h
Sync for PERF_RECORD_BPF_EVENT. Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: kernel-team@fb.com Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20190117161521.1341602-5-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 6ee52e2 commit df063c8

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

‎tools/include/uapi/linux/perf_event.h‎

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ struct perf_event_attr {
373373
write_backward : 1, /* Write ring buffer from end to beginning */
374374
namespaces : 1, /* include namespaces data */
375375
ksymbol : 1, /* include ksymbol events */
376-
__reserved_1 : 34;
376+
bpf_event : 1, /* include bpf events */
377+
__reserved_1 : 33;
377378

378379
union {
379380
__u32 wakeup_events; /* wakeup every n events */
@@ -979,6 +980,25 @@ enum perf_event_type {
979980
*/
980981
PERF_RECORD_KSYMBOL = 17,
981982

983+
/*
984+
* Record bpf events:
985+
* enum perf_bpf_event_type {
986+
* PERF_BPF_EVENT_UNKNOWN = 0,
987+
* PERF_BPF_EVENT_PROG_LOAD = 1,
988+
* PERF_BPF_EVENT_PROG_UNLOAD = 2,
989+
* };
990+
*
991+
* struct {
992+
* struct perf_event_header header;
993+
* u16 type;
994+
* u16 flags;
995+
* u32 id;
996+
* u8 tag[BPF_TAG_SIZE];
997+
* struct sample_id sample_id;
998+
* };
999+
*/
1000+
PERF_RECORD_BPF_EVENT = 18,
1001+
9821002
PERF_RECORD_MAX, /* non-ABI */
9831003
};
9841004

@@ -990,6 +1010,13 @@ enum perf_record_ksymbol_type {
9901010

9911011
#define PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER (1 << 0)
9921012

1013+
enum perf_bpf_event_type {
1014+
PERF_BPF_EVENT_UNKNOWN = 0,
1015+
PERF_BPF_EVENT_PROG_LOAD = 1,
1016+
PERF_BPF_EVENT_PROG_UNLOAD = 2,
1017+
PERF_BPF_EVENT_MAX, /* non-ABI */
1018+
};
1019+
9931020
#define PERF_MAX_STACK_DEPTH 127
9941021
#define PERF_MAX_CONTEXTS_PER_STACK 8
9951022

0 commit comments

Comments
 (0)