Lines Matching refs:ksp

323 	kstat_t *ksp;
369 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) {
370 if (strncmp(ksp->ks_name, "cpu_stat", 8) == 0)
372 if (strcmp(ksp->ks_class, "kmem_cache") == 0)
380 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) {
381 if (strncmp(ksp->ks_name, "cpu_stat", 8) == 0 &&
382 kstat_read(kc, ksp, NULL) != -1)
383 cpu_stat_list[ncpus++] = ksp;
384 if (strcmp(ksp->ks_class, "kmem_cache") == 0 &&
385 kstat_read(kc, ksp, NULL) != -1)
386 kmem_cache_list[ncaches++] = ksp;
395 ksp = kmem_cache_list[0];
396 safe_kstat_read(kc, ksp, NULL);
397 buf_size_index = safe_kstat_data_index(ksp, "buf_size");
398 slab_create_index = safe_kstat_data_index(ksp, "slab_create");
399 slab_destroy_index = safe_kstat_data_index(ksp, "slab_destroy");
400 slab_size_index = safe_kstat_data_index(ksp, "slab_size");
401 buf_avail_index = safe_kstat_data_index(ksp, "buf_avail");
402 alloc_fail_index = safe_kstat_data_index(ksp, "alloc_fail");
540 safe_kstat_read(kstat_ctl_t *kc, kstat_t *ksp, void *data)
542 kid_t kstat_chain_id = kstat_read(kc, ksp, data);
545 fail(1, "kstat_read(%x, '%s') failed", kc, ksp->ks_name);
553 kstat_t *ksp = kstat_lookup(kc, ks_module, ks_instance, ks_name);
555 if (ksp == NULL)
560 return (ksp);
564 safe_kstat_data_lookup(kstat_t *ksp, char *name)
566 void *fp = kstat_data_lookup(ksp, name);
570 ksp->ks_name, name);
575 safe_kstat_data_index(kstat_t *ksp, char *name)
577 return ((int)((char *)safe_kstat_data_lookup(ksp, name) -
578 (char *)ksp->ks_data) / (ksp->ks_data_size / ksp->ks_ndata));
599 kstat_t *ksp;
610 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) {
612 if (ksp->ks_type != KSTAT_TYPE_IO)
623 iodev->ksp = ksp;
624 iodev->ks = *ksp;
663 if (kstat_read(kc, iodev->ksp, (void *) &iodev->kios) == -1)