Lines Matching refs:devstat

52 SDT_PROBE_DEFINE2(io, , , start, "struct bio *", "struct devstat *");
53 SDT_PROBE_DEFINE2(io, , , done, "struct bio *", "struct devstat *");
55 "struct devstat *");
57 "struct devstat *");
71 MTX_SYSINIT(devstat_mutex, &devstat_mutex, "devstat", MTX_DEF);
74 static struct devstat *devstat_alloc(void);
75 static void devstat_free(struct devstat *);
76 static void devstat_add_entry(struct devstat *ds, const void *dev_name,
83 * Allocate a devstat and initialize it
85 struct devstat *
92 struct devstat *ds;
112 * Take a malloced and zeroed devstat structure given to us, fill it in
116 devstat_add_entry(struct devstat *ds, const void *dev_name,
123 struct devstat *ds_tmp;
132 * its devstat entry. Drivers are sorted first by priority, and
143 struct devstat *ds_next;
194 * Remove a devstat structure from the list of devices.
197 devstat_remove_entry(struct devstat *ds)
209 /* Remove this entry from the devstat queue */
213 STAILQ_REMOVE(devstat_head, ds, devstat, dev_links);
227 devstat_start_transaction(struct devstat *ds, struct bintime *now)
254 devstat_start_transaction_bio(struct devstat *ds, struct bio *bp)
295 devstat_end_transaction(struct devstat *ds, uint32_t bytes,
341 devstat_end_transaction_bio(struct devstat *ds, struct bio *bp)
348 devstat_end_transaction_bio_bt(struct devstat *ds, struct bio *bp,
372 * This is the sysctl handler for the devstat package. The data pushed out
373 * on the kern.devstat.all sysctl variable consists of the current devstat
374 * generation number, and then an array of devstat structures, one for each
386 struct devstat *nds;
418 error = SYSCTL_OUT(req, nds, sizeof(struct devstat));
434 * Sysctl entries for devstat. The first one is a node that all the rest
437 static SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, NULL,
441 NULL, 0, sysctl_devstat, "S,devstat", "All devices in the devstat list");
447 &devstat_num_devs, 0, "Number of devices in the devstat list");
454 * Allocator for struct devstat structures. We sub-allocate these from pages
459 #define statsperpage (PAGE_SIZE / sizeof(struct devstat))
466 .d_name = "devstat",
471 struct devstat *stat;
476 static MALLOC_DEFINE(M_DEVSTAT, "devstat", "Device statistics");
499 static struct devstat *
502 struct devstat *dsp;
565 devstat_free(struct devstat *dsp)
579 SYSCTL_INT(_debug_sizeof, OID_AUTO, devstat, CTLFLAG_RD,
580 NULL, sizeof(struct devstat), "sizeof(struct devstat)");