diff options
author | Serhei Makarov <serhei@serhei.io> | 2024-01-26 12:50:40 -0500 |
---|---|---|
committer | Serhei Makarov <serhei@serhei.io> | 2024-01-26 12:50:40 -0500 |
commit | fe8100fc7b229a2eca32510489e5242072d29ad3 (patch) | |
tree | 90a7e5c7d75c90089b76aab6569b4caa2707579b | |
parent | 5a33d32b61c59bd06684b046d59e79b0322e1adc (diff) |
eu-stacktrace WIP: additional tweak to diagnostics
-rw-r--r-- | src/stacktrace.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/stacktrace.c b/src/stacktrace.c index 3078fc3e..6519915b 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) { |