1 /* Generated by ./xlat/gen.sh from ./xlat/perf_event_sample_format.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(PERF_SAMPLE_IP) || (defined(HAVE_DECL_PERF_SAMPLE_IP) && HAVE_DECL_PERF_SAMPLE_IP) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((PERF_SAMPLE_IP) == (1 << 0), "PERF_SAMPLE_IP != 1 << 0"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define PERF_SAMPLE_IP 1 << 0 12 #endif 13 #if defined(PERF_SAMPLE_TID) || (defined(HAVE_DECL_PERF_SAMPLE_TID) && HAVE_DECL_PERF_SAMPLE_TID) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((PERF_SAMPLE_TID) == (1 << 1), "PERF_SAMPLE_TID != 1 << 1"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define PERF_SAMPLE_TID 1 << 1 19 #endif 20 #if defined(PERF_SAMPLE_TIME) || (defined(HAVE_DECL_PERF_SAMPLE_TIME) && HAVE_DECL_PERF_SAMPLE_TIME) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((PERF_SAMPLE_TIME) == (1 << 2), "PERF_SAMPLE_TIME != 1 << 2"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define PERF_SAMPLE_TIME 1 << 2 26 #endif 27 #if defined(PERF_SAMPLE_ADDR) || (defined(HAVE_DECL_PERF_SAMPLE_ADDR) && HAVE_DECL_PERF_SAMPLE_ADDR) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((PERF_SAMPLE_ADDR) == (1 << 3), "PERF_SAMPLE_ADDR != 1 << 3"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define PERF_SAMPLE_ADDR 1 << 3 33 #endif 34 #if defined(PERF_SAMPLE_READ) || (defined(HAVE_DECL_PERF_SAMPLE_READ) && HAVE_DECL_PERF_SAMPLE_READ) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((PERF_SAMPLE_READ) == (1 << 4), "PERF_SAMPLE_READ != 1 << 4"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define PERF_SAMPLE_READ 1 << 4 40 #endif 41 #if defined(PERF_SAMPLE_CALLCHAIN) || (defined(HAVE_DECL_PERF_SAMPLE_CALLCHAIN) && HAVE_DECL_PERF_SAMPLE_CALLCHAIN) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((PERF_SAMPLE_CALLCHAIN) == (1 << 5), "PERF_SAMPLE_CALLCHAIN != 1 << 5"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define PERF_SAMPLE_CALLCHAIN 1 << 5 47 #endif 48 #if defined(PERF_SAMPLE_ID) || (defined(HAVE_DECL_PERF_SAMPLE_ID) && HAVE_DECL_PERF_SAMPLE_ID) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((PERF_SAMPLE_ID) == (1 << 6), "PERF_SAMPLE_ID != 1 << 6"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define PERF_SAMPLE_ID 1 << 6 54 #endif 55 #if defined(PERF_SAMPLE_CPU) || (defined(HAVE_DECL_PERF_SAMPLE_CPU) && HAVE_DECL_PERF_SAMPLE_CPU) 56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 57 static_assert((PERF_SAMPLE_CPU) == (1 << 7), "PERF_SAMPLE_CPU != 1 << 7"); 58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 59 #else 60 # define PERF_SAMPLE_CPU 1 << 7 61 #endif 62 #if defined(PERF_SAMPLE_PERIOD) || (defined(HAVE_DECL_PERF_SAMPLE_PERIOD) && HAVE_DECL_PERF_SAMPLE_PERIOD) 63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 64 static_assert((PERF_SAMPLE_PERIOD) == (1 << 8), "PERF_SAMPLE_PERIOD != 1 << 8"); 65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 66 #else 67 # define PERF_SAMPLE_PERIOD 1 << 8 68 #endif 69 #if defined(PERF_SAMPLE_STREAM_ID) || (defined(HAVE_DECL_PERF_SAMPLE_STREAM_ID) && HAVE_DECL_PERF_SAMPLE_STREAM_ID) 70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 71 static_assert((PERF_SAMPLE_STREAM_ID) == (1 << 9), "PERF_SAMPLE_STREAM_ID != 1 << 9"); 72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 73 #else 74 # define PERF_SAMPLE_STREAM_ID 1 << 9 75 #endif 76 #if defined(PERF_SAMPLE_RAW) || (defined(HAVE_DECL_PERF_SAMPLE_RAW) && HAVE_DECL_PERF_SAMPLE_RAW) 77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 78 static_assert((PERF_SAMPLE_RAW) == (1 << 10), "PERF_SAMPLE_RAW != 1 << 10"); 79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 80 #else 81 # define PERF_SAMPLE_RAW 1 << 10 82 #endif 83 #if defined(PERF_SAMPLE_BRANCH_STACK) || (defined(HAVE_DECL_PERF_SAMPLE_BRANCH_STACK) && HAVE_DECL_PERF_SAMPLE_BRANCH_STACK) 84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 85 static_assert((PERF_SAMPLE_BRANCH_STACK) == (1 << 11), "PERF_SAMPLE_BRANCH_STACK != 1 << 11"); 86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 87 #else 88 # define PERF_SAMPLE_BRANCH_STACK 1 << 11 89 #endif 90 #if defined(PERF_SAMPLE_REGS_USER) || (defined(HAVE_DECL_PERF_SAMPLE_REGS_USER) && HAVE_DECL_PERF_SAMPLE_REGS_USER) 91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 92 static_assert((PERF_SAMPLE_REGS_USER) == (1 << 12), "PERF_SAMPLE_REGS_USER != 1 << 12"); 93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 94 #else 95 # define PERF_SAMPLE_REGS_USER 1 << 12 96 #endif 97 #if defined(PERF_SAMPLE_STACK_USER) || (defined(HAVE_DECL_PERF_SAMPLE_STACK_USER) && HAVE_DECL_PERF_SAMPLE_STACK_USER) 98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 99 static_assert((PERF_SAMPLE_STACK_USER) == (1 << 13), "PERF_SAMPLE_STACK_USER != 1 << 13"); 100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 101 #else 102 # define PERF_SAMPLE_STACK_USER 1 << 13 103 #endif 104 #if defined(PERF_SAMPLE_WEIGHT) || (defined(HAVE_DECL_PERF_SAMPLE_WEIGHT) && HAVE_DECL_PERF_SAMPLE_WEIGHT) 105 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 106 static_assert((PERF_SAMPLE_WEIGHT) == (1 << 14), "PERF_SAMPLE_WEIGHT != 1 << 14"); 107 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 108 #else 109 # define PERF_SAMPLE_WEIGHT 1 << 14 110 #endif 111 #if defined(PERF_SAMPLE_DATA_SRC) || (defined(HAVE_DECL_PERF_SAMPLE_DATA_SRC) && HAVE_DECL_PERF_SAMPLE_DATA_SRC) 112 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 113 static_assert((PERF_SAMPLE_DATA_SRC) == (1 << 15), "PERF_SAMPLE_DATA_SRC != 1 << 15"); 114 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 115 #else 116 # define PERF_SAMPLE_DATA_SRC 1 << 15 117 #endif 118 #if defined(PERF_SAMPLE_IDENTIFIER) || (defined(HAVE_DECL_PERF_SAMPLE_IDENTIFIER) && HAVE_DECL_PERF_SAMPLE_IDENTIFIER) 119 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 120 static_assert((PERF_SAMPLE_IDENTIFIER) == (1 << 16), "PERF_SAMPLE_IDENTIFIER != 1 << 16"); 121 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 122 #else 123 # define PERF_SAMPLE_IDENTIFIER 1 << 16 124 #endif 125 #if defined(PERF_SAMPLE_TRANSACTION) || (defined(HAVE_DECL_PERF_SAMPLE_TRANSACTION) && HAVE_DECL_PERF_SAMPLE_TRANSACTION) 126 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 127 static_assert((PERF_SAMPLE_TRANSACTION) == (1 << 17), "PERF_SAMPLE_TRANSACTION != 1 << 17"); 128 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 129 #else 130 # define PERF_SAMPLE_TRANSACTION 1 << 17 131 #endif 132 #if defined(PERF_SAMPLE_REGS_INTR) || (defined(HAVE_DECL_PERF_SAMPLE_REGS_INTR) && HAVE_DECL_PERF_SAMPLE_REGS_INTR) 133 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 134 static_assert((PERF_SAMPLE_REGS_INTR) == (1 << 18), "PERF_SAMPLE_REGS_INTR != 1 << 18"); 135 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 136 #else 137 # define PERF_SAMPLE_REGS_INTR 1 << 18 138 #endif 139 #if defined(PERF_SAMPLE_PHYS_ADDR) || (defined(HAVE_DECL_PERF_SAMPLE_PHYS_ADDR) && HAVE_DECL_PERF_SAMPLE_PHYS_ADDR) 140 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 141 static_assert((PERF_SAMPLE_PHYS_ADDR) == (1 << 19), "PERF_SAMPLE_PHYS_ADDR != 1 << 19"); 142 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 143 #else 144 # define PERF_SAMPLE_PHYS_ADDR 1 << 19 145 #endif 146 147 #ifndef XLAT_MACROS_ONLY 148 149 # ifdef IN_MPERS 150 151 # error static const struct xlat perf_event_sample_format in mpers mode 152 153 # else 154 155 static 156 const struct xlat perf_event_sample_format[] = { 157 XLAT(PERF_SAMPLE_IP), 158 XLAT(PERF_SAMPLE_TID), 159 XLAT(PERF_SAMPLE_TIME), 160 XLAT(PERF_SAMPLE_ADDR), 161 XLAT(PERF_SAMPLE_READ), 162 XLAT(PERF_SAMPLE_CALLCHAIN), 163 XLAT(PERF_SAMPLE_ID), 164 XLAT(PERF_SAMPLE_CPU), 165 XLAT(PERF_SAMPLE_PERIOD), 166 XLAT(PERF_SAMPLE_STREAM_ID), 167 XLAT(PERF_SAMPLE_RAW), 168 XLAT(PERF_SAMPLE_BRANCH_STACK), 169 XLAT(PERF_SAMPLE_REGS_USER), 170 XLAT(PERF_SAMPLE_STACK_USER), 171 XLAT(PERF_SAMPLE_WEIGHT), 172 XLAT(PERF_SAMPLE_DATA_SRC), 173 XLAT(PERF_SAMPLE_IDENTIFIER), 174 XLAT(PERF_SAMPLE_TRANSACTION), 175 XLAT(PERF_SAMPLE_REGS_INTR), 176 XLAT(PERF_SAMPLE_PHYS_ADDR), 177 XLAT_END 178 }; 179 180 # endif /* !IN_MPERS */ 181 182 #endif /* !XLAT_MACROS_ONLY */ 183