HomePhabricator

Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)
AuditedrL365911

Description

Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)

Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what
long-running jobs are doing, as inspired by BSD tools (including on
macOS), by dumping the current PrettyStackTrace.

This adds a new kind of signal handler for non-fatal "info" signals,
similar to the "interrupt" handler that already exists for SIGINT
(Ctrl-C). It then uses that handler to update a "generation count"
managed by the PrettyStackTrace infrastructure, which is then checked
whenever a PrettyStackTraceEntry is pushed or popped on each
thread. If the generation has changed---i.e. if the user has pressed
Ctrl-T---the stack trace is dumped, though unfortunately it can't
include the deepest entry because that one is currently being
constructed/destructed.

https://reviews.llvm.org/D63750

Details

Auditors
dnsampaio
Committed
jroseJul 12 2019, 9:05 AM
Parents
rL365910: [AMDGPU] Fix DPP combiner check for exec modification
Branches
Unknown
Tags
Unknown

Event Timeline

dnsampaio raised a concern with this commit.Jul 12 2019, 9:19 AM
dnsampaio added a subscriber: dnsampaio.

I am getting this error with gcc 8.2

/work/bf/LLVM/local/src/lib/Support/PrettyStackTrace.cpp:57:39: error: variable ‘volatile std::atomic<unsigned int> GlobalSigInfoGenerationCounter’ has initializer but incomplete type
 static volatile std::atomic<unsigned> GlobalSigInfoGenerationCounter =
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit now has outstanding concerns.Jul 12 2019, 9:19 AM
dnsampaio accepted this commit.Jul 12 2019, 9:25 AM

Was fixed just after if the include <atomic>

All concerns with this commit have now been addressed.Jul 12 2019, 9:25 AM