Lines Matching defs:kte

312 ktraddentry(lwp_t *l, struct ktrace_entry *kte, int flags)
351 TAILQ_INSERT_TAIL(&ktd->ktd_queue, kte, kte_list);
412 ktefree(kte);
417 ktefree(struct ktrace_entry *kte)
420 if (kte->kte_buf != kte->kte_space)
421 kmem_free(kte->kte_buf, kte->kte_bufsz);
422 pool_cache_put(kte_cache, kte);
499 struct ktrace_entry *kte;
506 kte = pool_cache_get(kte_cache, PR_WAITOK);
507 if (sz > sizeof(kte->kte_space)) {
510 buf = kte->kte_space;
512 kte->kte_bufsz = sz;
513 kte->kte_buf = buf;
515 kth = &kte->kte_kth;
525 *ktep = kte;
532 ktesethdrlen(struct ktrace_entry *kte, size_t l)
534 kte->kte_kth.ktr_len = l;
542 struct ktrace_entry *kte;
553 if (ktealloc(&kte, (void *)&ktp, l, KTR_SYSCALL, len))
562 ktraddentry(l, kte, KTA_WAITOK);
569 struct ktrace_entry *kte;
575 if (ktealloc(&kte, (void *)&ktp, l, KTR_SYSRET,
585 ktraddentry(l, kte, KTA_WAITOK);
604 struct ktrace_entry *kte;
610 if (ktealloc(&kte, &buf, l, KTR_NAMEI, erootlen + pathlen))
615 ktraddentry(l, kte, KTA_WAITOK);
655 struct ktrace_entry *kte;
663 if (ktealloc(&kte, (void *)&ktp, l, KTR_EXEC_FD, sizeof(*ktp)))
668 ktraddentry(l, kte, KTA_WAITOK);
674 struct ktrace_entry *kte;
677 if (ktealloc(&kte, &buf, l, type, len))
680 ktraddentry(l, kte, KTA_WAITOK);
686 struct ktrace_entry *kte;
694 if (ktealloc(&kte, (void *)&ktp, l, KTR_GENIO, buflen))
702 kte->kte_kth.ktr_len = sizeof(struct ktr_genio);
708 kte->kte_kth.ktr_len += cnt;
723 ktraddentry(l, kte, KTA_WAITOK | KTA_LARGE);
737 ktefree(kte);
781 struct ktrace_entry *kte;
791 if (ktealloc(&kte, (void *)&kbuf, l, KTR_PSIG, sizeof(*kbuf)))
803 kte->kte_kth.ktr_len = sizeof(*kbuf);
806 kte->kte_kth.ktr_len = sizeof(struct ktr_psig);
809 ktraddentry(l, kte, KTA_WAITOK);
817 struct ktrace_entry *kte;
866 if (ktealloc(&kte, (void *)&kc, l, KTR_CSW, sizeof(*kc)))
875 kte->kte_kth.ktr_otv.tv_sec = ts->tv_sec;
876 kte->kte_kth.ktr_otv.tv_usec = ts->tv_nsec / 1000;
879 kte->kte_kth.ktr_ots.tv_sec = ts->tv_sec;
880 kte->kte_kth.ktr_ots.tv_nsec = ts->tv_nsec;
883 kte->kte_kth.ktr_ts.tv_sec = ts->tv_sec;
884 kte->kte_kth.ktr_ts.tv_nsec = ts->tv_nsec;
890 ktraddentry(l, kte, KTA_WAITOK);
893 if (ktealloc(&kte, (void *)&kc, l, KTR_CSW, sizeof(*kc)))
899 ktraddentry(l, kte, KTA_WAITOK);
911 struct ktrace_entry *kte;
923 error = ktealloc(&kte, (void *)&ktp, l, KTR_USER, sizeof(*ktp) + len);
936 kte->kte_kth.ktr_len = 0;
938 ktraddentry(l, kte, KTA_WAITOK);
945 struct ktrace_entry *kte;
956 error = ktealloc(&kte, (void *)&ktp, l, KTR_USER, sizeof(*ktp) + len);
965 ktraddentry(l, kte, KTA_WAITOK);
971 struct ktrace_entry *kte;
981 if (ktealloc(&kte, (void *)&namep, l, KTR_MIB, size))
986 ktraddentry(l, kte, KTA_WAITOK);
1280 ktrwrite(struct ktr_desc *ktd, struct ktrace_entry *kte)
1285 struct ktrace_entry *top = kte;
1299 kth = &kte->kte_kth;
1328 iov->iov_base = kte->kte_buf;
1333 } while ((kte = TAILQ_NEXT(kte, kte_list)) != NULL &&
1344 if (kte != NULL)
1367 while ((kte = top) != NULL) {
1369 ktefree(kte);
1378 struct ktrace_entry *kte;
1383 kte = TAILQ_FIRST(&ktd->ktd_queue);
1384 if (kte == NULL) {
1406 ktrwrite(ktd, kte);