Lines Matching refs:methods

76 			(x->methods.flags & PERFMON_FLAG_SUPPORTS_CONTEXT_SWITCHING) ? \
345 bzero(&(pm->methods), sizeof(perf_monitor_methods_t));
364 if (pm->methods.flags & PERFMON_FLAG_REQUIRES_IDLE_NOTIFICATIONS) {
530 bzero(&pmc->methods, sizeof(pmc_methods_t));
628 pmc->methods.free_config(pmc->object, config->object);
640 return pmc->methods.open(pmc->object, pmc->open_object);
648 return pmc->methods.close(pmc->object, pmc->open_object);
711 * the new one is set. This methods increases the reference count of the given
790 if(KERN_SUCCESS != pmc->methods.accessible_cores(pmc->object,
1521 ret = store_pm->methods.disable_counters(store_pm->object, &store_pmc_obj, 1);
1528 ret = store_pmc->methods.disable(store_pmc_obj);
1534 ret = store_pmc->methods.get_count(store_pmc_obj, &reservation->value);
1571 ret = load_pmc->methods.set_config(load_pmc_obj, reservation->config->object);
1578 ret = load_pmc->methods.set_count(load_pmc_obj, reservation->value);
1585 ret = load_pmc->methods.enable(load_pmc_obj);
1595 ret = load_pm->methods.enable_counters(load_pm->object, &load_pmc_obj, 1);
1626 ret = pmc->methods.accessible_from_core(pmc->object, logicalCore);
1755 * callback methods. The given perf_monitor_object_t is the first argument to
1759 perf_monitor_methods_t *methods) {
1764 if(!monitor || !methods) {
1769 if(MACH_PERFMON_METHODS_VERSION != methods->perf_monitor_methods_version) {
1776 if (methods->flags & PERFMON_FLAG_REQUIRES_IDLE_NOTIFICATIONS) {
1780 if (KERN_SUCCESS == methods->accessible_cores(monitor, &cores, &core_cnt)) {
1793 /* All methods are required */
1794 if(!methods->accessible_cores |
1795 !methods->enable_counters || !methods->disable_counters ||
1796 !methods->on_idle || !methods->on_idle_exit) {
1818 memcpy(&(pm->methods), methods, sizeof(perf_monitor_methods_t));
1868 * callback methods. When the given callback methods are called from xnu, the
1875 pmc_methods_t *methods, void *object) {
1879 if(!monitor || !pmc_object || !methods || !object) {
1884 if(MACH_PMC_METHODS_VERSION != methods->pmc_methods_version) {
1889 /* All methods are required. */
1890 if(!methods->create_config ||
1891 !methods->free_config ||
1892 !methods->config_set_value ||
1893 !methods->config_set_threshold ||
1894 !methods->config_set_handler ||
1895 !methods->set_config ||
1896 !methods->get_monitor ||
1897 !methods->get_name ||
1898 !methods->accessible_from_core ||
1899 !methods->accessible_cores ||
1900 !methods->get_count ||
1901 !methods->set_count ||
1902 !methods->disable ||
1903 !methods->enable ||
1904 !methods->open ||
1905 !methods->close) {
1935 memcpy(&(pmc->methods), methods, sizeof(pmc_methods_t));
1998 * Begin in-kernel and in-kext KPI methods
2017 tmp->object = pmc->methods.create_config(pmc->object);
2073 ret = pmc->methods.config_set_value(config->object, id, value);
2085 * PMC Threshold handler methods will have the pmc_reservation_t that generated the interrupt
2288 const char *name = pmc->methods.get_name(pmc->object);
2309 ret = pmc->methods.accessible_cores(pmc->object, logicalCores, logicalCoreCt);
2324 kern_return_t ret = resv->pmc->methods.config_set_threshold(config->object,
2336 if(KERN_SUCCESS != resv->pmc->methods.config_set_handler(config->object,
2417 if (!(pmc->monitor->methods.flags & PERFMON_FLAG_SUPPORTS_CONTEXT_SWITCHING)) {
2475 if (!(pmc->monitor->methods.flags & PERFMON_FLAG_SUPPORTS_CONTEXT_SWITCHING)) {
2610 ret = reservation->pmc->methods.get_count(reservation->pmc->object, value);
2668 ret = reservation->pmc->methods.set_count(reservation->pmc->object, value);
2751 perf_monitor_methods_t *methods = &(monitor->methods);
2752 if ((methods->flags & PERFMON_FLAG_ALWAYS_ACTIVE) || (monitor->reservedCounters)) {
2753 methods->on_idle(monitor->object);
2776 perf_monitor_methods_t *methods = &(monitor->methods);
2777 if ((methods->flags & PERFMON_FLAG_ALWAYS_ACTIVE) || (monitor->reservedCounters)) {
2778 methods->on_idle_exit(monitor->object);
2851 * methods that return failures.
2854 perf_monitor_methods_t *methods __unused) {
2863 pmc_object_t pmc __unused, pmc_methods_t *methods __unused, void *object __unused) {