]> granicus.if.org Git - strace/blob - perf_event_struct.h
tests: fix format warnings on x32
[strace] / perf_event_struct.h
1 /*
2  * Copyright (c) 2016-2018 Eugene Syromyatnikov <evgsyr@gmail.com>
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: LGPL-2.1-or-later
6  */
7
8 #ifndef STRACE_LINUX_PERF_EVENT_STRUCT_H
9 # define STRACE_LINUX_PERF_EVENT_STRUCT_H
10
11 # include <stdint.h>
12
13 struct perf_event_attr {
14         uint32_t type;
15         uint32_t size;
16         uint64_t config;
17         union {
18                 uint64_t sample_period;
19                 uint64_t sample_freq;
20         };
21         uint64_t sample_type;
22         uint64_t read_format;
23         uint64_t disabled                       :1,
24                  inherit                        :1,
25                  pinned                         :1,
26                  exclusive                      :1,
27                  exclude_user                   :1,
28                  exclude_kernel                 :1,
29                  exclude_hv                     :1,
30                  exclude_idle                   :1,
31                  mmap                           :1,
32                  comm                           :1,
33                  freq                           :1,
34                  inherit_stat                   :1,
35                  enable_on_exec                 :1,
36                  task                           :1,
37                  watermark                      :1,
38                  precise_ip                     :2,
39                  mmap_data                      :1,
40                  sample_id_all                  :1,
41                  exclude_host                   :1,
42                  exclude_guest                  :1,
43                  exclude_callchain_kernel       :1,
44                  exclude_callchain_user         :1,
45                  mmap2                          :1,
46                  comm_exec                      :1,
47                  use_clockid                    :1,
48                  context_switch                 :1,
49                  write_backward                 :1,
50                  namespaces                     :1,
51                  __reserved_1                   :35;
52         union {
53                 uint32_t wakeup_events;
54                 uint32_t wakeup_watermark;
55         };
56         uint32_t bp_type;
57         union {
58                 uint64_t bp_addr;
59                 uint64_t config1;
60         };
61         /* End of ver 0 - 64 bytes */
62         union {
63                 uint64_t bp_len;
64                 uint64_t config2;
65         };
66         /* End of ver 1 - 72 bytes */
67         uint64_t branch_sample_type;
68         /* End of ver 2 - 80 bytes */
69         uint64_t sample_regs_user;
70         uint32_t sample_stack_user;
71         int32_t  clockid;
72         /* End of ver 3 - 96 bytes */
73         uint64_t sample_regs_intr;
74         /* End of ver 4 - 104 bytes */
75         uint32_t aux_watermark;
76         uint16_t sample_max_stack;
77         uint16_t __reserved_2;
78         /* End of ver 5 - 112 bytes */
79 };
80
81 struct perf_event_query_bpf {
82         uint32_t ids_len;
83         uint32_t prog_cnt;
84         uint32_t ids[0];
85 };
86
87 #endif /* !STRACE_LINUX_PERF_EVENT_STRUCT_H */