Lines Matching full:pmu
20 #include "pmu.h"
22 #include <util/pmu-bison.h>
23 #include <util/pmu-flex.h>
40 /* An event loaded from /sys/devices/<pmu>/events. */
45 * An event loaded from a /sys/devices/<pmu>/identifier matched json
53 * pmu-events.c, created by parsing the pmu-events json files.
73 * differ from the PMU name as it won't have suffixes.
128 static int pmu_aliases_parse(struct perf_pmu *pmu);
171 static void perf_pmu_format__load(struct perf_pmu *pmu, struct perf_pmu_format *format) in perf_pmu_format__load() argument
179 if (!perf_pmu__pathname_scnprintf(path, sizeof(path), pmu->name, "format")) in perf_pmu_format__load()
197 int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load) in perf_pmu__format_parse() argument
214 format = perf_pmu__new_format(&pmu->format, name); in perf_pmu__format_parse()
243 * Reading/parsing the default pmu format definition, which should be
247 static int pmu_format(struct perf_pmu *pmu, int dirfd, const char *name) in pmu_format() argument
256 if (perf_pmu__format_parse(pmu, fd, /*eager_load=*/false)) in pmu_format()
299 static int perf_pmu__parse_scale(struct perf_pmu *pmu, struct perf_pmu_alias *alias) in perf_pmu__parse_scale() argument
311 scnprintf(path + len, sizeof(path) - len, "%s/events/%s.scale", pmu->name, alias->name); in perf_pmu__parse_scale()
335 static int perf_pmu__parse_unit(struct perf_pmu *pmu, struct perf_pmu_alias *alias) in perf_pmu__parse_unit() argument
346 scnprintf(path + len, sizeof(path) - len, "%s/events/%s.unit", pmu->name, alias->name); in perf_pmu__parse_unit()
371 perf_pmu__parse_per_pkg(struct perf_pmu *pmu, struct perf_pmu_alias *alias) in perf_pmu__parse_per_pkg() argument
380 scnprintf(path + len, sizeof(path) - len, "%s/events/%s.per-pkg", pmu->name, alias->name); in perf_pmu__parse_per_pkg()
392 static int perf_pmu__parse_snapshot(struct perf_pmu *pmu, struct perf_pmu_alias *alias) in perf_pmu__parse_snapshot() argument
401 scnprintf(path + len, sizeof(path) - len, "%s/events/%s.snapshot", pmu->name, alias->name); in perf_pmu__parse_snapshot()
424 static void perf_pmu__del_aliases(struct perf_pmu *pmu) in perf_pmu__del_aliases() argument
428 list_for_each_entry_safe(alias, tmp, &pmu->aliases, list) { in perf_pmu__del_aliases()
434 static struct perf_pmu_alias *perf_pmu__find_alias(struct perf_pmu *pmu, in perf_pmu__find_alias() argument
440 if (load && !pmu->sysfs_aliases_loaded) { in perf_pmu__find_alias()
445 * Test if alias/event 'name' exists in the PMU's sysfs/events in perf_pmu__find_alias()
453 has_sysfs_event = perf_pmu__file_exists(pmu, event_file_name); in perf_pmu__find_alias()
458 has_sysfs_event = perf_pmu__file_exists(pmu, event_file_name); in perf_pmu__find_alias()
461 pmu_aliases_parse(pmu); in perf_pmu__find_alias()
464 list_for_each_entry(alias, &pmu->aliases, list) { in perf_pmu__find_alias()
489 static void read_alias_info(struct perf_pmu *pmu, struct perf_pmu_alias *alias) in read_alias_info() argument
497 perf_pmu__parse_unit(pmu, alias); in read_alias_info()
498 perf_pmu__parse_scale(pmu, alias); in read_alias_info()
499 perf_pmu__parse_per_pkg(pmu, alias); in read_alias_info()
500 perf_pmu__parse_snapshot(pmu, alias); in read_alias_info()
504 struct perf_pmu *pmu; member
515 read_alias_info(data->pmu, data->alias); in update_alias()
534 static int perf_pmu__new_alias(struct perf_pmu *pmu, const char *name, in perf_pmu__new_alias() argument
543 if (perf_pmu__find_alias(pmu, name, /*load=*/ false)) { in perf_pmu__new_alias()
554 pmu_name = pe->pmu; in perf_pmu__new_alias()
592 if (pmu->events_table) { in perf_pmu__new_alias()
595 .pmu = pmu, in perf_pmu__new_alias()
598 if (pmu_events_table__find_event(pmu->events_table, pmu, name, in perf_pmu__new_alias()
600 pmu->cpu_json_aliases++; in perf_pmu__new_alias()
602 pmu->sysfs_aliases++; in perf_pmu__new_alias()
605 pmu->cpu_json_aliases++; in perf_pmu__new_alias()
608 pmu->sys_json_aliases++; in perf_pmu__new_alias()
612 list_add_tail(&alias->list, &pmu->aliases); in perf_pmu__new_alias()
634 * Reading the pmu event aliases definition, which should be located at:
637 static int pmu_aliases_parse(struct perf_pmu *pmu) in pmu_aliases_parse() argument
648 scnprintf(path + len, sizeof(path) - len, "%s/events", pmu->name); in pmu_aliases_parse()
652 pmu->sysfs_aliases_loaded = true; in pmu_aliases_parse()
686 if (perf_pmu__new_alias(pmu, name, /*desc=*/ NULL, in pmu_aliases_parse()
695 pmu->sysfs_aliases_loaded = true; in pmu_aliases_parse()
737 struct perf_pmu pmu = {.name = pmu_name}; in pmu_cpumask() local
742 file = perf_pmu__open_file_at(&pmu, dirfd, *template); in pmu_cpumask()
783 * is_sysfs_pmu_core() - PMU CORE devices have different name other than cpu in
787 * @name: The PMU name such as "cpu_atom".
798 char *perf_pmu__getcpuid(struct perf_pmu *pmu) in perf_pmu__getcpuid() argument
807 cpuid = get_cpuid_str(pmu); in perf_pmu__getcpuid()
861 * pmu_uncore_alias_match - does name match the PMU name?
865 * @name: a real full PMU name as from sysfs.
880 * uncore alias may be from different PMU with common prefix in pmu_uncore_alias_match()
890 * list of tokens, orderly contained in the matching PMU name. in pmu_uncore_alias_match()
892 * Example: For alias "socket,pmuname" and PMU "socketX_pmunameY", we in pmu_uncore_alias_match()
943 struct perf_pmu *pmu = vdata; in pmu_add_cpu_aliases_map_callback() local
945 perf_pmu__new_alias(pmu, pe->name, pe->desc, pe->event, /*val_fd=*/ NULL, in pmu_add_cpu_aliases_map_callback()
952 * PMU and add them to the list 'head'.
954 void pmu_add_cpu_aliases_table(struct perf_pmu *pmu, const struct pmu_events_table *table) in pmu_add_cpu_aliases_table() argument
956 pmu_events_table__for_each_event(table, pmu, pmu_add_cpu_aliases_map_callback, pmu); in pmu_add_cpu_aliases_table()
959 static void pmu_add_cpu_aliases(struct perf_pmu *pmu) in pmu_add_cpu_aliases() argument
961 if (!pmu->events_table) in pmu_add_cpu_aliases()
964 if (pmu->cpu_aliases_added) in pmu_add_cpu_aliases()
967 pmu_add_cpu_aliases_table(pmu, pmu->events_table); in pmu_add_cpu_aliases()
968 pmu->cpu_aliases_added = true; in pmu_add_cpu_aliases()
975 struct perf_pmu *pmu = vdata; in pmu_add_sys_aliases_iter_fn() local
977 if (!pe->compat || !pe->pmu) in pmu_add_sys_aliases_iter_fn()
980 if (pmu_uncore_alias_match(pe->pmu, pmu->name) && in pmu_add_sys_aliases_iter_fn()
981 pmu_uncore_identifier_match(pe->compat, pmu->id)) { in pmu_add_sys_aliases_iter_fn()
982 perf_pmu__new_alias(pmu, in pmu_add_sys_aliases_iter_fn()
994 void pmu_add_sys_aliases(struct perf_pmu *pmu) in pmu_add_sys_aliases() argument
996 if (!pmu->id) in pmu_add_sys_aliases()
999 pmu_for_each_sys_event(pmu_add_sys_aliases_iter_fn, pmu); in pmu_add_sys_aliases()
1003 perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused) in perf_pmu__get_default_config()
1020 static int pmu_max_precise(int dirfd, struct perf_pmu *pmu) in pmu_max_precise() argument
1024 perf_pmu__scan_file_at(pmu, dirfd, "caps/max_precise", "%d", &max_precise); in pmu_max_precise()
1030 struct perf_pmu *pmu; in perf_pmu__lookup() local
1035 pmu = zalloc(sizeof(*pmu)); in perf_pmu__lookup()
1036 if (!pmu) in perf_pmu__lookup()
1039 pmu->name = strdup(name); in perf_pmu__lookup()
1040 if (!pmu->name) in perf_pmu__lookup()
1044 * Read type early to fail fast if a lookup name isn't a PMU. Ensure in perf_pmu__lookup()
1047 if (perf_pmu__scan_file_at(pmu, dirfd, "type", "%u", &type) != 1) in perf_pmu__lookup()
1050 INIT_LIST_HEAD(&pmu->format); in perf_pmu__lookup()
1051 INIT_LIST_HEAD(&pmu->aliases); in perf_pmu__lookup()
1052 INIT_LIST_HEAD(&pmu->caps); in perf_pmu__lookup()
1055 * The pmu data we store & need consists of the pmu in perf_pmu__lookup()
1059 if (pmu_format(pmu, dirfd, name)) in perf_pmu__lookup()
1062 pmu->is_core = is_pmu_core(name); in perf_pmu__lookup()
1063 pmu->cpus = pmu_cpumask(dirfd, name, pmu->is_core); in perf_pmu__lookup()
1067 pmu->alias_name = strdup(alias_name); in perf_pmu__lookup()
1068 if (!pmu->alias_name) in perf_pmu__lookup()
1072 pmu->type = type; in perf_pmu__lookup()
1073 pmu->is_uncore = pmu_is_uncore(dirfd, name); in perf_pmu__lookup()
1074 if (pmu->is_uncore) in perf_pmu__lookup()
1075 pmu->id = pmu_id(name); in perf_pmu__lookup()
1076 pmu->max_precise = pmu_max_precise(dirfd, pmu); in perf_pmu__lookup()
1077 pmu->events_table = perf_pmu__find_events_table(pmu); in perf_pmu__lookup()
1079 * Load the sys json events/aliases when loading the PMU as each event in perf_pmu__lookup()
1084 pmu_add_sys_aliases(pmu); in perf_pmu__lookup()
1085 list_add_tail(&pmu->list, pmus); in perf_pmu__lookup()
1087 pmu->default_config = perf_pmu__get_default_config(pmu); in perf_pmu__lookup()
1089 return pmu; in perf_pmu__lookup()
1091 zfree(&pmu->name); in perf_pmu__lookup()
1092 free(pmu); in perf_pmu__lookup()
1096 /* Creates the PMU when sysfs scanning fails. */
1099 struct perf_pmu *pmu = zalloc(sizeof(*pmu)); in perf_pmu__create_placeholder_core_pmu() local
1101 if (!pmu) in perf_pmu__create_placeholder_core_pmu()
1104 pmu->name = strdup("cpu"); in perf_pmu__create_placeholder_core_pmu()
1105 if (!pmu->name) { in perf_pmu__create_placeholder_core_pmu()
1106 free(pmu); in perf_pmu__create_placeholder_core_pmu()
1110 pmu->is_core = true; in perf_pmu__create_placeholder_core_pmu()
1111 pmu->type = PERF_TYPE_RAW; in perf_pmu__create_placeholder_core_pmu()
1112 pmu->cpus = cpu_map__online(); in perf_pmu__create_placeholder_core_pmu()
1114 INIT_LIST_HEAD(&pmu->format); in perf_pmu__create_placeholder_core_pmu()
1115 INIT_LIST_HEAD(&pmu->aliases); in perf_pmu__create_placeholder_core_pmu()
1116 INIT_LIST_HEAD(&pmu->caps); in perf_pmu__create_placeholder_core_pmu()
1117 list_add_tail(&pmu->list, core_pmus); in perf_pmu__create_placeholder_core_pmu()
1118 return pmu; in perf_pmu__create_placeholder_core_pmu()
1121 void perf_pmu__warn_invalid_formats(struct perf_pmu *pmu) in perf_pmu__warn_invalid_formats() argument
1125 if (pmu->formats_checked) in perf_pmu__warn_invalid_formats()
1128 pmu->formats_checked = true; in perf_pmu__warn_invalid_formats()
1130 /* fake pmu doesn't have format list */ in perf_pmu__warn_invalid_formats()
1131 if (pmu == &perf_pmu__fake) in perf_pmu__warn_invalid_formats()
1134 list_for_each_entry(format, &pmu->format, list) { in perf_pmu__warn_invalid_formats()
1135 perf_pmu_format__load(pmu, format); in perf_pmu__warn_invalid_formats()
1139 pmu->name, format->name, format->value); in perf_pmu__warn_invalid_formats()
1147 struct perf_pmu *pmu = evsel__find_pmu(evsel); in evsel__is_aux_event() local
1149 return pmu && pmu->auxtrace; in evsel__is_aux_event()
1161 void evsel__set_config_if_unset(struct perf_pmu *pmu, struct evsel *evsel, in evsel__set_config_if_unset() argument
1170 bits = perf_pmu__format_bits(pmu, config_name); in evsel__set_config_if_unset()
1193 __u64 perf_pmu__format_bits(struct perf_pmu *pmu, const char *name) in perf_pmu__format_bits() argument
1195 struct perf_pmu_format *format = pmu_find_format(&pmu->format, name); in perf_pmu__format_bits()
1208 int perf_pmu__format_type(struct perf_pmu *pmu, const char *name) in perf_pmu__format_type() argument
1210 struct perf_pmu_format *format = pmu_find_format(&pmu->format, name); in perf_pmu__format_type()
1215 perf_pmu_format__load(pmu, format); in perf_pmu__format_type()
1306 static int pmu_config_term(struct perf_pmu *pmu, in pmu_config_term() argument
1330 format = pmu_find_format(&pmu->format, term->config); in pmu_config_term()
1332 char *pmu_term = pmu_formats_string(&pmu->format); in pmu_config_term()
1337 "unknown term '%s' for pmu '%s'", in pmu_config_term()
1338 term->config, pmu->name) < 0) in pmu_config_term()
1352 perf_pmu_format__load(pmu, format); in pmu_config_term()
1429 int perf_pmu__config_terms(struct perf_pmu *pmu, in perf_pmu__config_terms() argument
1437 if (pmu_config_term(pmu, attr, term, head_terms, zero, err)) in perf_pmu__config_terms()
1447 * 2) pmu format definitions - specified by pmu parameter
1449 int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr, in perf_pmu__config() argument
1453 bool zero = !!pmu->default_config; in perf_pmu__config()
1455 return perf_pmu__config_terms(pmu, attr, head_terms, zero, err); in perf_pmu__config()
1458 static struct perf_pmu_alias *pmu_find_alias(struct perf_pmu *pmu, in pmu_find_alias() argument
1470 if (pmu_find_format(&pmu->format, term->config)) in pmu_find_alias()
1482 alias = perf_pmu__find_alias(pmu, name, /*load=*/ true); in pmu_find_alias()
1483 if (alias || pmu->cpu_aliases_added) in pmu_find_alias()
1487 if (pmu->events_table && in pmu_find_alias()
1488 pmu_events_table__find_event(pmu->events_table, pmu, name, in pmu_find_alias()
1490 pmu) == 0) { in pmu_find_alias()
1491 alias = perf_pmu__find_alias(pmu, name, /*load=*/ false); in pmu_find_alias()
1497 static int check_info_data(struct perf_pmu *pmu, in check_info_data() argument
1503 read_alias_info(pmu, alias); in check_info_data()
1544 int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms, in perf_pmu__check_alias() argument
1562 alias = pmu_find_alias(pmu, term); in perf_pmu__check_alias()
1573 ret = check_info_data(pmu, alias, info, err, term->err_term); in perf_pmu__check_alias()
1614 int perf_pmu__find_event(struct perf_pmu *pmu, const char *event, void *state, pmu_event_callback c… in perf_pmu__find_event() argument
1623 return perf_pmu__for_each_event(pmu, /*skip_duplicate_pmus=*/ false, in perf_pmu__find_event()
1638 bool perf_pmu__has_format(const struct perf_pmu *pmu, const char *name) in perf_pmu__has_format() argument
1642 list_for_each_entry(format, &pmu->format, list) { in perf_pmu__has_format()
1654 bool perf_pmu__supports_legacy_cache(const struct perf_pmu *pmu) in perf_pmu__supports_legacy_cache() argument
1656 return pmu->is_core; in perf_pmu__supports_legacy_cache()
1659 bool perf_pmu__auto_merge_stats(const struct perf_pmu *pmu) in perf_pmu__auto_merge_stats() argument
1661 return !pmu->is_core || perf_pmus__num_core_pmus() == 1; in perf_pmu__auto_merge_stats()
1664 bool perf_pmu__have_event(struct perf_pmu *pmu, const char *name) in perf_pmu__have_event() argument
1666 if (perf_pmu__find_alias(pmu, name, /*load=*/ true) != NULL) in perf_pmu__have_event()
1668 if (pmu->cpu_aliases_added || !pmu->events_table) in perf_pmu__have_event()
1670 return pmu_events_table__find_event(pmu->events_table, pmu, name, NULL, NULL) == 0; in perf_pmu__have_event()
1673 size_t perf_pmu__num_events(struct perf_pmu *pmu) in perf_pmu__num_events() argument
1677 pmu_aliases_parse(pmu); in perf_pmu__num_events()
1678 nr = pmu->sysfs_aliases + pmu->sys_json_aliases;; in perf_pmu__num_events()
1680 if (pmu->cpu_aliases_added) in perf_pmu__num_events()
1681 nr += pmu->cpu_json_aliases; in perf_pmu__num_events()
1682 else if (pmu->events_table) in perf_pmu__num_events()
1683 nr += pmu_events_table__num_events(pmu->events_table, pmu) - pmu->cpu_json_aliases; in perf_pmu__num_events()
1685 assert(pmu->cpu_json_aliases == 0); in perf_pmu__num_events()
1687 return pmu->selectable ? nr + 1 : nr; in perf_pmu__num_events()
1697 static char *format_alias(char *buf, int len, const struct perf_pmu *pmu, in format_alias() argument
1702 ? pmu_name_len_no_suffix(pmu->name, /*num=*/NULL) in format_alias()
1703 : (int)strlen(pmu->name); in format_alias()
1704 int used = snprintf(buf, len, "%.*s/%s", pmu_name_len, pmu->name, alias->name); in format_alias()
1726 int perf_pmu__for_each_event(struct perf_pmu *pmu, bool skip_duplicate_pmus, in perf_pmu__for_each_event() argument
1732 .pmu = pmu, in perf_pmu__for_each_event()
1738 pmu_aliases_parse(pmu); in perf_pmu__for_each_event()
1739 pmu_add_cpu_aliases(pmu); in perf_pmu__for_each_event()
1740 list_for_each_entry(event, &pmu->aliases, list) { in perf_pmu__for_each_event()
1743 info.pmu_name = event->pmu_name ?: pmu->name; in perf_pmu__for_each_event()
1749 info.name = format_alias(buf, sizeof(buf), pmu, event, in perf_pmu__for_each_event()
1751 if (pmu->is_core) { in perf_pmu__for_each_event()
1777 if (pmu->selectable) { in perf_pmu__for_each_event()
1779 snprintf(buf, sizeof(buf), "%s//", pmu->name); in perf_pmu__for_each_event()
1786 info.pmu_name = pmu->name; in perf_pmu__for_each_event()
1795 bool pmu__name_match(const struct perf_pmu *pmu, const char *pmu_name) in pmu__name_match() argument
1797 return !strcmp(pmu->name, pmu_name) || in pmu__name_match()
1798 (pmu->is_uncore && pmu_uncore_alias_match(pmu_name, pmu->name)) || in pmu__name_match()
1801 * PMU as the PMU name varies across architectures. in pmu__name_match()
1803 (pmu->is_core && !strcmp(pmu_name, "default_core")); in pmu__name_match()
1806 bool perf_pmu__is_software(const struct perf_pmu *pmu) in perf_pmu__is_software() argument
1814 if (pmu->is_core || pmu->is_uncore || pmu->auxtrace) in perf_pmu__is_software()
1816 switch (pmu->type) { in perf_pmu__is_software()
1826 if (!strcmp(pmu->name, known_sw_pmus[i])) in perf_pmu__is_software()
1832 FILE *perf_pmu__open_file(struct perf_pmu *pmu, const char *name) in perf_pmu__open_file() argument
1836 if (!perf_pmu__pathname_scnprintf(path, sizeof(path), pmu->name, name) || in perf_pmu__open_file()
1843 FILE *perf_pmu__open_file_at(struct perf_pmu *pmu, int dirfd, const char *name) in perf_pmu__open_file_at() argument
1847 fd = perf_pmu__pathname_fd(dirfd, pmu->name, name, O_RDONLY); in perf_pmu__open_file_at()
1854 int perf_pmu__scan_file(struct perf_pmu *pmu, const char *name, const char *fmt, in perf_pmu__scan_file() argument
1862 file = perf_pmu__open_file(pmu, name); in perf_pmu__scan_file()
1871 int perf_pmu__scan_file_at(struct perf_pmu *pmu, int dirfd, const char *name, in perf_pmu__scan_file_at() argument
1879 file = perf_pmu__open_file_at(pmu, dirfd, name); in perf_pmu__scan_file_at()
1888 bool perf_pmu__file_exists(struct perf_pmu *pmu, const char *name) in perf_pmu__file_exists() argument
1892 if (!perf_pmu__pathname_scnprintf(path, sizeof(path), pmu->name, name)) in perf_pmu__file_exists()
1922 static void perf_pmu__del_caps(struct perf_pmu *pmu) in perf_pmu__del_caps() argument
1926 list_for_each_entry_safe(caps, tmp, &pmu->caps, list) { in perf_pmu__del_caps()
1935 * Reading/parsing the given pmu capabilities, which should be located at:
1939 int perf_pmu__caps_parse(struct perf_pmu *pmu) in perf_pmu__caps_parse() argument
1947 if (pmu->caps_initialized) in perf_pmu__caps_parse()
1948 return pmu->nr_caps; in perf_pmu__caps_parse()
1950 pmu->nr_caps = 0; in perf_pmu__caps_parse()
1952 if (!perf_pmu__pathname_scnprintf(caps_path, sizeof(caps_path), pmu->name, "caps")) in perf_pmu__caps_parse()
1956 pmu->caps_initialized = true; in perf_pmu__caps_parse()
1985 (perf_pmu__new_caps(&pmu->caps, name, value) < 0)) { in perf_pmu__caps_parse()
1990 pmu->nr_caps++; in perf_pmu__caps_parse()
1996 pmu->caps_initialized = true; in perf_pmu__caps_parse()
1997 return pmu->nr_caps; in perf_pmu__caps_parse()
2000 static void perf_pmu__compute_config_masks(struct perf_pmu *pmu) in perf_pmu__compute_config_masks() argument
2004 if (pmu->config_masks_computed) in perf_pmu__compute_config_masks()
2007 list_for_each_entry(format, &pmu->format, list) { in perf_pmu__compute_config_masks()
2014 pmu->config_masks_present = true; in perf_pmu__compute_config_masks()
2015 mask = &pmu->config_masks[format->value]; in perf_pmu__compute_config_masks()
2020 pmu->config_masks_computed = true; in perf_pmu__compute_config_masks()
2023 void perf_pmu__warn_invalid_config(struct perf_pmu *pmu, __u64 config, in perf_pmu__warn_invalid_config() argument
2030 perf_pmu__compute_config_masks(pmu); in perf_pmu__warn_invalid_config()
2035 if (!pmu->config_masks_present) in perf_pmu__warn_invalid_config()
2038 bits = config & ~pmu->config_masks[config_num]; in perf_pmu__warn_invalid_config()
2118 void perf_pmu__delete(struct perf_pmu *pmu) in perf_pmu__delete() argument
2120 perf_pmu__del_formats(&pmu->format); in perf_pmu__delete()
2121 perf_pmu__del_aliases(pmu); in perf_pmu__delete()
2122 perf_pmu__del_caps(pmu); in perf_pmu__delete()
2124 perf_cpu_map__put(pmu->cpus); in perf_pmu__delete()
2126 zfree(&pmu->default_config); in perf_pmu__delete()
2127 zfree(&pmu->name); in perf_pmu__delete()
2128 zfree(&pmu->alias_name); in perf_pmu__delete()
2129 zfree(&pmu->id); in perf_pmu__delete()
2130 free(pmu); in perf_pmu__delete()
2133 const char *perf_pmu__name_from_config(struct perf_pmu *pmu, u64 config) in perf_pmu__name_from_config() argument
2137 if (!pmu) in perf_pmu__name_from_config()
2140 pmu_aliases_parse(pmu); in perf_pmu__name_from_config()
2141 pmu_add_cpu_aliases(pmu); in perf_pmu__name_from_config()
2142 list_for_each_entry(event, &pmu->aliases, list) { in perf_pmu__name_from_config()
2144 int ret = perf_pmu__config(pmu, &attr, &event->terms, NULL); in perf_pmu__name_from_config()