From b998344b386f770d6e146457eb0fa96830cda42d Mon Sep 17 00:00:00 2001 From: Serhei Makarov Date: Thu, 22 Aug 2024 18:08:49 -0400 Subject: [PATCH] eu-stacktrace fixup: count samples where sysprof_init_dwfl failed --- src/stacktrace.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stacktrace.c b/src/stacktrace.c index 9b24b473..dccde2b8 100644 --- a/src/stacktrace.c +++ b/src/stacktrace.c @@ -1138,6 +1138,12 @@ sysprof_unwind_cb (SysprofCaptureFrame *frame, void *arg) Dwfl *dwfl = sysprof_init_dwfl (sui, ev, regs); if (dwfl == NULL) { + if (show_summary) + { + dwfltab_ent *dwfl_ent = dwfltab_find(frame->pid); + dwfl_ent->total_samples++; + dwfl_ent->lost_samples++; + } if (show_failures) fprintf(stderr, "sysprof_init_dwfl pid %lld (%s) (failed)\n", (long long)frame->pid, comm); -- 2.47.2