/titanic_44/usr/src/lib/libprtdiag/common/ |
H A D | kstat.c | 69 kstat_named_t *knp; in read_platform_kstats() local 111 knp = kstat_data_lookup(ksp, CSR_KSTAT_NAMED); in read_platform_kstats() 112 if (knp != NULL) { in read_platform_kstats() 113 bdp->fhc_csr = knp->value.ul; in read_platform_kstats() 117 knp = kstat_data_lookup(ksp, BSR_KSTAT_NAMED); in read_platform_kstats() 118 if (knp != NULL) { in read_platform_kstats() 119 bdp->fhc_bsr = knp->value.ul; in read_platform_kstats() 147 knp = kstat_data_lookup(ksp, MEMCTL_KSTAT_NAMED); in read_platform_kstats() 148 if (knp != NULL) { in read_platform_kstats() 149 bdp->ac_memctl = knp->value.ull; in read_platform_kstats() [all …]
|
/titanic_44/usr/src/uts/intel/io/agpgart/ |
H A D | agp_kstat.c | 48 agp_set_char_kstat(kstat_named_t *knp, const char *s) in agp_set_char_kstat() argument 50 (void) strlcpy(knp->value.c, s, sizeof (knp->value.c)); in agp_set_char_kstat() 57 kstat_named_t *knp; in agp_kstat_update() local 64 knp = ksp->ks_data; in agp_kstat_update() 66 agp_set_char_kstat(knp++, arc_name[sc->asoft_devreg.agprd_arctype]); in agp_kstat_update() 67 (knp++)->value.ui32 = sc->asoft_info.agpki_mdevid; in agp_kstat_update() 68 (knp++)->value.ui32 = (sc->asoft_info.agpki_mver.agpv_major<<16) | in agp_kstat_update() 70 (knp++)->value.ui32 = sc->asoft_info.agpki_mstatus; in agp_kstat_update() 71 (knp++)->value.ui64 = (sc->asoft_info.agpki_presize << 10) & UI32_MASK; in agp_kstat_update() 72 (knp++)->value.ui32 = sc->asoft_info.agpki_tdevid; in agp_kstat_update() [all …]
|
/titanic_44/usr/src/uts/common/io/bge/ |
H A D | bge_kstats.c | 200 kstat_named_t *knp; in bge_statistics_update() local 210 knp = ksp->ks_data; in bge_statistics_update() 221 for (ksip = bge_statistics; ksip->name != NULL; ++knp, ++ksip) in bge_statistics_update() 222 knp->value.ui64 = bstp->a[ksip->index]; in bge_statistics_update() 225 (knp++)->value.ui64 = (uint64_t)(pstats->ifHCOutOctets); in bge_statistics_update() 226 (knp++)->value.ui64 = (uint64_t)(pstats->etherStatsCollisions); in bge_statistics_update() 227 (knp++)->value.ui64 = (uint64_t)(pstats->outXonSent); in bge_statistics_update() 228 (knp++)->value.ui64 = (uint64_t)(pstats->outXoffSent); in bge_statistics_update() 229 (knp++)->value.ui64 = in bge_statistics_update() 231 (knp++)->value.ui64 = in bge_statistics_update() [all …]
|
/titanic_44/usr/src/cmd/powertop/common/ |
H A D | battery.c | 117 kstat_named_t *knp; in pt_battery_stat_snapshot() local 137 knp = kstat_data_lookup(ksp, "bif_unit"); in pt_battery_stat_snapshot() 139 if (knp == NULL) { in pt_battery_stat_snapshot() 144 battery_state.power_unit = knp->value.ui32; in pt_battery_stat_snapshot() 160 knp = kstat_data_lookup(ksp, "bst_rate"); in pt_battery_stat_snapshot() 162 if (knp == NULL) { in pt_battery_stat_snapshot() 167 if (knp->value.ui32 == 0xFFFFFFFF) in pt_battery_stat_snapshot() 171 battery_state.present_rate = mW2W((double)(knp->value.ui32)); in pt_battery_stat_snapshot() 187 knp = kstat_data_lookup(ksp, "bif_last_cap"); in pt_battery_stat_snapshot() 189 if (knp == NULL) { in pt_battery_stat_snapshot() [all …]
|
H A D | turbo.c | 67 kstat_named_t *knp; in pt_turbo_init() local 86 knp = kstat_data_lookup(ksp, "turbo_supported"); in pt_turbo_init() 87 if (knp == NULL) { in pt_turbo_init() 97 if (knp->value.ui32) { in pt_turbo_init() 116 kstat_named_t *knp; in pt_turbo_snapshot() local 140 knp = kstat_data_lookup(ksp, "turbo_mcnt"); in pt_turbo_snapshot() 141 if (knp == NULL) { in pt_turbo_snapshot() 151 turbo_info->t_mcnt = knp->value.ui64; in pt_turbo_snapshot() 153 knp = kstat_data_lookup(ksp, "turbo_acnt"); in pt_turbo_snapshot() 154 if (knp == NULL) { in pt_turbo_snapshot() [all …]
|
H A D | cpufreq.c | 167 kstat_named_t *knp; in pt_cpufreq_stat_prepare() local 199 knp = kstat_data_lookup(ksp, "supported_frequencies_Hz"); in pt_cpufreq_stat_prepare() 200 s = knp->value.str.addr.ptr; in pt_cpufreq_stat_prepare() 403 kstat_named_t *knp; in pt_cpufreq_snapshot_cpu() local 418 knp = kstat_data_lookup(ksp, "current_clock_Hz"); in pt_cpufreq_snapshot_cpu() 419 if (knp == NULL) { in pt_cpufreq_snapshot_cpu() 425 g_cpu_power_states[cpu].current_pstate = HZ2MHZ(knp->value.ui64); in pt_cpufreq_snapshot_cpu()
|
/titanic_44/usr/src/uts/common/io/dls/ |
H A D | dls_stat.c | 64 kstat_named_t *knp; in dls_stat_update() local 71 knp = (kstat_named_t *)ksp->ks_data; in dls_stat_update() 77 knp->value.ui64 = val; in dls_stat_update() 80 knp->value.ui32 = (uint32_t)val; in dls_stat_update() 86 knp++; in dls_stat_update() 93 knp->value.ui32 = LINK_DUPLEX_UNKNOWN; in dls_stat_update() 96 knp->value.ui32 = (uint32_t)val; in dls_stat_update() 98 knp++; in dls_stat_update() 99 knp->value.ui32 = dlp->dl_unknowns; in dls_stat_update() 110 kstat_named_t *knp; in dls_stat_create() local [all …]
|
/titanic_44/usr/src/uts/common/io/rge/ |
H A D | rge_kstats.c | 65 kstat_named_t *knp; in rge_driverinfo_update() local 71 knp = ksp->ks_data; in rge_driverinfo_update() 73 (knp++)->value.ui64 = rgep->dma_area_rxdesc.cookie.dmac_laddress; in rge_driverinfo_update() 74 (knp++)->value.ui64 = rgep->rx_next; in rge_driverinfo_update() 75 (knp++)->value.ui64 = rgep->rx_free; in rge_driverinfo_update() 76 (knp++)->value.ui64 = rgep->rx_bcopy; in rge_driverinfo_update() 77 (knp++)->value.ui64 = rgep->dma_area_txdesc.cookie.dmac_laddress; in rge_driverinfo_update() 78 (knp++)->value.ui64 = rgep->tx_next; in rge_driverinfo_update() 79 (knp++)->value.ui64 = rgep->tx_free; in rge_driverinfo_update() 80 (knp++)->value.ui64 = rgep->tx_flow; in rge_driverinfo_update() [all …]
|
/titanic_44/usr/src/uts/common/io/nge/ |
H A D | nge_kstats.c | 73 kstat_named_t *knp; in nge_statistics_update() local 82 knp = ksp->ks_data; in nge_statistics_update() 87 for (ksip = nge_statistics; ksip->name != NULL; ++knp, ++ksip) { in nge_statistics_update() 90 knp->value.ui64 = hw_stp->a[ksip->index]; in nge_statistics_update() 142 kstat_named_t *knp; in nge_chipinfo_update() local 150 knp = ksp->ks_data; in nge_chipinfo_update() 152 (knp++)->value.ui64 = infop->businfo; in nge_chipinfo_update() 153 (knp++)->value.ui64 = infop->command; in nge_chipinfo_update() 154 (knp++)->value.ui64 = infop->vendor; in nge_chipinfo_update() 155 (knp++)->value.ui64 = infop->device; in nge_chipinfo_update() [all …]
|
/titanic_44/usr/src/cmd/avs/dsstat/ |
H A D | common.c | 74 kstat_named_t *knp; in kstat_retrieve() local 94 knp = (kstat_named_t *)rval->ks_data; in kstat_retrieve() 95 end = (char *)(knp + ksp->ks_ndata); in kstat_retrieve() 96 for (i = 0; i < ksp->ks_ndata; i++, knp++) { in kstat_retrieve() 97 if (knp->data_type == KSTAT_DATA_STRING && in kstat_retrieve() 98 KSTAT_NAMED_STR_PTR(knp) != NULL) { in kstat_retrieve() 104 (void) strncpy(end, KSTAT_NAMED_STR_PTR(knp), in kstat_retrieve() 105 KSTAT_NAMED_STR_BUFLEN(knp)); in kstat_retrieve() 106 KSTAT_NAMED_STR_PTR(knp) = end; in kstat_retrieve() 107 end += KSTAT_NAMED_STR_BUFLEN(knp); in kstat_retrieve() [all …]
|
/titanic_44/usr/src/uts/common/fs/hsfs/ |
H A D | hsfs_subr.c | 351 kstat_named_t *knp; in hsfs_kstats_update() local 363 knp = ksp->ks_data; in hsfs_kstats_update() 378 knp++; in hsfs_kstats_update() 379 (knp++)->value.ui64 = pages_lost; in hsfs_kstats_update() 380 (knp++)->value.ui64 = howmany(physical_read_bytes, PAGESIZE); in hsfs_kstats_update() 381 (knp++)->value.ui64 = cache_read_pages; in hsfs_kstats_update() 382 (knp++)->value.ui64 = howmany(readahead_bytes, PAGESIZE); in hsfs_kstats_update() 383 (knp++)->value.ui64 = howmany(coalesced_bytes, PAGESIZE); in hsfs_kstats_update() 384 (knp++)->value.ui64 = total_pages_requested; in hsfs_kstats_update() 398 kstat_named_t *knp; in hsfs_setup_named_kstats() local [all …]
|
/titanic_44/usr/src/uts/common/io/drm/ |
H A D | drm_kstat.c | 47 kstat_named_t *knp; in drm_kstat_update() local 54 knp = ksp->ks_data; in drm_kstat_update() 57 (knp++)->value.ui32 = sc->counts[tmp]; in drm_kstat_update() 68 kstat_named_t *knp; in drm_init_kstats() local 82 for (knp = ksp->ks_data; (np = (*aknp)) != NULL; knp++, aknp++) { in drm_init_kstats() 83 kstat_named_init(knp, np, KSTAT_DATA_UINT32); in drm_init_kstats()
|
/titanic_44/usr/src/cmd/psrinfo/ |
H A D | psrinfo.c | 440 kstat_named_t *knp; in main() local 488 if ((knp = kstat_data_lookup(ksp, "state")) != NULL) { in main() 489 vc->v_state = mystrdup(knp->value.c); in main() 494 if ((knp = kstat_data_lookup(ksp, "cpu_type")) != NULL) { in main() 495 vc->v_cpu_type = mystrdup(knp->value.c); in main() 497 if ((knp = kstat_data_lookup(ksp, "fpu_type")) != NULL) { in main() 498 vc->v_fpu_type = mystrdup(knp->value.c); in main() 501 if ((knp = kstat_data_lookup(ksp, "state_begin")) != NULL) { in main() 502 vc->v_state_begin = knp->value.l; in main() 505 if ((knp = kstat_data_lookup(ksp, "clock_MHz")) != NULL) { in main() [all …]
|
/titanic_44/usr/src/cmd/fs.d/nfs/nfsstat/ |
H A D | nfsstat.c | 548 kstat_named_t *knp; in req_width() local 552 knp = KSTAT_NAMED_PTR(req); in req_width() 554 tot += knp[i].value.ui64; in req_width() 556 knp = kstat_data_lookup(req, "null"); in req_width() 557 nreq = req->ks_ndata - (knp - KSTAT_NAMED_PTR(req)); in req_width() 560 len = strlen(knp[i].name) + 1; in req_width() 564 per = (int)(knp[i].value.ui64 * 100 / tot); in req_width() 568 knp[i].value.ui64, per); in req_width() 581 kstat_named_t *knp; in stat_width() local 583 knp = KSTAT_NAMED_PTR(req); in stat_width() [all …]
|
/titanic_44/usr/src/uts/common/io/softmac/ |
H A D | softmac_stat.c | 218 kstat_named_t *knp; in softmac_get_kstat() local 228 for (i = 0, knp = KSTAT_NAMED_PTR(ksp); i < ksp->ks_ndata; i++, knp++) { in softmac_get_kstat() 229 if (strcmp(knp->name, name) == 0) { in softmac_get_kstat() 230 switch (knp->data_type) { in softmac_get_kstat() 233 *valp = (uint64_t)(knp->value.ui32); in softmac_get_kstat() 238 *valp = knp->value.ui64; in softmac_get_kstat() 244 *valp = (uint64_t)knp->value.ul; in softmac_get_kstat() 251 if (strncmp(knp->value.c, "full", 4) == 0) in softmac_get_kstat() 253 else if (strncmp(knp->value.c, "half", 4) == 0) in softmac_get_kstat()
|
/titanic_44/usr/src/cmd/stat/iostat/ |
H A D | iostat.c | 796 kstat_named_t *knp; in show_disk() local 799 knp = KSTAT_NAMED_PTR(&new->is_errors); in show_disk() 801 switch (knp[i].data_type) { in show_disk() 804 err_counters[i] = knp[i].value.ui32; in show_disk() 805 toterrs += knp[i].value.ui32; in show_disk() 983 kstat_named_t *knp; in show_disk_errors() local 1009 knp = KSTAT_NAMED_PTR(&disk->is_errors); in show_disk_errors() 1012 if (knp[i].name[0] == 0) in show_disk_errors() 1015 col += strlen(knp[i].name); in show_disk_errors() 1017 switch (knp[i].data_type) { in show_disk_errors() [all …]
|
/titanic_44/usr/src/uts/common/os/ |
H A D | kstat_fr.c | 591 kstat_named_setstr(kstat_named_t *knp, const char *src) in kstat_named_setstr() argument 593 if (knp->data_type != KSTAT_DATA_STRING) in kstat_named_setstr() 596 (void *)knp, (void *)src); in kstat_named_setstr() 598 KSTAT_NAMED_STR_PTR(knp) = (char *)src; in kstat_named_setstr() 600 KSTAT_NAMED_STR_BUFLEN(knp) = strlen(src) + 1; in kstat_named_setstr() 602 KSTAT_NAMED_STR_BUFLEN(knp) = 0; in kstat_named_setstr() 613 kstat_named_init(kstat_named_t *knp, const char *name, uchar_t data_type) in kstat_named_init() argument 615 kstat_set_string(knp->name, name); in kstat_named_init() 616 knp->data_type = data_type; in kstat_named_init() 619 kstat_named_setstr(knp, NULL); in kstat_named_init() [all …]
|
/titanic_44/usr/src/uts/common/io/mac/ |
H A D | mac_stat.c | 301 kstat_named_t *knp = ksp->ks_data; in i_mac_driver_stat_update() local 325 knp->value.ui64 = val; in i_mac_driver_stat_update() 328 knp->value.ui32 = (uint32_t)val; in i_mac_driver_stat_update() 335 knp++; in i_mac_driver_stat_update() 342 i_mac_kstat_init(kstat_named_t *knp, mac_stat_info_t *si, uint_t count) in i_mac_kstat_init() argument 346 kstat_named_init(knp, si[i].msi_name, si[i].msi_type); in i_mac_kstat_init() 347 knp++; in i_mac_kstat_init() 355 kstat_named_t *knp = ksp->ks_data; in i_mac_stat_update() local 367 knp->value.ui64 = val; in i_mac_stat_update() 370 knp->value.ui32 = (uint32_t)val; in i_mac_stat_update() [all …]
|
/titanic_44/usr/src/uts/common/xen/io/ |
H A D | xnb.c | 160 kstat_named_t *knp; in xnb_ks_aux_update() local 166 knp = ksp->ks_data; in xnb_ks_aux_update() 172 (knp++)->value.ui64 = xnbp->xnb_stat_rx_cksum_deferred; in xnb_ks_aux_update() 173 (knp++)->value.ui64 = xnbp->xnb_stat_tx_cksum_no_need; in xnb_ks_aux_update() 174 (knp++)->value.ui64 = xnbp->xnb_stat_rx_rsp_notok; in xnb_ks_aux_update() 175 (knp++)->value.ui64 = xnbp->xnb_stat_tx_notify_deferred; in xnb_ks_aux_update() 176 (knp++)->value.ui64 = xnbp->xnb_stat_tx_notify_sent; in xnb_ks_aux_update() 177 (knp++)->value.ui64 = xnbp->xnb_stat_rx_notify_deferred; in xnb_ks_aux_update() 178 (knp++)->value.ui64 = xnbp->xnb_stat_rx_notify_sent; in xnb_ks_aux_update() 179 (knp++)->value.ui64 = xnbp->xnb_stat_tx_too_early; in xnb_ks_aux_update() [all …]
|
H A D | blk_common.c | 278 kstat_named_t *knp; in blk_kstat_init() local 290 knp = ring->ri_kstats->ks_data; in blk_kstat_init() 292 kstat_named_init(knp, *cp, KSTAT_DATA_UINT64); in blk_kstat_init() 293 knp++; in blk_kstat_init() 320 kstat_named_t *knp; in blk_kstat_update() local 331 knp = ksp->ks_data; in blk_kstat_update() 337 (knp++)->value.ui64 = stats->bs_req_reads; in blk_kstat_update() 338 (knp++)->value.ui64 = stats->bs_req_writes; in blk_kstat_update() 339 (knp++)->value.ui64 = stats->bs_req_barriers; in blk_kstat_update() 340 (knp++)->value.ui64 = stats->bs_req_flushes; in blk_kstat_update() [all …]
|
/titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/ |
H A D | ilbadm_stats.c | 518 i_stat_index(kstat_named_t *knp, ilbst_stat_t *stats, int count) in i_stat_index() argument 523 if (strcasecmp(stats[i].is_name, knp->name) == 0) in i_stat_index() 533 kstat_named_t *knp; in i_copy_sstats() local 536 knp = KSTAT_NAMED_PTR(kp); in i_copy_sstats() 537 for (i = 0; i < kp->ks_ndata; i++, knp++) { in i_copy_sstats() 538 ind = i_stat_index(knp, servstats, SSTAT_SZ); in i_copy_sstats() 541 (void) strlcpy(sp->isd_serverstats[ind].is_name, knp->name, in i_copy_sstats() 543 sp->isd_serverstats[ind].is_value = knp->value.ui64; in i_copy_sstats() 609 kstat_named_t *knp; in i_copy_rstats() local 612 knp = KSTAT_NAMED_PTR(kp); in i_copy_rstats() [all …]
|
/titanic_44/usr/src/lib/libkstat/common/ |
H A D | kstat.c | 145 kstat_named_t *knp = data; in kstat_read() local 147 for (i = 0; i < ksp->ks_ndata; i++, knp++) { in kstat_read() 148 if (knp->data_type != KSTAT_DATA_STRING) in kstat_read() 150 if (KSTAT_NAMED_STR_PTR(knp) == NULL) in kstat_read() 159 KSTAT_NAMED_STR_PTR(knp) = (char *)data + in kstat_read() 160 (KSTAT_NAMED_STR_PTR(knp) - in kstat_read()
|
/titanic_44/usr/src/cmd/avs/sdbc/ |
H A D | sdbc_dynmem.c | 63 kstat_named_t *knp; member 358 p_dynmem_knp->knp = in sd_dynmem_lintmain() 360 if (p_dynmem_knp->knp == NULL) { in sd_dynmem_lintmain() 366 (uint_t)p_dynmem_knp->knp->value.ul); in sd_dynmem_lintmain() 377 p_dynmem_knp->knp->value.ul = p_dynmem_knp->newval; in sd_dynmem_lintmain()
|
/titanic_44/usr/src/uts/common/io/ntxn/ |
H A D | unm_nic_main.c | 2070 kstat_named_t *knp; in unm_kstat_update() local 2076 knp = ksp->ks_data; in unm_kstat_update() 2078 (knp++)->value.ui32 = adapter->freehdls; in unm_kstat_update() 2079 (knp++)->value.ui64 = adapter->freecmds; in unm_kstat_update() 2080 (knp++)->value.ui64 = adapter->tx_bcopy_threshold; in unm_kstat_update() 2081 (knp++)->value.ui64 = adapter->rx_bcopy_threshold; in unm_kstat_update() 2083 (knp++)->value.ui64 = adapter->stats.xmitcalled; in unm_kstat_update() 2084 (knp++)->value.ui64 = adapter->stats.xmitedframes; in unm_kstat_update() 2085 (knp++)->value.ui64 = adapter->stats.xmitfinished; in unm_kstat_update() 2086 (knp++)->value.ui64 = adapter->stats.txbytes; in unm_kstat_update() [all …]
|
/titanic_44/usr/src/uts/sun4/os/ |
H A D | machdep.c | 437 kstat_named_t *knp; in cpu_create_intrstat() local 456 knp = (kstat_named_t *)intr_ksp->ks_data; in cpu_create_intrstat() 461 kstat_named_init(&knp[i * 2], name, KSTAT_DATA_UINT64); in cpu_create_intrstat() 464 kstat_named_init(&knp[(i * 2) + 1], name, in cpu_create_intrstat() 487 kstat_named_t *knp = ksp->ks_data; in cpu_kstat_intrstat_update() local 501 knp[i * 2].value.ui64 = cpup->cpu_m.intrstat[i + 1][0]; in cpu_kstat_intrstat_update() 502 knp[(i * 2) + 1].value.ui64 = cpup->cpu_stats.sys.intr[i]; in cpu_kstat_intrstat_update() 506 knp[i * 2].value.ui64 = in cpu_kstat_intrstat_update() 507 (uint64_t)tick2ns((hrtime_t)knp[i * 2].value.ui64, in cpu_kstat_intrstat_update()
|