Lines Matching refs:tb_softc
99 tprof_backend_softc_t tb_softc; member
225 shouldstop = (tb == NULL || tb->tb_softc.sc_ctr_running_mask == 0); in tprof_worker()
348 runmask &= ~tb->tb_softc.sc_ctr_running_mask; in tprof_start()
349 runmask &= tb->tb_softc.sc_ctr_configured_mask; in tprof_start()
359 firstrun = (tb->tb_softc.sc_ctr_running_mask == 0); in tprof_start()
362 error = tb->tb_ops->tbo_establish(&tb->tb_softc); in tprof_start()
373 tb->tb_ops->tbo_disestablish(&tb->tb_softc); in tprof_start()
392 runmask &= tb->tb_softc.sc_ctr_configured_mask; in tprof_start()
396 tb->tb_softc.sc_ctr_running_mask |= runmask; in tprof_start()
426 stopmask &= tb->tb_softc.sc_ctr_running_mask; in tprof_stop()
435 tb->tb_softc.sc_ctr_running_mask &= ~stopmask; in tprof_stop()
439 if (tb->tb_softc.sc_ctr_running_mask == 0) { in tprof_stop()
449 tb->tb_ops->tbo_disestablish(&tb->tb_softc); in tprof_stop()
462 tprof_param_t *param = &tb->tb_softc.sc_count[counter].ctr_param; in tprof_init_percpu_counters_offset()
471 tprof_param_t *param = &tb->tb_softc.sc_count[counter].ctr_param; in tprof_configure_event_cpu()
495 sc = &tb->tb_softc; in tprof_configure_event()
498 if (c >= tb->tb_softc.sc_ncounters) { in tprof_configure_event()
510 if (ISSET(c, tb->tb_softc.sc_ctr_running_mask)) in tprof_configure_event()
572 percpu_foreach(tb->tb_softc.sc_ctr_offset_percpu, in tprof_configure_event()
575 sc_param->p_value = tb->tb_softc.sc_count[c].ctr_counter_reset_val; in tprof_configure_event()
583 SET(tb->tb_softc.sc_ctr_configured_mask, __BIT(c)); in tprof_configure_event()
584 CLR(tb->tb_softc.sc_ctr_prof_mask, __BIT(c)); in tprof_configure_event()
585 CLR(tb->tb_softc.sc_ctr_ovf_mask, __BIT(c)); in tprof_configure_event()
588 SET(tb->tb_softc.sc_ctr_prof_mask, __BIT(c)); in tprof_configure_event()
589 SET(tb->tb_softc.sc_ctr_ovf_mask, __BIT(c)); in tprof_configure_event()
593 SET(tb->tb_softc.sc_ctr_ovf_mask, __BIT(c)); in tprof_configure_event()
606 tprof_backend_softc_t *sc = &tb->tb_softc; in tprof_getcounts_cpu()
645 counts->c_ncounters = tb->tb_softc.sc_ncounters; in tprof_getcounts()
646 counts->c_runningmask = tb->tb_softc.sc_ctr_running_mask; in tprof_getcounts()
768 tb->tb_softc.sc_ncounters = tb->tb_ops->tbo_ncounters(); in tprof_backend_register()
769 tb->tb_softc.sc_ctr_offset_percpu_size = in tprof_backend_register()
770 sizeof(uint64_t) * tb->tb_softc.sc_ncounters; in tprof_backend_register()
771 tb->tb_softc.sc_ctr_offset_percpu = in tprof_backend_register()
772 percpu_alloc(tb->tb_softc.sc_ctr_offset_percpu_size); in tprof_backend_register()
794 if (tb->tb_softc.sc_ctr_running_mask != 0) { in tprof_backend_unregister()
806 percpu_free(tb->tb_softc.sc_ctr_offset_percpu, in tprof_backend_unregister()
807 tb->tb_softc.sc_ctr_offset_percpu_size); in tprof_backend_unregister()
850 KASSERT(tb->tb_softc.sc_ctr_running_mask == 0); in tprof_close()
851 tb->tb_softc.sc_ctr_configured_mask = 0; in tprof_close()
852 tb->tb_softc.sc_ctr_prof_mask = 0; in tprof_close()
853 tb->tb_softc.sc_ctr_ovf_mask = 0; in tprof_close()