Print td_name instead of p_comm if td_name is non-empty for

'show turnstile' and 'show sleepq'.
This commit is contained in:
John Baldwin 2006-04-21 20:40:43 +00:00
parent cf93bc6617
commit f9ab2f134f
2 changed files with 3 additions and 1 deletions

View File

@ -907,6 +907,7 @@ found:
TAILQ_FOREACH(td, &sq->sq_blocked, td_slpq) {
db_printf("\t%p (tid %d, pid %d, \"%s\")\n", td,
td->td_tid, td->td_proc->p_pid,
td->td_name[0] != '\0' ? td->td_name :
td->td_proc->p_comm);
}
}

View File

@ -968,7 +968,8 @@ print_thread(struct thread *td, const char *prefix)
{
db_printf("%s%p (tid %d, pid %d, \"%s\")\n", prefix, td, td->td_tid,
td->td_proc->p_pid, td->td_proc->p_comm);
td->td_proc->p_pid, td->td_name[0] != '\0' ? td->td_name :
td->td_proc->p_comm);
}
static void