Lines Matching defs:dirfd

190 static int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load)
196 io_dir__init(&format_dir, dirfd);
213 int fd = openat(dirfd, name, O_RDONLY);
229 close(format_dir.dirfd);
238 static int pmu_format(struct perf_pmu *pmu, int dirfd, const char *name, bool eager_load)
242 fd = perf_pmu__pathname_fd(dirfd, name, "format", O_DIRECTORY);
809 static struct perf_cpu_map *pmu_cpumask(int dirfd, const char *pmu_name, bool is_core)
826 io.fd = perf_pmu__pathname_fd(dirfd, pmu_name, *template, O_RDONLY);
846 static bool pmu_is_uncore(int dirfd, const char *name)
850 fd = perf_pmu__pathname_fd(dirfd, name, "cpumask", O_PATH);
1132 static char *pmu_find_alias_name(struct perf_pmu *pmu, int dirfd)
1134 FILE *file = perf_pmu__open_file_at(pmu, dirfd, "alias");
1155 static int pmu_max_precise(int dirfd, struct perf_pmu *pmu)
1159 perf_pmu__scan_file_at(pmu, dirfd, "caps/max_precise", "%d", &max_precise);
1231 struct perf_pmu *perf_pmu__lookup(struct list_head *pmus, int dirfd, const char *name,
1249 if (perf_pmu__scan_file_at(pmu, dirfd, "type", "%u", &pmu->type) != 1) {
1263 if (pmu_format(pmu, dirfd, name, eager_load)) {
1269 pmu->cpus = pmu_cpumask(dirfd, name, pmu->is_core);
1271 pmu->is_uncore = pmu_is_uncore(dirfd, name);
1274 pmu->max_precise = pmu_max_precise(dirfd, pmu);
1275 pmu->alias_name = pmu_find_alias_name(pmu, dirfd);
1289 pmu_aliases_parse_eager(pmu, dirfd);
2444 FILE *perf_pmu__open_file_at(const struct perf_pmu *pmu, int dirfd, const char *name)
2448 fd = perf_pmu__pathname_fd(dirfd, pmu->name, name, O_RDONLY);
2472 int perf_pmu__scan_file_at(const struct perf_pmu *pmu, int dirfd, const char *name,
2480 file = perf_pmu__open_file_at(pmu, dirfd, name);
2726 int perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename, int flags)
2731 return openat(dirfd, path, flags);