1 /* Generated by ./xlat/gen.sh from ./xlat/perf_event_read_format.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(PERF_FORMAT_TOTAL_TIME_ENABLED) || (defined(HAVE_DECL_PERF_FORMAT_TOTAL_TIME_ENABLED) && HAVE_DECL_PERF_FORMAT_TOTAL_TIME_ENABLED) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((PERF_FORMAT_TOTAL_TIME_ENABLED) == (1 << 0), "PERF_FORMAT_TOTAL_TIME_ENABLED != 1 << 0"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define PERF_FORMAT_TOTAL_TIME_ENABLED 1 << 0 12 #endif 13 #if defined(PERF_FORMAT_TOTAL_TIME_RUNNING) || (defined(HAVE_DECL_PERF_FORMAT_TOTAL_TIME_RUNNING) && HAVE_DECL_PERF_FORMAT_TOTAL_TIME_RUNNING) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((PERF_FORMAT_TOTAL_TIME_RUNNING) == (1 << 1), "PERF_FORMAT_TOTAL_TIME_RUNNING != 1 << 1"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define PERF_FORMAT_TOTAL_TIME_RUNNING 1 << 1 19 #endif 20 #if defined(PERF_FORMAT_ID) || (defined(HAVE_DECL_PERF_FORMAT_ID) && HAVE_DECL_PERF_FORMAT_ID) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((PERF_FORMAT_ID) == (1 << 2), "PERF_FORMAT_ID != 1 << 2"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define PERF_FORMAT_ID 1 << 2 26 #endif 27 #if defined(PERF_FORMAT_GROUP) || (defined(HAVE_DECL_PERF_FORMAT_GROUP) && HAVE_DECL_PERF_FORMAT_GROUP) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((PERF_FORMAT_GROUP) == (1 << 3), "PERF_FORMAT_GROUP != 1 << 3"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define PERF_FORMAT_GROUP 1 << 3 33 #endif 34 35 #ifndef XLAT_MACROS_ONLY 36 37 # ifdef IN_MPERS 38 39 # error static const struct xlat perf_event_read_format in mpers mode 40 41 # else 42 43 static 44 const struct xlat perf_event_read_format[] = { 45 XLAT(PERF_FORMAT_TOTAL_TIME_ENABLED), 46 XLAT(PERF_FORMAT_TOTAL_TIME_RUNNING), 47 XLAT(PERF_FORMAT_ID), 48 XLAT(PERF_FORMAT_GROUP), 49 XLAT_END 50 }; 51 52 # endif /* !IN_MPERS */ 53 54 #endif /* !XLAT_MACROS_ONLY */ 55