From 99061149a3613182c5a79600439f82d7bf44b77a Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 14 Aug 2016 15:52:00 +0000 Subject: [PATCH] Print the tid of curthread in "show pcpu" in ddb. It was remarkably hard to trace all current threads. "show pcpu" only showed the pid, and there was nothing (?) better than searching ps output to find the tids on CPUs. This change simplifies the search, but you still have to trace the tid for each CPU manually. --- sys/kern/subr_pcpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index fbfa1a647471..2db29ce2916e 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -354,8 +354,8 @@ show_pcpu(struct pcpu *pc) db_printf("curthread = "); td = pc->pc_curthread; if (td != NULL) - db_printf("%p: pid %d \"%s\"\n", td, td->td_proc->p_pid, - td->td_name); + db_printf("%p: pid %d tid %d \"%s\"\n", td, td->td_proc->p_pid, + td->td_tid, td->td_name); else db_printf("none\n"); db_printf("curpcb = %p\n", pc->pc_curpcb);