From: anton Date: Wed, 19 Jan 2022 06:46:55 +0000 (+0000) Subject: Remove temporary verbose logging. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=129001617750ba8c2bce050a69621e71b494b9de;p=openbsd Remove temporary verbose logging. --- diff --git a/sys/dev/kcov.c b/sys/dev/kcov.c index a5de01047bb..0d5c5d8d574 100644 --- a/sys/dev/kcov.c +++ b/sys/dev/kcov.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kcov.c,v 1.47 2022/01/12 19:55:12 anton Exp $ */ +/* $OpenBSD: kcov.c,v 1.48 2022/01/19 06:46:55 anton Exp $ */ /* * Copyright (c) 2018 Anton Lindqvist @@ -64,8 +64,6 @@ struct kcov_dev { size_t kd_nmemb; /* [I] */ size_t kd_size; /* [I] */ - int kd_pid; /* XXX */ - struct kcov_remote *kd_kr; /* [M] */ TAILQ_ENTRY(kcov_dev) kd_entry; /* [M] */ @@ -85,8 +83,6 @@ struct kcov_remote { int kr_nsections; /* [M] # threads in remote section */ int kr_state; /* [M] */ - int kr_pid; /* XXX */ - TAILQ_ENTRY(kcov_remote) kr_entry; /* [M] */ }; @@ -301,7 +297,6 @@ kcovopen(dev_t dev, int flag, int mode, struct proc *p) kd = malloc(sizeof(*kd), M_SUBPROC, M_WAITOK | M_ZERO); kd->kd_unit = minor(dev); - kd->kd_pid = curproc->p_p->ps_pid; mtx_enter(&kcov_mtx); KASSERT(kd_lookup(kd->kd_unit) == NULL); TAILQ_INSERT_TAIL(&kd_list, kd, kd_entry); @@ -399,40 +394,6 @@ kcovioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) case KIOREMOTEATTACH: error = kcov_remote_attach(kd, (struct kio_remote_attach *)data); - /* XXX */ - if (error == EBUSY) { - struct kio_remote_attach *arg = (struct kio_remote_attach *)data; - struct kcov_remote *kr; - - mtx_leave(&kcov_mtx); - printf("%s[%d,%p]: subsystem %d, id %d\n", - curproc->p_p->ps_comm, curproc->p_p->ps_pid, curproc->p_p, - arg->subsystem, arg->id); - TAILQ_FOREACH(kr, &kr_list, kr_entry) { - struct kcov_dev *kd = kr->kr_kd; - struct process *pr; - - printf("kr: %p: subsystem %d, id %p, nsections %d, state %d, kd %p, pid %d", - kr, kr->kr_subsystem, kr->kr_id, kr->kr_nsections, kr->kr_state, kd, kr->kr_pid); - pr = prfind(kr->kr_pid); - if (pr != NULL) - printf(", comm %s\n", pr->ps_comm); - else - printf("\n"); - - if (kd != NULL) { - printf(" kd: unit %d, state %d, mode %d, kr %p pid %d", - kd->kd_unit, kd->kd_state, kd->kd_mode, kd->kd_kr, kd->kd_pid); - - pr = prfind(kr->kr_pid); - if (pr != NULL) - printf(", comm %s\n", pr->ps_comm); - else - printf("\n"); - } - } - return (error); - } break; default: error = ENOTTY; @@ -837,7 +798,6 @@ kcov_remote_attach(struct kcov_dev *kd, struct kio_remote_attach *arg) kr->kr_state = KCOV_STATE_READY; kr->kr_kd = kd; - kr->kr_pid = curproc->p_p->ps_pid; kd->kd_kr = kr; return (0); }