perf debug: Remove needless include directives from debug.h
[linux-2.6-block.git] / tools / perf / tests / sample-parsing.c
index 361714e2583c79db81c1217f410ed826af9c0ecc..0c09dc15a059b907faea1628eab0eb2812afa856 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdbool.h>
 #include <inttypes.h>
 #include <stdlib.h>
+#include <string.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -153,11 +154,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 +224,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;