• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/perf_hw_cache_op_id.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(PERF_COUNT_HW_CACHE_OP_READ) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_OP_READ) && HAVE_DECL_PERF_COUNT_HW_CACHE_OP_READ)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((PERF_COUNT_HW_CACHE_OP_READ) == (0), "PERF_COUNT_HW_CACHE_OP_READ != 0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define PERF_COUNT_HW_CACHE_OP_READ 0
12 #endif
13 #if defined(PERF_COUNT_HW_CACHE_OP_WRITE) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_OP_WRITE) && HAVE_DECL_PERF_COUNT_HW_CACHE_OP_WRITE)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((PERF_COUNT_HW_CACHE_OP_WRITE) == (1), "PERF_COUNT_HW_CACHE_OP_WRITE != 1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define PERF_COUNT_HW_CACHE_OP_WRITE 1
19 #endif
20 #if defined(PERF_COUNT_HW_CACHE_OP_PREFETCH) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_OP_PREFETCH) && HAVE_DECL_PERF_COUNT_HW_CACHE_OP_PREFETCH)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((PERF_COUNT_HW_CACHE_OP_PREFETCH) == (2), "PERF_COUNT_HW_CACHE_OP_PREFETCH != 2");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define PERF_COUNT_HW_CACHE_OP_PREFETCH 2
26 #endif
27 
28 #ifndef XLAT_MACROS_ONLY
29 
30 # ifdef IN_MPERS
31 
32 #  error static const struct xlat perf_hw_cache_op_id in mpers mode
33 
34 # else
35 
36 static
37 const struct xlat perf_hw_cache_op_id[] = {
38 
39  XLAT(PERF_COUNT_HW_CACHE_OP_READ),
40  XLAT(PERF_COUNT_HW_CACHE_OP_WRITE),
41  XLAT(PERF_COUNT_HW_CACHE_OP_PREFETCH),
42  XLAT_END
43 };
44 
45 # endif /* !IN_MPERS */
46 
47 #endif /* !XLAT_MACROS_ONLY */
48