Lines Matching defs:lp
322 lock_prof_output(struct lock_prof *lp, struct sbuf *sb)
326 for (p = lp->file; p != NULL && strncmp(p, "../", 3) == 0; p += 3);
329 lp->cnt_max / 1000, lp->cnt_wait_max / 1000, lp->cnt_tot / 1000,
330 lp->cnt_wait / 1000, lp->cnt_cur,
331 lp->cnt_cur == 0 ? (uintmax_t)0 :
332 lp->cnt_tot / (lp->cnt_cur * 1000),
333 lp->cnt_cur == 0 ? (uintmax_t)0 :
334 lp->cnt_wait / (lp->cnt_cur * 1000),
335 (uintmax_t)0, lp->cnt_contest_locking,
336 p, lp->line, lp->class->lc_name, lp->name);
385 struct lock_prof lp = {};
389 lock_prof_sum(l, &lp, i, spin, t);
390 lock_prof_output(&lp, sb);
472 struct lock_prof *lp;
484 SLIST_FOREACH(lp, head, link) {
485 if (lp->line == line && lp->file == p &&
486 lp->name == lo->lo_name)
487 return (lp);
490 lp = SLIST_FIRST(&type->lpt_lpalloc);
491 if (lp == NULL) {
493 return (lp);
496 lp->file = p;
497 lp->line = line;
498 lp->class = LOCK_CLASS(lo);
499 lp->name = lo->lo_name;
500 SLIST_INSERT_HEAD(&type->lpt_hash[hash], lp, link);
501 return (lp);
603 struct lock_prof *lp;
631 lp = lock_profile_lookup(lo, spin, l->lpo_file, l->lpo_line);
632 if (lp == NULL)
643 if (holdtime > lp->cnt_max)
644 lp->cnt_max = holdtime;
645 if (l->lpo_waittime > lp->cnt_wait_max)
646 lp->cnt_wait_max = l->lpo_waittime;
647 lp->cnt_tot += holdtime;
648 lp->cnt_wait += l->lpo_waittime;
649 lp->cnt_contest_locking += l->lpo_contest_locking;
650 lp->cnt_cur += l->lpo_cnt;