From 2f7c68cb55ecb7331f2381deb497c27155f32faf Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 03 Jan 2024 09:43:39 +0000 Subject: [PATCH] update kernel to 5.10.198 --- kernel/tools/perf/tests/dwarf-unwind.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kernel/tools/perf/tests/dwarf-unwind.c b/kernel/tools/perf/tests/dwarf-unwind.c index 2f00806..8363809 100644 --- a/kernel/tools/perf/tests/dwarf-unwind.c +++ b/kernel/tools/perf/tests/dwarf-unwind.c @@ -1,7 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include <linux/types.h> +#include <linux/zalloc.h> #include <inttypes.h> +#include <limits.h> #include <unistd.h> #include "tests.h" #include "debug.h" @@ -10,8 +12,10 @@ #include "../util/unwind.h" #include "perf_regs.h" #include "map.h" +#include "symbol.h" #include "thread.h" #include "callchain.h" +#include "util/synthetic-events.h" #if defined (__x86_64__) || defined (__i386__) || defined (__powerpc__) #include "arch-tests.h" @@ -33,8 +37,9 @@ union perf_event event; pid_t pid = getpid(); + memset(&event, 0, sizeof(event)); return perf_event__synthesize_mmap_events(NULL, &event, pid, pid, - mmap_handler, machine, true, 500); + mmap_handler, machine, true); } /* @@ -55,7 +60,7 @@ static int unwind_entry(struct unwind_entry *entry, void *arg) { unsigned long *cnt = (unsigned long *) arg; - char *symbol = entry->sym ? entry->sym->name : NULL; + char *symbol = entry->ms.sym ? entry->ms.sym->name : NULL; static const char *funcs[MAX_STACK] = { "test__arch_unwind_sample", "test_dwarf_unwind__thread", @@ -114,8 +119,8 @@ } out: - free(sample.user_stack.data); - free(sample.user_regs.regs); + zfree(&sample.user_stack.data); + zfree(&sample.user_regs.regs); return err; } -- Gitblit v1.6.2