Lines Matching refs:btp

215 boottrace_display(struct sbuf *sbp, struct bt_table *btp, uint64_t dthres)  in boottrace_display()  argument
247 i = curr = btp->curr; in boottrace_display()
250 evtp = &btp->table[i]; in boottrace_display()
285 i = (i + 1) % btp->size; in boottrace_display()
322 dotrace(struct bt_table *btp, const char *eventname, const char *tdname) in dotrace() argument
336 if (btp->table == NULL) { in dotrace()
337 btp->drops_early++; in dotrace()
344 idx = btp->curr; in dotrace()
345 nxt = (idx + 1) % btp->size; in dotrace()
346 if (nxt == 0 && btp->wrap == 0) { in dotrace()
347 btp->drops_full++; in dotrace()
351 } while (!atomic_cmpset_int(&btp->curr, idx, nxt)); in dotrace()
353 btp->table[idx].cpuid = PCPU_GET(cpuid); in dotrace()
354 btp->table[idx].tsc = get_cyclecount(), in dotrace()
355 btp->table[idx].tick = cpu_ticks(); in dotrace()
356 btp->table[idx].pid = curthread->td_proc->p_pid; in dotrace()
363 btp->table[idx].cputime = 0; in dotrace()
364 btp->table[idx].inblock = 0; in dotrace()
365 btp->table[idx].oublock = 0; in dotrace()
368 btp->table[idx].cputime = in dotrace()
372 btp->table[idx].inblock = (uint32_t)usage.ru_inblock; in dotrace()
373 btp->table[idx].oublock = (uint32_t)usage.ru_oublock; in dotrace()
375 strlcpy(btp->table[idx].name, eventname, BT_EVENT_NAMELEN); in dotrace()
376 strlcpy(btp->table[idx].tdname, tdname, BT_EVENT_TDNAMELEN); in dotrace()
390 struct bt_table *btp; in boottrace() local
400 btp = &bt; in boottrace()
402 btp = &rt; in boottrace()
404 btp = &st; in boottrace()
406 return (dotrace(btp, eventname, tdname)); in boottrace()
445 _boottrace_sysctl(struct bt_table *btp, struct sysctl_oid *oidp, in _boottrace_sysctl() argument
461 error = dotrace(btp, eventname, tdname); in _boottrace_sysctl()