]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
eu-stacktrace fixup: count samples where sysprof_init_dwfl failed
authorSerhei Makarov <serhei@serhei.io>
Thu, 22 Aug 2024 22:08:49 +0000 (18:08 -0400)
committerSerhei Makarov <serhei@serhei.io>
Thu, 22 Aug 2024 22:12:28 +0000 (18:12 -0400)
src/stacktrace.c

index 9b24b47356b632affc80944398677855457b37b5..dccde2b87927427726fa72a28be7a833a47bb494 100644 (file)
@@ -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);