From: Serhei Makarov Date: Fri, 26 Jan 2024 17:50:40 +0000 (-0500) Subject: eu-stacktrace WIP: additional tweak to diagnostics X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe8100fc7b229a2eca32510489e5242072d29ad3;p=thirdparty%2Felfutils.git eu-stacktrace WIP: additional tweak to diagnostics --- diff --git a/src/stacktrace.c b/src/stacktrace.c index 3078fc3e8..6519915bf 100644 --- a/src/stacktrace.c +++ b/src/stacktrace.c @@ -1016,7 +1016,13 @@ sysprof_unwind_frame_cb (Dwfl_Frame *state, void *arg) sui->n_addrs, pc_adjusted, sui->last_base, sp - sui->last_base); if (sui->n_addrs > maxframes) - return DWARF_CB_ABORT; + { + /* XXX very rarely, the unwinder can loop infinitely; worth investigating? */ + if (show_failures) + fprintf(stderr, "sysprof_unwind_frame_cb: sample exceeded maxframes %d\n", + maxframes); + return DWARF_CB_ABORT; + } sui->last_sp = sp; if (sui->n_addrs >= sui->max_addrs) @@ -1097,8 +1103,6 @@ sysprof_unwind_cb (SysprofCaptureFrame *frame, void *arg) { fprintf(stderr, "sysprof_unwind_cb pid %lld (%s): unwound %d frames\n", (long long)frame->pid, comm, sui->n_addrs); - fprintf(stderr, "DEBUG last_sp=%lx frame_depth=%ld\n", - sui->last_sp, sui->last_sp - sui->last_base); /* TODO */ } if (show_summary) {