A bunch more files that should probably print out a thread name
instead of a process name.
This commit is contained in:
parent
431f890614
commit
e01eafef2a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173601
@ -208,7 +208,7 @@ trap(struct trapframe *frame)
|
||||
if (ISPL(frame->tf_cs) == SEL_UPL)
|
||||
printf(
|
||||
"pid %ld (%s): trap %d with interrupts disabled\n",
|
||||
(long)curproc->p_pid, curproc->p_comm, type);
|
||||
(long)curproc->p_pid, curthread->td_name, type);
|
||||
else if (type != T_NMI && type != T_BPTFLT &&
|
||||
type != T_TRCTRAP) {
|
||||
/*
|
||||
@ -681,8 +681,8 @@ trap_fatal(frame, eva)
|
||||
printf("current process = ");
|
||||
if (curproc) {
|
||||
printf("%lu (%s)\n",
|
||||
(u_long)curproc->p_pid, curproc->p_comm ?
|
||||
curproc->p_comm : "");
|
||||
(u_long)curproc->p_pid, curthread->td_name ?
|
||||
curthread->td_name : "");
|
||||
} else {
|
||||
printf("Idle\n");
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ trap(struct trapframe *frame)
|
||||
if (ISPL(frame->tf_cs) == SEL_UPL || (frame->tf_eflags & PSL_VM))
|
||||
printf(
|
||||
"pid %ld (%s): trap %d with interrupts disabled\n",
|
||||
(long)curproc->p_pid, curproc->p_comm, type);
|
||||
(long)curproc->p_pid, curthread->td_name, type);
|
||||
else if (type != T_BPTFLT && type != T_TRCTRAP &&
|
||||
frame->tf_eip != (int)cpu_switch_load_gs) {
|
||||
/*
|
||||
@ -852,7 +852,7 @@ trap_fatal(frame, eva)
|
||||
printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12);
|
||||
printf("current process = ");
|
||||
if (curproc) {
|
||||
printf("%lu (%s)\n", (u_long)curproc->p_pid, curproc->p_comm);
|
||||
printf("%lu (%s)\n", (u_long)curproc->p_pid, curthread->td_name);
|
||||
} else {
|
||||
printf("Idle\n");
|
||||
}
|
||||
|
@ -1155,12 +1155,12 @@ __elfN(puthdr)(struct thread *td, void *dst, size_t *off, int numsegs)
|
||||
if (dst != NULL) {
|
||||
psinfo->pr_version = PRPSINFO_VERSION;
|
||||
psinfo->pr_psinfosz = sizeof(elf_prpsinfo_t);
|
||||
strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname));
|
||||
strlcpy(psinfo->pr_fname, td->td_name, sizeof(psinfo->pr_fname));
|
||||
/*
|
||||
* XXX - We don't fill in the command line arguments properly
|
||||
* yet.
|
||||
*/
|
||||
strlcpy(psinfo->pr_psargs, p->p_comm,
|
||||
strlcpy(psinfo->pr_psargs, td->td_name,
|
||||
sizeof(psinfo->pr_psargs));
|
||||
}
|
||||
__elfN(putnote)(dst, off, "FreeBSD", NT_PRPSINFO, psinfo,
|
||||
|
@ -764,7 +764,7 @@ fork_exit(callout, arg, frame)
|
||||
KASSERT(p->p_state == PRS_NORMAL, ("executing process is still new"));
|
||||
|
||||
CTR4(KTR_PROC, "fork_exit: new thread %p (kse %p, pid %d, %s)",
|
||||
td, td->td_sched, p->p_pid, p->p_comm);
|
||||
td, td->td_sched, p->p_pid, td->td_name);
|
||||
|
||||
sched_fork_exit(td);
|
||||
/*
|
||||
@ -792,7 +792,7 @@ fork_exit(callout, arg, frame)
|
||||
*/
|
||||
if (p->p_flag & P_KTHREAD) {
|
||||
printf("Kernel thread \"%s\" (pid %d) exited prematurely.\n",
|
||||
p->p_comm, p->p_pid);
|
||||
td->td_name, p->p_pid);
|
||||
kproc_exit(0);
|
||||
}
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
|
@ -280,7 +280,7 @@ ktr_getrequest(int type)
|
||||
microtime(&req->ktr_header.ktr_time);
|
||||
req->ktr_header.ktr_pid = p->p_pid;
|
||||
req->ktr_header.ktr_tid = td->td_tid;
|
||||
bcopy(p->p_comm, req->ktr_header.ktr_comm, MAXCOMLEN + 1);
|
||||
bcopy(td->td_name, req->ktr_header.ktr_comm, MAXCOMLEN + 1);
|
||||
req->ktr_buffer = NULL;
|
||||
req->ktr_header.ktr_len = 0;
|
||||
} else {
|
||||
|
@ -179,7 +179,7 @@ _sleep(ident, lock, priority, wmesg, timo)
|
||||
|
||||
sleepq_lock(ident);
|
||||
CTR5(KTR_PROC, "sleep: thread %ld (pid %ld, %s) on %s (%p)",
|
||||
td->td_tid, p->p_pid, p->p_comm, wmesg, ident);
|
||||
td->td_tid, p->p_pid, td->td_name, wmesg, ident);
|
||||
|
||||
DROP_GIANT();
|
||||
if (lock != NULL && !(class->lc_flags & LC_SLEEPABLE)) {
|
||||
@ -272,7 +272,7 @@ msleep_spin(ident, mtx, wmesg, timo)
|
||||
|
||||
sleepq_lock(ident);
|
||||
CTR5(KTR_PROC, "msleep_spin: thread %ld (pid %ld, %s) on %s (%p)",
|
||||
td->td_tid, p->p_pid, p->p_comm, wmesg, ident);
|
||||
td->td_tid, p->p_pid, td->td_name, wmesg, ident);
|
||||
|
||||
DROP_GIANT();
|
||||
mtx_assert(mtx, MA_OWNED | MA_NOTRECURSED);
|
||||
@ -415,7 +415,7 @@ mi_switch(int flags, struct thread *newtd)
|
||||
PCPU_INC(cnt.v_swtch);
|
||||
PCPU_SET(switchticks, ticks);
|
||||
CTR4(KTR_PROC, "mi_switch: old thread %ld (kse %p, pid %ld, %s)",
|
||||
td->td_tid, td->td_sched, p->p_pid, p->p_comm);
|
||||
td->td_tid, td->td_sched, p->p_pid, td->td_name);
|
||||
#if (KTR_COMPILE & KTR_SCHED) != 0
|
||||
if (TD_IS_IDLETHREAD(td))
|
||||
CTR3(KTR_SCHED, "mi_switch: %p(%s) prio %d idle",
|
||||
@ -444,7 +444,7 @@ mi_switch(int flags, struct thread *newtd)
|
||||
td, td->td_name, td->td_priority);
|
||||
|
||||
CTR4(KTR_PROC, "mi_switch: new thread %ld (kse %p, pid %ld, %s)",
|
||||
td->td_tid, td->td_sched, p->p_pid, p->p_comm);
|
||||
td->td_tid, td->td_sched, p->p_pid, td->td_name);
|
||||
|
||||
/*
|
||||
* If the last thread was exiting, finish cleaning it up.
|
||||
|
@ -393,7 +393,7 @@ thread_exit(void)
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
KASSERT(p != NULL, ("thread exiting without a process"));
|
||||
CTR3(KTR_PROC, "thread_exit: thread %p (pid %ld, %s)", td,
|
||||
(long)p->p_pid, p->p_comm);
|
||||
(long)p->p_pid, td->td_name);
|
||||
KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending"));
|
||||
|
||||
#ifdef AUDIT
|
||||
|
@ -382,7 +382,7 @@ sleepq_catch_signals(void *wchan)
|
||||
mtx_assert(&sc->sc_lock, MA_OWNED);
|
||||
MPASS(wchan != NULL);
|
||||
CTR3(KTR_PROC, "sleepq catching signals: thread %p (pid %ld, %s)",
|
||||
(void *)td, (long)p->p_pid, p->p_comm);
|
||||
(void *)td, (long)p->p_pid, td->td_name);
|
||||
|
||||
mtx_unlock_spin(&sc->sc_lock);
|
||||
|
||||
|
@ -79,7 +79,7 @@ userret(struct thread *td, struct trapframe *frame)
|
||||
struct proc *p = td->td_proc;
|
||||
|
||||
CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid,
|
||||
p->p_comm);
|
||||
td->td_name);
|
||||
#ifdef DIAGNOSTIC
|
||||
/* Check that we called signotify() enough. */
|
||||
PROC_LOCK(p);
|
||||
|
@ -2016,7 +2016,7 @@ DB_SHOW_COMMAND(alllocks, db_witness_list_all)
|
||||
if (!witness_thread_has_locks(td))
|
||||
continue;
|
||||
db_printf("Process %d (%s) thread %p (%d)\n", p->p_pid,
|
||||
p->p_comm, td, td->td_tid);
|
||||
td->td_name, td, td->td_tid);
|
||||
witness_list(td);
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ trap(struct trapframe *frame)
|
||||
sig = 0;
|
||||
user = frame->srr1 & PSL_PR;
|
||||
|
||||
CTR3(KTR_TRAP, "trap: %s type=%s (%s)", p->p_comm,
|
||||
CTR3(KTR_TRAP, "trap: %s type=%s (%s)", td->td_name,
|
||||
trapname(type), user ? "user" : "kernel");
|
||||
|
||||
if (user) {
|
||||
@ -401,7 +401,7 @@ syscall(struct trapframe *frame)
|
||||
} else
|
||||
error = 0;
|
||||
|
||||
CTR5(KTR_SYSC, "syscall: p=%s %s(%x %x %x)", p->p_comm,
|
||||
CTR5(KTR_SYSC, "syscall: p=%s %s(%x %x %x)", td->td_name,
|
||||
syscallnames[code],
|
||||
frame->fixreg[FIRSTARG],
|
||||
frame->fixreg[FIRSTARG+1],
|
||||
@ -426,7 +426,7 @@ syscall(struct trapframe *frame)
|
||||
error = (*callp->sy_call)(td, params);
|
||||
AUDIT_SYSCALL_EXIT(error, td);
|
||||
|
||||
CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", p->p_comm,
|
||||
CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", td->td_name,
|
||||
syscallnames[code], td->td_retval[0]);
|
||||
}
|
||||
switch (error) {
|
||||
|
@ -156,7 +156,7 @@ trap(struct trapframe *frame)
|
||||
sig = 0;
|
||||
user = frame->srr1 & PSL_PR;
|
||||
|
||||
CTR3(KTR_TRAP, "trap: %s type=%s (%s)", p->p_comm,
|
||||
CTR3(KTR_TRAP, "trap: %s type=%s (%s)", td->td_name,
|
||||
trapname(type), user ? "user" : "kernel");
|
||||
|
||||
if (user) {
|
||||
@ -401,7 +401,7 @@ syscall(struct trapframe *frame)
|
||||
} else
|
||||
error = 0;
|
||||
|
||||
CTR5(KTR_SYSC, "syscall: p=%s %s(%x %x %x)", p->p_comm,
|
||||
CTR5(KTR_SYSC, "syscall: p=%s %s(%x %x %x)", td->td_name,
|
||||
syscallnames[code],
|
||||
frame->fixreg[FIRSTARG],
|
||||
frame->fixreg[FIRSTARG+1],
|
||||
@ -426,7 +426,7 @@ syscall(struct trapframe *frame)
|
||||
error = (*callp->sy_call)(td, params);
|
||||
AUDIT_SYSCALL_EXIT(error, td);
|
||||
|
||||
CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", p->p_comm,
|
||||
CTR3(KTR_SYSC, "syscall: p=%s %s ret=%x", td->td_name,
|
||||
syscallnames[code], td->td_retval[0]);
|
||||
}
|
||||
switch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user