deadlkres: include thread name in panic messages

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D24235
This commit is contained in:
Jason A. Harmening 2020-04-01 04:51:39 +00:00
parent 274328a4ef
commit 8abaf6a7c8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359501

View File

@ -205,8 +205,9 @@ deadlres_td_on_lock(struct proc *p, struct thread *td, int blkticks)
* Accordingly with provided thresholds, this thread is stuck
* for too long on a turnstile.
*/
panic("%s: possible deadlock detected for %p, "
"blocked for %d ticks\n", __func__, td, tticks);
panic("%s: possible deadlock detected for %p (%s), "
"blocked for %d ticks\n", __func__,
td, sched_tdname(td), tticks);
}
static void
@ -239,8 +240,9 @@ deadlres_td_sleep_q(struct proc *p, struct thread *td, int slpticks)
if (!strcmp(blessed[i], td->td_wmesg))
return;
panic("%s: possible deadlock detected for %p, "
"blocked for %d ticks\n", __func__, td, tticks);
panic("%s: possible deadlock detected for %p (%s), "
"blocked for %d ticks\n", __func__,
td, sched_tdname(td), tticks);
}
}