3 #include "linux/perf_event.h" 8 static int check(
union perf_mem_data_src data_src,
19 scnprintf(failure,
sizeof failure,
"unexpected %s", out);
24 int test__mem(
struct test *text __maybe_unused,
int subtest __maybe_unused)
27 union perf_mem_data_src src;
29 memset(&src, 0,
sizeof(src));
31 src.mem_lvl = PERF_MEM_LVL_HIT;
34 ret |=
check(src,
"N/AL4 hit");
38 ret |=
check(src,
"N/ARemote L4 hit");
40 src.mem_lvl = PERF_MEM_LVL_MISS;
41 src.mem_lvl_num = PERF_MEM_LVLNUM_PMEM;
44 ret |=
check(src,
"N/APMEM miss");
48 ret |=
check(src,
"N/ARemote PMEM miss");
50 src.mem_snoopx = PERF_MEM_SNOOPX_FWD;
51 src.mem_lvl_num = PERF_MEM_LVLNUM_RAM;
53 ret |=
check(src ,
"FwdRemote RAM miss");
#define TEST_ASSERT_VAL(text, cond)
x86 movsq based memset() in arch/x86/lib/memset_64.S") MEMSET_FN(memset_erms
int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
union perf_mem_data_src data_src
int test__mem(struct test *text __maybe_unused, int subtest __maybe_unused)
static int check(union perf_mem_data_src data_src, const char *string)