Lines Matching defs: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,
1523 ret = store_pm->methods.disable_counters(store_pm->object, &store_pmc_obj, 1);
1530 ret = store_pmc->methods.disable(store_pmc_obj);
1536 ret = store_pmc->methods.get_count(store_pmc_obj, &reservation->value);
1573 ret = load_pmc->methods.set_config(load_pmc_obj, reservation->config->object);
1580 ret = load_pmc->methods.set_count(load_pmc_obj, reservation->value);
1587 ret = load_pmc->methods.enable(load_pmc_obj);
1597 ret = load_pm->methods.enable_counters(load_pm->object, &load_pmc_obj, 1);
1628 ret = pmc->methods.accessible_from_core(pmc->object, logicalCore);
1757 * callback methods. The given perf_monitor_object_t is the first argument to
1761 perf_monitor_methods_t *methods) {
1766 if(!monitor || !methods) {
1771 if(MACH_PERFMON_METHODS_VERSION != methods->perf_monitor_methods_version) {
1778 if (methods->flags & PERFMON_FLAG_REQUIRES_IDLE_NOTIFICATIONS) {
1782 if (KERN_SUCCESS == methods->accessible_cores(monitor, &cores, &core_cnt)) {
1795 /* All methods are required */
1796 if(!methods->accessible_cores |
1797 !methods->enable_counters || !methods->disable_counters ||
1798 !methods->on_idle || !methods->on_idle_exit) {
1820 memcpy(&(pm->methods), methods, sizeof(perf_monitor_methods_t));
1870 * callback methods. When the given callback methods are called from xnu, the
1877 pmc_methods_t *methods, void *object) {
1881 if(!monitor || !pmc_object || !methods || !object) {
1886 if(MACH_PMC_METHODS_VERSION != methods->pmc_methods_version) {
1891 /* All methods are required. */
1892 if(!methods->create_config ||
1893 !methods->free_config ||
1894 !methods->config_set_value ||
1895 !methods->config_set_threshold ||
1896 !methods->config_set_handler ||
1897 !methods->set_config ||
1898 !methods->get_monitor ||
1899 !methods->get_name ||
1900 !methods->accessible_from_core ||
1901 !methods->accessible_cores ||
1902 !methods->get_count ||
1903 !methods->set_count ||
1904 !methods->disable ||
1905 !methods->enable ||
1906 !methods->open ||
1907 !methods->close) {
1937 memcpy(&(pmc->methods), methods, sizeof(pmc_methods_t));
2000 * Begin in-kernel and in-kext KPI methods
2019 tmp->object = pmc->methods.create_config(pmc->object);
2075 ret = pmc->methods.config_set_value(config->object, id, value);
2087 * PMC Threshold handler methods will have the pmc_reservation_t that generated the interrupt
2290 const char *name = pmc->methods.get_name(pmc->object);
2311 ret = pmc->methods.accessible_cores(pmc->object, logicalCores, logicalCoreCt);
2326 kern_return_t ret = resv->pmc->methods.config_set_threshold(config->object,
2338 if(KERN_SUCCESS != resv->pmc->methods.config_set_handler(config->object,
2419 if (!(pmc->monitor->methods.flags & PERFMON_FLAG_SUPPORTS_CONTEXT_SWITCHING)) {
2477 if (!(pmc->monitor->methods.flags & PERFMON_FLAG_SUPPORTS_CONTEXT_SWITCHING)) {
2612 ret = reservation->pmc->methods.get_count(reservation->pmc->object, value);
2670 ret = reservation->pmc->methods.set_count(reservation->pmc->object, value);
2753 perf_monitor_methods_t *methods = &(monitor->methods);
2754 if ((methods->flags & PERFMON_FLAG_ALWAYS_ACTIVE) || (monitor->reservedCounters)) {
2755 methods->on_idle(monitor->object);
2778 perf_monitor_methods_t *methods = &(monitor->methods);
2779 if ((methods->flags & PERFMON_FLAG_ALWAYS_ACTIVE) || (monitor->reservedCounters)) {
2780 methods->on_idle_exit(monitor->object);
2853 * methods that return failures.
2856 perf_monitor_methods_t *methods __unused) {
2865 pmc_object_t pmc __unused, pmc_methods_t *methods __unused, void *object __unused) {