Lines Matching refs:knp
648 kstat_named_t *knp; in uv_uptime() local
660 knp = (kstat_named_t*) kstat_data_lookup(ksp, (char*) "clk_intr"); in uv_uptime()
661 *uptime = knp->value.ul / hz; in uv_uptime()
673 kstat_named_t *knp; in uv_cpu_info() local
701 knp = kstat_data_lookup(ksp, (char*) "clock_MHz"); in uv_cpu_info()
702 assert(knp->data_type == KSTAT_DATA_INT32 || in uv_cpu_info()
703 knp->data_type == KSTAT_DATA_INT64); in uv_cpu_info()
704 cpu_info->speed = (knp->data_type == KSTAT_DATA_INT32) ? knp->value.i32 in uv_cpu_info()
705 : knp->value.i64; in uv_cpu_info()
707 knp = kstat_data_lookup(ksp, (char*) "brand"); in uv_cpu_info()
708 assert(knp->data_type == KSTAT_DATA_STRING); in uv_cpu_info()
709 cpu_info->model = uv__strdup(KSTAT_NAMED_STR_PTR(knp)); in uv_cpu_info()
731 knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_user"); in uv_cpu_info()
732 assert(knp->data_type == KSTAT_DATA_UINT64); in uv_cpu_info()
733 cpu_info->cpu_times.user = knp->value.ui64; in uv_cpu_info()
735 knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_kernel"); in uv_cpu_info()
736 assert(knp->data_type == KSTAT_DATA_UINT64); in uv_cpu_info()
737 cpu_info->cpu_times.sys = knp->value.ui64; in uv_cpu_info()
739 knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_idle"); in uv_cpu_info()
740 assert(knp->data_type == KSTAT_DATA_UINT64); in uv_cpu_info()
741 cpu_info->cpu_times.idle = knp->value.ui64; in uv_cpu_info()
743 knp = kstat_data_lookup(ksp, (char*) "intr"); in uv_cpu_info()
744 assert(knp->data_type == KSTAT_DATA_UINT64); in uv_cpu_info()
745 cpu_info->cpu_times.irq = knp->value.ui64; in uv_cpu_info()