Lines Matching refs:pmc_t

170  *	pmc_t - 144 bytes
489 static void perf_monitor_add_pmc(perf_monitor_t pm, pmc_t pmc __unused) {
501 static void perf_monitor_remove_pmc(perf_monitor_t pm, pmc_t pmc __unused) {
513 static pmc_t pmc_alloc(void) {
514 return (pmc_t)zalloc(perf_big_zone);
522 * pmc_init initializes a newly allocated pmc_t
524 static void pmc_init(pmc_t pmc) {
537 * pmc_reference increments the reference count of the given pmc_t
539 static void pmc_reference(pmc_t pmc) {
546 * pmc_deallocate decrements the reference count of the given pmc_t. If the
547 * reference count hits zero, the given pmc_t is deallocated and released back
550 static void pmc_deallocate(pmc_t pmc) {
564 static void pmc_dequeue(pmc_t pmc) {
567 queue_remove(perf_counters_queue, pmc, pmc_t, link);
577 static void pmc_enqueue(pmc_t pmc) {
580 queue_enter(perf_counters_queue, pmc, pmc_t, link);
588 * pmc_find attempts to locate a pmc_t that was registered with the given
589 * pmc_object_t pointer. If found, it returns the pmc_t with an extra reference
592 static pmc_t pmc_find(pmc_object_t object) {
597 pmc_t element = NULL;
598 pmc_t found = NULL;
600 queue_iterate(perf_counters_queue, element, pmc_t, link) {
618 static pmc_config_t pmc_config_alloc(pmc_t pmc __unused) {
623 static void pmc_config_free(pmc_t pmc, pmc_config_t config) {
635 static kern_return_t pmc_open(pmc_t pmc) {
643 static kern_return_t pmc_close(pmc_t pmc) {
655 static kern_return_t pmc_internal_reservation_set_pmc(pmc_reservation_t resv, pmc_t pmc);
712 * pmc_t.
714 * NOTE: It is okay to pass NULL as the pmc_t - this will have the effect of
718 static kern_return_t pmc_internal_reservation_set_pmc(pmc_reservation_t resv, pmc_t pmc) {
784 static uint32_t pmc_accessible_core_count(pmc_t pmc) {
1515 pmc_t store_pmc = reservation->pmc;
1568 pmc_t load_pmc = reservation->pmc;
1623 static inline boolean_t pmc_accessible_from_core(pmc_t pmc, uint32_t logicalCore) {
1923 pmc_t pmc = pmc_alloc();
1964 pmc_t pmc = pmc_find(pmc_object);
2008 kern_return_t pmc_create_config(pmc_t pmc, pmc_config_t *config) {
2047 void pmc_free_config(pmc_t pmc, pmc_config_t config) {
2064 kern_return_t pmc_config_set_value(pmc_t pmc, pmc_config_t config,
2095 kern_return_t pmc_config_set_interrupt_threshold(pmc_t pmc, pmc_config_t config,
2136 * pmc_get_pmc_list returns an allocated list of pmc_t's, as well as the number
2137 * of pmc_t's returned. Callers should free this list with a call to
2142 kern_return_t pmc_get_pmc_list(pmc_t **pmcs, size_t *pmcCount) {
2143 pmc_t *array = NULL;
2144 pmc_t pmc = NULL;
2152 array = (pmc_t *)kalloc(sizeof(pmc_t) * size);
2171 kfree(array, sizeof(pmc_t) * size);
2179 queue_iterate(perf_counters_queue, pmc, pmc_t, link) {
2194 * pmc_free_pmc_list frees an array of pmc_t that has been returned from
2199 void pmc_free_pmc_list(pmc_t *pmcs, size_t pmcCount) {
2203 kfree(pmcs, pmcCount * sizeof(pmc_t));
2207 kern_return_t pmc_find_by_name(const char *name, pmc_t **pmcs, size_t *pmcCount) {
2214 pmc_t *list = NULL;
2233 pmc_t temp = list[ii];
2248 * just allocate enough space for @matchCount pmc_t's, and copy the
2253 pmc_t *result = (pmc_t *)kalloc(sizeof(pmc_t) * matchCount);
2256 memcpy(result, list, sizeof(pmc_t) * matchCount);
2287 const char *pmc_get_name(pmc_t pmc) {
2302 kern_return_t pmc_get_accessible_core_list(pmc_t pmc, uint32_t **logicalCores,
2360 kern_return_t pmc_reserve(pmc_t pmc, pmc_config_t config,
2412 kern_return_t pmc_reserve_task(pmc_t pmc, pmc_config_t config,
2471 kern_return_t pmc_reserve_thread(pmc_t pmc, pmc_config_t config,
2874 kern_return_t pmc_create_config(pmc_t pmc __unused,
2879 void pmc_free_config(pmc_t pmc __unused, pmc_config_t config __unused) {
2882 kern_return_t pmc_config_set_value(pmc_t pmc __unused,
2888 kern_return_t pmc_config_set_interrupt_threshold(pmc_t pmc __unused,
2894 kern_return_t pmc_get_pmc_list(pmc_t **pmcs __unused, size_t *pmcCount __unused) {
2898 void pmc_free_pmc_list(pmc_t *pmcs __unused, size_t pmcCount __unused) {
2901 kern_return_t pmc_find_by_name(const char *name __unused, pmc_t **pmcs __unused,
2906 const char *pmc_get_name(pmc_t pmc __unused) {
2910 kern_return_t pmc_get_accessible_core_list(pmc_t pmc __unused,
2915 kern_return_t pmc_reserve(pmc_t pmc __unused,
2920 kern_return_t pmc_reserve_task(pmc_t pmc __unused,
2926 kern_return_t pmc_reserve_thread(pmc_t pmc __unused,