Lines Matching refs:section
597 struct perf_config_section *section; in find_section() local
599 list_for_each_entry(section, sections, node) in find_section()
600 if (!strcmp(section->name, section_name)) in find_section()
601 return section; in find_section()
607 struct perf_config_section *section) in find_config_item() argument
611 list_for_each_entry(item, §ion->items, node) in find_config_item()
621 struct perf_config_section *section = zalloc(sizeof(*section)); in add_section() local
623 if (!section) in add_section()
626 INIT_LIST_HEAD(§ion->items); in add_section()
627 section->name = strdup(section_name); in add_section()
628 if (!section->name) { in add_section()
630 free(section); in add_section()
634 list_add_tail(§ion->node, sections); in add_section()
635 return section; in add_section()
638 static struct perf_config_item *add_config_item(struct perf_config_section *section, in add_config_item() argument
653 list_add_tail(&item->node, §ion->items); in add_config_item()
675 struct perf_config_section *section = NULL; in collect_config() local
695 section = find_section(sections, section_name); in collect_config()
696 if (!section) { in collect_config()
697 section = add_section(sections, section_name); in collect_config()
698 if (!section) in collect_config()
702 item = find_config_item(name, section); in collect_config()
704 item = add_config_item(section, name); in collect_config()
715 section->from_system_config = true; in collect_config()
718 section->from_system_config = false; in collect_config()
793 struct perf_config_section *section; in perf_config_set() local
796 perf_config_set__for_each_entry(set, section, item) { in perf_config_set()
801 section->name, item->name); in perf_config_set()
845 static void perf_config_section__purge(struct perf_config_section *section) in perf_config_section__purge() argument
849 list_for_each_entry_safe(item, tmp, §ion->items, node) { in perf_config_section__purge()
855 static void perf_config_section__delete(struct perf_config_section *section) in perf_config_section__delete() argument
857 perf_config_section__purge(section); in perf_config_section__delete()
858 zfree(§ion->name); in perf_config_section__delete()
859 free(section); in perf_config_section__delete()
864 struct perf_config_section *section, *tmp; in perf_config_set__purge() local
866 list_for_each_entry_safe(section, tmp, &set->sections, node) { in perf_config_set__purge()
867 list_del_init(§ion->node); in perf_config_set__purge()
868 perf_config_section__delete(section); in perf_config_set__purge()