diff options
Diffstat (limited to 'tools/perf/tests/sample-parsing.c')
| -rw-r--r-- | tools/perf/tests/sample-parsing.c | 18 | 
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index 361714e2583c..3a02426db9a6 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c @@ -2,15 +2,17 @@  #include <stdbool.h>  #include <inttypes.h>  #include <stdlib.h> +#include <string.h>  #include <linux/bitops.h>  #include <linux/kernel.h>  #include <linux/types.h> +#include "map_symbol.h"  #include "branch.h" -#include "util.h"  #include "event.h"  #include "evsel.h"  #include "debug.h" +#include "util/synthetic-events.h"  #include "tests.h" @@ -153,11 +155,13 @@ static bool samples_same(const struct perf_sample *s1,  static int do_test(u64 sample_type, u64 sample_regs, u64 read_format)  { -	struct perf_evsel evsel = { +	struct evsel evsel = {  		.needs_swap = false, -		.attr = { -			.sample_type = sample_type, -			.read_format = read_format, +		.core = { +			. attr = { +				.sample_type = sample_type, +				.read_format = read_format, +			},  		},  	};  	union perf_event *event; @@ -221,10 +225,10 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format)  	int err, ret = -1;  	if (sample_type & PERF_SAMPLE_REGS_USER) -		evsel.attr.sample_regs_user = sample_regs; +		evsel.core.attr.sample_regs_user = sample_regs;  	if (sample_type & PERF_SAMPLE_REGS_INTR) -		evsel.attr.sample_regs_intr = sample_regs; +		evsel.core.attr.sample_regs_intr = sample_regs;  	for (i = 0; i < sizeof(regs); i++)  		*(i + (u8 *)regs) = i & 0xfe;  | 
