]> git.ipfire.org Git - thirdparty/elfutils.git/commit
eu-stacktrace [12/12]: use dwflst_perf_sample_getframes
authorSerhei Makarov <serhei@serhei.io>
Fri, 25 Apr 2025 14:55:54 +0000 (10:55 -0400)
committerAaron Merey <amerey@redhat.com>
Fri, 25 Apr 2025 15:56:28 +0000 (11:56 -0400)
commit8aea98a5355d4c42e339ed508813920db0174940
tree3be1d14c0469d7c43117726755d3aed393e6b6e4
parentd315c09d3d3a104caf861ebf9615fb66ad84a4b7
eu-stacktrace [12/12]: use dwflst_perf_sample_getframes

Remove the code from src/stacktrace.c that is now covered by
libdwfl_stacktrace/dwflst_perf_frame.c and
dwflst_perf_sample_getframes.

* src/stacktrace.c (show_memory_reads): Remove this verbose option as
  the relevant code is inside libdwfl_stacktrace now.
  (struct __sample_arg): Remove, handled by
  libdwfl_stacktrace/dwflst_perf_frame.c.
  (sample_next_thread): Ditto.
  (sample_getthread): Ditto.
  (copy_word_64): Ditto.
  (copy_word_32): Ditto.
  (elf_memory_read): Ditto.
  (sample_memory_read): Ditto.
  (sample_set_initial_registers): Ditto.
  (sample_detach): Ditto.
  (sample_thread_callbacks): Ditto.
  (sysprof_find_dwfl): Now also return the Elf* so that it can be
  passed to dwflst_perf_sample_getframes. Don't create sample_arg.  Do
  record sp in sui->last_sp. Don't dwfl_attach_state,
  dwflst_perf_sample_getframes handles that now.
  (sysprof_unwind_cb): Adapt to sysprof_find_dwfl changes,
  now invoke dwflst_perf_sample_getframes instead of
  dwfl_getthread_frames.
  (parse_opt): Remove show_memory_reads.
  (main): Remove show_memory_reads.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
src/stacktrace.c