tty: Default to printing kernel stack traceback only on INVARIANT kernels

Change the default from printing a breif kernel thread stack informaton
back to omitting it for non-invariant kernels in response to
SIGINFO/^T. Full and brief stack support can be selected with the
kern.tty_info_kstacks sysctl.

MFC After:		2 weeks
Sponsored by:		Netflix
Reviewed by:		grembo, jhb
Differential Revision:	https://reviews.freebsd.org/D35576
This commit is contained in:
Warner Losh 2022-06-29 08:26:58 -06:00
parent 836d47d38e
commit b69996d1d5

View File

@ -239,7 +239,11 @@ sbuf_tty_drain(void *a, const char *d, int len)
}
#ifdef STACK
#ifdef INVARIANTS
static int tty_info_kstacks = STACK_SBUF_FMT_COMPACT;
#else
static int tty_info_kstacks = STACK_SBUF_FMT_NONE;
#endif
static int
sysctl_tty_info_kstacks(SYSCTL_HANDLER_ARGS)