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

Initial minimal change to ensure dwflst_tracker_find_pid is
tested. For now, we keep the additional dwfltab implementation in
stacktrace.c, since it's being used to track statistics.

In future follow-ups, it will be good to switch to storing
eu-stacktrace statistics e.g. in dwfl->process->callbacks_arg. This
requires some additional design to keep the statistics from being lost
when a pid is reused and the corresponding processtracker table entry
is replaced.

* src/stacktrace.c (sysprof_init_dwfl): New function.
  (sysprof_find_dwfl): Rename the existing sysprof_init_dwfl.
  Also use dwflst_tracker_find_pid with callback.
  (sysprof_unwind_cb): Rename the existing sysprof_init_dwfl.

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