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.
Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -386,7 +386,8 @@ struct perf_event_attr { · 385 unmodified lines | |||
| 386 | aux_output : 1, /* generate AUX records instead of events */ | 386 | aux_output : 1, /* generate AUX records instead of events */ |
| 387 | cgroup : 1, /* include cgroup events */ | 387 | cgroup : 1, /* include cgroup events */ |
| 388 | text_poke : 1, /* include text poke events */ | 388 | 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; | ||
| 390 | 391 | ||
| 391 | union { | 392 | union { |
| 392 | __u32 wakeup_events; /* wakeup every n events */ | 393 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -659,6 +660,22 @@ struct perf_event_mmap_page { · 266 unmodified lines | |||
| 659 | __u64 aux_size; | 660 | __u64 aux_size; |
| 660 | }; | 661 | }; |
| 661 | 662 | ||
| 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 | |||
| 662 | #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) | 679 | #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) |
| 663 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 680 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
| 664 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 681 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |
| @@ -690,6 +707,7 @@ struct perf_event_mmap_page { · 25 unmodified lines | |||
| 690 | * | 707 | * |
| 691 | * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events | 708 | * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events |
| 692 | * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events | 709 | * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events |
| 710 | * PERF_RECORD_MISC_MMAP_BUILD_ID - PERF_RECORD_MMAP2 event | ||
| 693 | * | 711 | * |
| 694 | * | 712 | * |
| 695 | * PERF_RECORD_MISC_EXACT_IP: | 713 | * PERF_RECORD_MISC_EXACT_IP: |
| @@ -699,9 +717,13 @@ struct perf_event_mmap_page { · 3 unmodified lines | |||
| 699 | * | 717 | * |
| 700 | * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: | 718 | * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: |
| 701 | * Indicates that thread was preempted in TASK_RUNNING state. | 719 | * 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. | ||
| 702 | */ | 723 | */ |
| 703 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) | 724 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) |
| 704 | #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14) | 725 | #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14) |
| 726 | #define PERF_RECORD_MISC_MMAP_BUILD_ID (1 << 14) | ||
| 705 | /* | 727 | /* |
| 706 | * Reserve the last bit to indicate some extended misc field | 728 | * Reserve the last bit to indicate some extended misc field |
| 707 | */ | 729 | */ |
| @@ -915,10 +937,20 @@ enum perf_event_type { · 207 unmodified lines | |||
| 915 | * u64 addr; | 937 | * u64 addr; |
| 916 | * u64 len; | 938 | * u64 len; |
| 917 | * u64 pgoff; | 939 | * u64 pgoff; |
| 918 | * u32 maj; | 940 | * union { |
| 919 | * u32 min; | 941 | * struct { |
| 920 | * u64 ino; | 942 | * u32 maj; |
| 921 | * u64 ino_generation; | 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 | * }; | ||
| 922 | * u32 prot, flags; | 954 | * u32 prot, flags; |
| 923 | * char filename[]; | 955 | * char filename[]; |
| 924 | * struct sample_id sample_id; | 956 | * struct sample_id sample_id; |