7 #include <linux/kernel.h> 14 {
"krava01",
"config:0-1,62-63\n", },
15 {
"krava02",
"config:10-17\n", },
16 {
"krava03",
"config:5\n", },
17 {
"krava11",
"config1:0,2,4,6,8,20-28\n", },
18 {
"krava12",
"config1:63\n", },
19 {
"krava13",
"config1:45-47\n", },
20 {
"krava21",
"config2:0-3,10-13,20-23,30-33,40-43,50-53,60-63\n", },
21 {
"krava22",
"config2:8,18,48,58\n", },
22 {
"krava23",
"config2:28-29,38\n", },
28 .
config = (
char *)
"krava01",
34 .config = (
char *)
"krava02",
40 .config = (
char *)
"krava03",
46 .config = (
char *)
"krava11",
52 .config = (
char *)
"krava12",
58 .config = (
char *)
"krava13",
64 .config = (
char *)
"krava21",
70 .config = (
char *)
"krava22",
76 .config = (
char *)
"krava23",
92 snprintf(dir,
PATH_MAX,
"/tmp/perf-pmu-test-format-XXXXXX");
103 file = fopen(name,
"w");
107 if (1 != fwrite(format->
value, strlen(format->
value), 1, file))
120 snprintf(buf,
PATH_MAX,
"rm -f %s/*\n", dir);
124 snprintf(buf,
PATH_MAX,
"rmdir %s\n", dir);
133 for (i = 0; i < ARRAY_SIZE(test_terms); i++)
134 list_add_tail(&test_terms[i].list, &terms);
150 struct perf_event_attr attr;
152 memset(&attr, 0,
sizeof(attr));
165 if (attr.config != 0xc00000000002a823)
167 if (attr.config1 != 0x8000400000000145)
169 if (attr.config2 != 0x0400000020041d07)
int perf_pmu__format_parse(char *dir, struct list_head *head)
int test__pmu(struct test *test __maybe_unused, int subtest __maybe_unused)
static char * test_format_dir_get(void)
static struct test_format test_formats[]
static int test_format_dir_put(char *dir)
x86 movsq based memset() in arch/x86/lib/memset_64.S") MEMSET_FN(memset_erms
union parse_events_term::@132 val
static struct list_head * test_terms_list(void)
int perf_pmu__config_terms(struct list_head *formats, struct perf_event_attr *attr, struct list_head *head_terms, bool zero, struct parse_events_error *err)
static struct parse_events_term test_terms[]