Lines Matching refs:sdbcstat

73 		sdbcstat_t *sdbcstat = NULL;  in sdbc_discover()  local
112 sdbcstat = (sdbcstat_t *)calloc(1, sizeof (sdbcstat_t)); in sdbc_discover()
119 sdbcstat->pre_set = kstat_retrieve(kc, ksp); in sdbc_discover()
121 if (sdbcstat->pre_set == NULL) in sdbc_discover()
124 sdbcstat->collected |= GOT_SET_KSTAT; in sdbc_discover()
132 sdbcstat->pre_io = kstat_retrieve(kc, io_ksp); in sdbc_discover()
134 if (sdbcstat->pre_io == NULL) in sdbc_discover()
137 sdbcstat->collected |= GOT_IO_KSTAT; in sdbc_discover()
143 if (sdbcstat == NULL) in sdbc_discover()
146 if (SDBC_COMPLETE(sdbcstat->collected)) { in sdbc_discover()
147 (void) sdbc_delstat(sdbcstat); in sdbc_discover()
151 sdbc_addstat(sdbcstat); in sdbc_discover()
488 sdbc_addstat(sdbcstat_t *sdbcstat) in sdbc_addstat() argument
493 sdbc_top = sdbcstat; in sdbc_addstat()
502 tst_vname = kstat_value(sdbcstat->pre_set, in sdbc_addstat()
507 sdbc_top = sdbcstat; in sdbc_addstat()
509 sdbcstat->next = cur; in sdbc_addstat()
519 cur->next = sdbcstat; in sdbc_addstat()
527 sdbcstat->next = cur->next; in sdbc_addstat()
528 cur->next = sdbcstat; in sdbc_addstat()
547 sdbc_delstat(sdbcstat_t *sdbcstat) in sdbc_delstat() argument
550 sdbcstat_t *next = sdbcstat->next; in sdbc_delstat()
552 kstat_free(sdbcstat->pre_set); in sdbc_delstat()
553 kstat_free(sdbcstat->pre_io); in sdbc_delstat()
554 kstat_free(sdbcstat->cur_set); in sdbc_delstat()
555 kstat_free(sdbcstat->cur_io); in sdbc_delstat()
557 free(sdbcstat); in sdbc_delstat()
558 sdbcstat = NULL; in sdbc_delstat()
574 sdbc_value_check(sdbcstat_t *sdbcstat) in sdbc_value_check() argument
576 if (SDBC_COMPLETE(sdbcstat->collected)) in sdbc_value_check()
579 if (sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_CACHE_READ) != 0) in sdbc_value_check()
582 if (sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_DISK_READ) != 0) in sdbc_value_check()
585 if (sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_CACHE_WRITE) != 0) in sdbc_value_check()
588 if (sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_DISK_WRITE) != 0) in sdbc_value_check()
591 if (sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_WRCANCELNS) != 0) in sdbc_value_check()
594 if (io_value_check(sdbcstat->pre_io->ks_data, in sdbc_value_check()
595 sdbcstat->cur_io->ks_data) != 0) in sdbc_value_check()
643 sdbc_getvalues(sdbcstat_t *sdbcstat, sdbcvals_t *vals, int flags) in sdbc_getvalues() argument
653 if (sdbcstat == NULL) in sdbc_getvalues()
656 cur = sdbcstat->cur_io->ks_data; in sdbc_getvalues()
657 pre = sdbcstat->pre_io->ks_data; in sdbc_getvalues()
664 FBA_SIZE(sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_CACHE_READ)); in sdbc_getvalues()
666 FBA_SIZE(sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_DISK_READ)); in sdbc_getvalues()
679 FBA_SIZE(sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_CACHE_WRITE)); in sdbc_getvalues()
681 FBA_SIZE(sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_DISK_WRITE)); in sdbc_getvalues()
686 FBA_SIZE(sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_DESTAGED)); in sdbc_getvalues()
696 FBA_SIZE(sdbc_getdelta(sdbcstat, SDBC_CDKSTAT_WRCANCELNS)); in sdbc_getvalues()
755 sdbc_getdelta(sdbcstat_t *sdbcstat, char *name) in sdbc_getdelta() argument
760 pre_val = kstat_value(sdbcstat->pre_set, name); in sdbc_getdelta()
761 cur_val = kstat_value(sdbcstat->cur_set, name); in sdbc_getdelta()