Lines Matching defs:dirfd
184 int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load)
190 format_dir = fdopendir(dirfd);
209 int fd = openat(dirfd, name, O_RDONLY);
234 static int pmu_format(struct perf_pmu *pmu, int dirfd, const char *name)
238 fd = perf_pmu__pathname_fd(dirfd, name, "format", O_DIRECTORY);
687 static struct perf_cpu_map *pmu_cpumask(int dirfd, const char *name, bool is_core)
702 file = perf_pmu__open_file_at(&pmu, dirfd, *template);
715 static bool pmu_is_uncore(int dirfd, const char *name)
719 fd = perf_pmu__pathname_fd(dirfd, name, "cpumask", O_PATH);
956 static int pmu_max_precise(int dirfd, struct perf_pmu *pmu)
960 perf_pmu__scan_file_at(pmu, dirfd, "caps/max_precise", "%d", &max_precise);
964 struct perf_pmu *perf_pmu__lookup(struct list_head *pmus, int dirfd, const char *lookup_name)
983 if (perf_pmu__scan_file_at(pmu, dirfd, "type", "%u", &type) != 1)
995 if (pmu_format(pmu, dirfd, name))
999 pmu->cpus = pmu_cpumask(dirfd, name, pmu->is_core);
1009 pmu->is_uncore = pmu_is_uncore(dirfd, name);
1012 pmu->max_precise = pmu_max_precise(dirfd, pmu);
1772 FILE *perf_pmu__open_file_at(struct perf_pmu *pmu, int dirfd, const char *name)
1776 fd = perf_pmu__pathname_fd(dirfd, pmu->name, name, O_RDONLY);
1800 int perf_pmu__scan_file_at(struct perf_pmu *pmu, int dirfd, const char *name,
1808 file = perf_pmu__open_file_at(pmu, dirfd, name);
1893 caps_fd = dirfd(caps_dir);
2039 int perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename, int flags)
2044 return openat(dirfd, path, flags);