Fix SIGINFO stack collection to ignore threads with swapped-out stacks.
We by definition cannot trace the stack of such a thread. Also remove a redundant stack_zero() call in the SIGINFO handler, the stack structure is cleared by the MD stack_capture(). Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
d8d5f03610
commit
5d3bd9e242
@ -338,8 +338,9 @@ tty_info(struct tty *tp)
|
||||
pctcpu = (sched_pctcpu(td) * 10000 + FSCALE / 2) >> FSHIFT;
|
||||
#ifdef STACK
|
||||
if (tty_info_kstacks) {
|
||||
stack_zero(&stack);
|
||||
if (TD_IS_SWAPPED(td) || TD_IS_RUNNING(td))
|
||||
if (TD_IS_SWAPPED(td))
|
||||
sterr = ENOENT;
|
||||
else if (TD_IS_RUNNING(td))
|
||||
sterr = stack_save_td_running(&stack, td);
|
||||
else {
|
||||
stack_save_td(&stack, td);
|
||||
|
Loading…
x
Reference in New Issue
Block a user