Lines Matching refs:kd
56 _kvm_cp_time_init(kvm_t *kd)
59 if (kvm_nlist(kd, kvm_cp_time_nl) < 0)
66 getsysctl(kvm_t *kd, const char *name, void *buf, size_t len)
72 _kvm_err(kd, kd->program, "cannot read sysctl %s:%s", name,
77 _kvm_err(kd, kd->program, "sysctl %s has unexpected size",
85 kvm_getcptime(kvm_t *kd, long *cp_time)
90 if (kd == NULL) {
95 if (ISALIVE(kd))
96 return (getsysctl(kd, "kern.cp_time", cp_time, sizeof(long) *
100 if (_kvm_cp_time_init(kd) < 0)
106 if (kvm_read(kd, kvm_cp_time_nl[NL_CP_TIME].n_value, cp_time,
108 _kvm_err(kd, kd->program, "cannot read cp_time array");
118 maxcpu = kvm_getmaxcpu(kd);
124 pc = kvm_getpcpu(kd, i);