]> git.ipfire.org Git - thirdparty/elfutils.git/commit
eu-stacktrace [10/12]: use dwflst_tracker_find_pid
authorSerhei Makarov <serhei@serhei.io>
Wed, 23 Apr 2025 00:08:06 +0000 (20:08 -0400)
committerSerhei Makarov <serhei@serhei.io>
Fri, 25 Apr 2025 14:15:34 +0000 (10:15 -0400)
commit7738d9ef305033fd1078d952bba9370915830f79
treeb25397bb4adfb8daa204a98de16226ba4dae94ec
parentbce66f1c8e3360df1e3b8787d9e38eaf2fa32499
eu-stacktrace [10/12]: use dwflst_tracker_find_pid

Changes for v6:

- Minor fixes as requested.

Changes for v4:

- Separate out libdwfl_stacktrace, as requested.

* * *

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.
src/stacktrace.c