C++程序  |  55行  |  1.83 KB

/* Generated by ./xlat/gen.sh from ./xlat/perf_event_read_format.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(PERF_FORMAT_TOTAL_TIME_ENABLED) || (defined(HAVE_DECL_PERF_FORMAT_TOTAL_TIME_ENABLED) && HAVE_DECL_PERF_FORMAT_TOTAL_TIME_ENABLED)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((PERF_FORMAT_TOTAL_TIME_ENABLED) == (1 << 0), "PERF_FORMAT_TOTAL_TIME_ENABLED != 1 << 0");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define PERF_FORMAT_TOTAL_TIME_ENABLED 1 << 0
#endif
#if defined(PERF_FORMAT_TOTAL_TIME_RUNNING) || (defined(HAVE_DECL_PERF_FORMAT_TOTAL_TIME_RUNNING) && HAVE_DECL_PERF_FORMAT_TOTAL_TIME_RUNNING)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((PERF_FORMAT_TOTAL_TIME_RUNNING) == (1 << 1), "PERF_FORMAT_TOTAL_TIME_RUNNING != 1 << 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define PERF_FORMAT_TOTAL_TIME_RUNNING 1 << 1
#endif
#if defined(PERF_FORMAT_ID) || (defined(HAVE_DECL_PERF_FORMAT_ID) && HAVE_DECL_PERF_FORMAT_ID)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((PERF_FORMAT_ID) == (1 << 2), "PERF_FORMAT_ID != 1 << 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define PERF_FORMAT_ID 1 << 2
#endif
#if defined(PERF_FORMAT_GROUP) || (defined(HAVE_DECL_PERF_FORMAT_GROUP) && HAVE_DECL_PERF_FORMAT_GROUP)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((PERF_FORMAT_GROUP) == (1 << 3), "PERF_FORMAT_GROUP != 1 << 3");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define PERF_FORMAT_GROUP 1 << 3
#endif

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat perf_event_read_format in mpers mode

# else

static
const struct xlat perf_event_read_format[] = {
 XLAT(PERF_FORMAT_TOTAL_TIME_ENABLED),
 XLAT(PERF_FORMAT_TOTAL_TIME_RUNNING),
 XLAT(PERF_FORMAT_ID),
 XLAT(PERF_FORMAT_GROUP),
 XLAT_END
};

# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */