#include <stdbool.h>
#include <inttypes.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include "util.h"
#include "event.h"
#include "evsel.h"
#include "debug.h"
#include "tests.h"
Go to the source code of this file.
◆ COMP
Value:do { \
if (s1->m != s2->m) { \
pr_debug(
"Samples differ at '"#
m"'\n"); \
return false; \
} \
} while (0)
Definition at line 14 of file sample-parsing.c.
◆ MCOMP
Value:do { \
if (memcmp(&s1->m, &s2->m, sizeof(s1->m))) { \
pr_debug(
"Samples differ at '"#
m"'\n"); \
return false; \
} \
} while (0)
Definition at line 21 of file sample-parsing.c.
◆ do_test()
static int do_test |
( |
u64 |
sample_type, |
|
|
u64 |
sample_regs, |
|
|
u64 |
read_format |
|
) |
| |
|
static |
◆ samples_same()
static bool samples_same |
( |
const struct perf_sample * |
s1, |
|
|
const struct perf_sample * |
s2, |
|
|
u64 |
type, |
|
|
u64 |
read_format |
|
) |
| |
|
static |
◆ test__sample_parsing()
int test__sample_parsing |
( |
struct test *test |
__maybe_unused, |
|
|
int subtest |
__maybe_unused |
|
) |
| |
test__sample_parsing - test sample parsing.
This function implements a test that synthesizes a sample event, parses it and then checks that the parsed sample matches the original sample. The test checks sample format bits separately and together. If the test passes %0 is returned, otherwise %-1 is returned.
Definition at line 300 of file sample-parsing.c.