Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf unwind-libdw: Wire up e_flags for CSKY

Wire up the e_flags now it can be read for a thread. The e_flags
encode the CSKY ABI level and this can impact which perf registers
need setting up for unwinding.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Aditya Bodkhe <aditya.b1@linux.ibm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: Chun-Tse Shao <ctshao@google.com>
Cc: Guo Ren <guoren@kernel.org>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sergei Trofimovich <slyich@gmail.com>
Cc: Shimin Guo <shimin.guo@skydio.com>
Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: Swapnil Sapkal <swapnil.sapkal@amd.com>
Cc: Tianyou Li <tianyou.li@intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
2becdd16 0403930f

+6 -4
+5 -4
tools/perf/util/unwind-libdw.c
··· 213 213 { 214 214 struct dwfl_ui_thread_info *dwfl_ui_ti = arg; 215 215 struct unwind_info *ui = dwfl_ui_ti->ui; 216 - uint16_t e_machine = thread__e_machine(ui->thread, ui->machine, /*e_flags=*/NULL); 217 216 struct stack_dump *stack = &ui->sample->user_stack; 218 217 u64 start, end; 219 218 int offset; ··· 222 223 return false; 223 224 224 225 ret = perf_reg_value(&start, ui->sample->user_regs, 225 - perf_arch_reg_sp(e_machine)); 226 + perf_arch_reg_sp(ui->e_machine)); 226 227 if (ret) 227 228 return false; 228 229 ··· 259 260 int max_dwarf_reg = 0; 260 261 bool ret; 261 262 uint16_t e_machine = ui->e_machine; 262 - int e_flags = 0; 263 + int e_flags = ui->e_flags; 263 264 uint64_t ip_perf_reg = perf_arch_reg_ip(e_machine); 264 265 Dwarf_Word val = 0; 265 266 ··· 347 348 { 348 349 struct maps *maps = thread__maps(thread); 349 350 struct machine *machine = maps__machine(maps); 350 - uint16_t e_machine = thread__e_machine(thread, machine, /*e_flags=*/NULL); 351 + uint32_t e_flags = 0; 352 + uint16_t e_machine = thread__e_machine(thread, machine, &e_flags); 351 353 struct dwfl_ui_thread_info *dwfl_ui_ti; 352 354 static struct unwind_info *ui; 353 355 Dwfl *dwfl; ··· 370 370 .arg = arg, 371 371 .max_stack = max_stack, 372 372 .e_machine = e_machine, 373 + .e_flags = e_flags, 373 374 .best_effort = best_effort 374 375 }; 375 376
+1
tools/perf/util/unwind-libdw.h
··· 20 20 void *arg; 21 21 int max_stack; 22 22 int idx; 23 + uint32_t e_flags; 23 24 uint16_t e_machine; 24 25 bool best_effort; 25 26 struct unwind_entry entries[];