Lines Matching refs:dirfd

185 int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load)
191 format_dir = fdopendir(dirfd);
210 int fd = openat(dirfd, name, O_RDONLY);
235 static int pmu_format(struct perf_pmu *pmu, int dirfd, const char *name)
239 fd = perf_pmu__pathname_fd(dirfd, name, "format", O_DIRECTORY);
690 static struct perf_cpu_map *pmu_cpumask(int dirfd, const char *name, bool is_core)
705 file = perf_pmu__open_file_at(&pmu, dirfd, *template);
718 static bool pmu_is_uncore(int dirfd, const char *name)
722 fd = perf_pmu__pathname_fd(dirfd, name, "cpumask", O_PATH);
958 static char *pmu_find_alias_name(struct perf_pmu *pmu, int dirfd)
960 FILE *file = perf_pmu__open_file_at(pmu, dirfd, "alias");
981 static int pmu_max_precise(int dirfd, struct perf_pmu *pmu)
985 perf_pmu__scan_file_at(pmu, dirfd, "caps/max_precise", "%d", &max_precise);
996 struct perf_pmu *perf_pmu__lookup(struct list_head *pmus, int dirfd, const char *name)
1013 if (perf_pmu__scan_file_at(pmu, dirfd, "type", "%u", &type) != 1)
1025 if (pmu_format(pmu, dirfd, name))
1029 pmu->cpus = pmu_cpumask(dirfd, name, pmu->is_core);
1032 pmu->is_uncore = pmu_is_uncore(dirfd, name);
1035 pmu->max_precise = pmu_max_precise(dirfd, pmu);
1036 pmu->alias_name = pmu_find_alias_name(pmu, dirfd);
1800 FILE *perf_pmu__open_file_at(const struct perf_pmu *pmu, int dirfd, const char *name)
1804 fd = perf_pmu__pathname_fd(dirfd, pmu->name, name, O_RDONLY);
1828 int perf_pmu__scan_file_at(const struct perf_pmu *pmu, int dirfd, const char *name,
1836 file = perf_pmu__open_file_at(pmu, dirfd, name);
1921 caps_fd = dirfd(caps_dir);
2067 int perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename, int flags)
2072 return openat(dirfd, path, flags);