mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
perf tools: Fix compile error on sample->user_regs
It's recently changed to allocate dynamically but misses to update some
arch-dependent codes to use perf_sample__user_regs().
Fixes: dc6d2bc2d8 ("perf sample: Make user_regs and intr_regs optional")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250214191641.756664-1-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
d18c882f85
commit
20600b8aab
8 changed files with 8 additions and 8 deletions
|
|
@ -45,7 +45,7 @@ static int sample_ustack(struct perf_sample *sample,
|
|||
int test__arch_unwind_sample(struct perf_sample *sample,
|
||||
struct thread *thread)
|
||||
{
|
||||
struct regs_dump *regs = &sample->user_regs;
|
||||
struct regs_dump *regs = perf_sample__user_regs(sample);
|
||||
u64 *buf;
|
||||
|
||||
buf = calloc(1, sizeof(u64) * PERF_REGS_MAX);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
|
||||
{
|
||||
struct unwind_info *ui = arg;
|
||||
struct regs_dump *user_regs = &ui->sample->user_regs;
|
||||
struct regs_dump *user_regs = perf_sample__user_regs(ui->sample);
|
||||
Dwarf_Word dwarf_regs[PERF_REG_ARM_MAX];
|
||||
|
||||
#define REG(r) ({ \
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
|
||||
{
|
||||
struct unwind_info *ui = arg;
|
||||
struct regs_dump *user_regs = &ui->sample->user_regs;
|
||||
struct regs_dump *user_regs = perf_sample__user_regs(ui->sample);
|
||||
Dwarf_Word dwarf_regs[PERF_REG_CSKY_MAX];
|
||||
|
||||
#define REG(r) ({ \
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
|
||||
{
|
||||
struct unwind_info *ui = arg;
|
||||
struct regs_dump *user_regs = &ui->sample->user_regs;
|
||||
struct regs_dump *user_regs = perf_sample__user_regs(ui->sample);
|
||||
Dwarf_Word dwarf_regs[PERF_REG_LOONGARCH_MAX];
|
||||
|
||||
#define REG(r) ({ \
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ static int sample_ustack(struct perf_sample *sample,
|
|||
int test__arch_unwind_sample(struct perf_sample *sample,
|
||||
struct thread *thread)
|
||||
{
|
||||
struct regs_dump *regs = &sample->user_regs;
|
||||
struct regs_dump *regs = perf_sample__user_regs(sample);
|
||||
u64 *buf;
|
||||
|
||||
buf = calloc(1, sizeof(u64) * PERF_REGS_MAX);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ static const int special_regs[3][2] = {
|
|||
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
|
||||
{
|
||||
struct unwind_info *ui = arg;
|
||||
struct regs_dump *user_regs = &ui->sample->user_regs;
|
||||
struct regs_dump *user_regs = perf_sample__user_regs(ui->sample);
|
||||
Dwarf_Word dwarf_regs[32], dwarf_nip;
|
||||
size_t i;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
|
||||
{
|
||||
struct unwind_info *ui = arg;
|
||||
struct regs_dump *user_regs = &ui->sample->user_regs;
|
||||
struct regs_dump *user_regs = perf_sample__user_regs(ui->sample);
|
||||
Dwarf_Word dwarf_regs[32];
|
||||
|
||||
#define REG(r) ({ \
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
|
||||
{
|
||||
struct unwind_info *ui = arg;
|
||||
struct regs_dump *user_regs = &ui->sample->user_regs;
|
||||
struct regs_dump *user_regs = perf_sample__user_regs(ui->sample);
|
||||
Dwarf_Word dwarf_regs[ARRAY_SIZE(s390_dwarf_regs)];
|
||||
|
||||
#define REG(r) ({ \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue