Lines Matching +full:comp +full:- +full:int
1 // SPDX-License-Identifier: GPL-2.0
15 #include "util/synthetic-events.h"
20 #define COMP(m) do { \ macro
21 if (s1->m != s2->m) { \
28 if (memcmp(&s1->m, &s2->m, sizeof(s1->m))) { \
41 #define FLAG(s) s->branch_stack->entries[i].flags
50 COMP(id); in samples_same()
53 COMP(ip); in samples_same()
56 COMP(pid); in samples_same()
57 COMP(tid); in samples_same()
61 COMP(time); in samples_same()
64 COMP(addr); in samples_same()
67 COMP(id); in samples_same()
70 COMP(stream_id); in samples_same()
73 COMP(cpu); in samples_same()
76 COMP(period); in samples_same()
80 COMP(read.group.nr); in samples_same()
82 COMP(read.one.value); in samples_same()
84 COMP(read.time_enabled); in samples_same()
86 COMP(read.time_running); in samples_same()
89 for (i = 0; i < s1->read.group.nr; i++) { in samples_same()
95 COMP(read.one.id); in samples_same()
97 COMP(read.one.lost); in samples_same()
102 COMP(callchain->nr); in samples_same()
103 for (i = 0; i < s1->callchain->nr; i++) in samples_same()
104 COMP(callchain->ips[i]); in samples_same()
108 COMP(raw_size); in samples_same()
109 if (memcmp(s1->raw_data, s2->raw_data, s1->raw_size)) { in samples_same()
116 COMP(branch_stack->nr); in samples_same()
117 COMP(branch_stack->hw_idx); in samples_same()
118 for (i = 0; i < s1->branch_stack->nr; i++) { in samples_same()
124 MCOMP(branch_stack->entries[i]); in samples_same()
129 size_t sz = hweight_long(s1->user_regs.mask) * sizeof(u64); in samples_same()
131 COMP(user_regs.mask); in samples_same()
132 COMP(user_regs.abi); in samples_same()
133 if (s1->user_regs.abi && in samples_same()
134 (!s1->user_regs.regs || !s2->user_regs.regs || in samples_same()
135 memcmp(s1->user_regs.regs, s2->user_regs.regs, sz))) { in samples_same()
142 COMP(user_stack.size); in samples_same()
143 if (memcmp(s1->user_stack.data, s2->user_stack.data, in samples_same()
144 s1->user_stack.size)) { in samples_same()
151 COMP(weight); in samples_same()
154 COMP(data_src); in samples_same()
157 COMP(transaction); in samples_same()
160 size_t sz = hweight_long(s1->intr_regs.mask) * sizeof(u64); in samples_same()
162 COMP(intr_regs.mask); in samples_same()
163 COMP(intr_regs.abi); in samples_same()
164 if (s1->intr_regs.abi && in samples_same()
165 (!s1->intr_regs.regs || !s2->intr_regs.regs || in samples_same()
166 memcmp(s1->intr_regs.regs, s2->intr_regs.regs, sz))) { in samples_same()
173 COMP(phys_addr); in samples_same()
176 COMP(cgroup); in samples_same()
179 COMP(data_page_size); in samples_same()
182 COMP(code_page_size); in samples_same()
185 COMP(aux_sample.size); in samples_same()
186 if (memcmp(s1->aux_sample.data, s2->aux_sample.data, in samples_same()
187 s1->aux_sample.size)) { in samples_same()
196 static int do_test(u64 sample_type, u64 sample_regs, u64 read_format) in do_test()
220 .data = {1, -1ULL, 211, 212, 213}, in do_test()
274 int err, ret = -1; in do_test()
302 return -1; in do_test()
306 event->header.type = PERF_RECORD_SAMPLE; in do_test()
307 event->header.misc = 0; in do_test()
308 event->header.size = sz; in do_test()
319 for (i = bufsz; i > 0; i--) { in do_test()
320 if (*(i - 1 + (u8 *)event) != 0xff) in do_test()
370 * test__sample_parsing - test sample parsing.
375 * returned, otherwise %-1 is returned.
377 static int test__sample_parsing(struct test_suite *test __maybe_unused, int subtest __maybe_unused) in test__sample_parsing()
383 int err; in test__sample_parsing()
391 …pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updatin… in test__sample_parsing()
392 return -1; in test__sample_parsing()
425 sample_type = (PERF_SAMPLE_MAX - 1) & ~PERF_SAMPLE_WEIGHT; in test__sample_parsing()