mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
fa7095c5c3
Commit Fixes:b9f6fbb3b2
("perf arm64: Inject missing frames when using 'perf record --call-graph=fp'") intended to add a 'best effort' DWARF unwind that improved the frame pointer stack in most scenarios. It's expected that the unwind will fail sometimes, but this shouldn't be reported as an error. It only works when the return address can be determined from the contents of the link register alone. Fix the error shown when the unwinder requires extra registers by adding a new flag that suppresses error messages. This flag is not set in the normal --call-graph=dwarf unwind mode so that behavior is not changed. Fixes:b9f6fbb3b2
("perf arm64: Inject missing frames when using 'perf record --call-graph=fp'") Reported-by: John Garry <john.garry@huawei.com> Signed-off-by: James Clark <james.clark@arm.com> Tested-by: John Garry <john.garry@huawei.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexandre Truong <alexandre.truong@arm.com> Cc: German Gomez <german.gomez@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20220406145651.1392529-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
28 lines
574 B
C
28 lines
574 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __PERF_UNWIND_LIBDW_H
|
|
#define __PERF_UNWIND_LIBDW_H
|
|
|
|
#include <elfutils/libdwfl.h>
|
|
#include "unwind.h"
|
|
|
|
struct machine;
|
|
struct perf_sample;
|
|
struct thread;
|
|
|
|
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg);
|
|
|
|
struct unwind_info {
|
|
Dwfl *dwfl;
|
|
struct perf_sample *sample;
|
|
struct machine *machine;
|
|
struct thread *thread;
|
|
unwind_entry_cb_t cb;
|
|
void *arg;
|
|
int max_stack;
|
|
int idx;
|
|
bool best_effort;
|
|
struct unwind_entry entries[];
|
|
};
|
|
|
|
#endif /* __PERF_UNWIND_LIBDW_H */
|