Skip to content

Commit dde587a

Browse files
olsajiriacmel
authored andcommitted
tools headers uapi: Sync tools/include/uapi/linux/perf_event.h
Syncing tools's uapi with mmap2 build id data changes. Committer notes: I'm taking the tools/ bits, so this will be in fact ahead of the kernel till the bpf/perf-kernel bits are merged. Signed-off-by: Jiri Olsa <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Alexei Budankov <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Song Liu <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent feab999 commit dde587a

File tree

1 file changed

+37
-5
lines changed

1 file changed

+37
-5
lines changed

tools/include/uapi/linux/perf_event.h

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ struct perf_event_attr {
386386
aux_output : 1, /* generate AUX records instead of events */
387387
cgroup : 1, /* include cgroup events */
388388
text_poke : 1, /* include text poke events */
389-
__reserved_1 : 30;
389+
build_id : 1, /* use build id in mmap2 events */
390+
__reserved_1 : 29;
390391

391392
union {
392393
__u32 wakeup_events; /* wakeup every n events */
@@ -659,6 +660,22 @@ struct perf_event_mmap_page {
659660
__u64 aux_size;
660661
};
661662

663+
/*
664+
* The current state of perf_event_header::misc bits usage:
665+
* ('|' used bit, '-' unused bit)
666+
*
667+
* 012 CDEF
668+
* |||---------||||
669+
*
670+
* Where:
671+
* 0-2 CPUMODE_MASK
672+
*
673+
* C PROC_MAP_PARSE_TIMEOUT
674+
* D MMAP_DATA / COMM_EXEC / FORK_EXEC / SWITCH_OUT
675+
* E MMAP_BUILD_ID / EXACT_IP / SCHED_OUT_PREEMPT
676+
* F (reserved)
677+
*/
678+
662679
#define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0)
663680
#define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0)
664681
#define PERF_RECORD_MISC_KERNEL (1 << 0)
@@ -690,6 +707,7 @@ struct perf_event_mmap_page {
690707
*
691708
* PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events
692709
* PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events
710+
* PERF_RECORD_MISC_MMAP_BUILD_ID - PERF_RECORD_MMAP2 event
693711
*
694712
*
695713
* PERF_RECORD_MISC_EXACT_IP:
@@ -699,9 +717,13 @@ struct perf_event_mmap_page {
699717
*
700718
* PERF_RECORD_MISC_SWITCH_OUT_PREEMPT:
701719
* Indicates that thread was preempted in TASK_RUNNING state.
720+
*
721+
* PERF_RECORD_MISC_MMAP_BUILD_ID:
722+
* Indicates that mmap2 event carries build id data.
702723
*/
703724
#define PERF_RECORD_MISC_EXACT_IP (1 << 14)
704725
#define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14)
726+
#define PERF_RECORD_MISC_MMAP_BUILD_ID (1 << 14)
705727
/*
706728
* Reserve the last bit to indicate some extended misc field
707729
*/
@@ -915,10 +937,20 @@ enum perf_event_type {
915937
* u64 addr;
916938
* u64 len;
917939
* u64 pgoff;
918-
* u32 maj;
919-
* u32 min;
920-
* u64 ino;
921-
* u64 ino_generation;
940+
* union {
941+
* struct {
942+
* u32 maj;
943+
* u32 min;
944+
* u64 ino;
945+
* u64 ino_generation;
946+
* };
947+
* struct {
948+
* u8 build_id_size;
949+
* u8 __reserved_1;
950+
* u16 __reserved_2;
951+
* u8 build_id[20];
952+
* };
953+
* };
922954
* u32 prot, flags;
923955
* char filename[];
924956
* struct sample_id sample_id;

0 commit comments

Comments
 (0)