Home
last modified time | relevance | path

Searched refs:dent (Results 1 – 18 of 18) sorted by relevance

/tools/perf/util/
A Dtrace-event-info.c156 while ((dent = readdir(dir))) \
157 if (dent->d_type == DT_DIR && \
158 (strcmp(dent->d_name, ".")) && \
159 (strcmp(dent->d_name, ".."))) \
163 struct dirent *dent; in copy_event_system() local
177 for_each_event_tps(dir, dent, tps) { in copy_event_system()
178 if (!name_in_tp_list(dent->d_name, tps)) in copy_event_system()
199 for_each_event_tps(dir, dent, tps) { in copy_event_system()
255 struct dirent *dent; in record_event_files() local
277 for_each_event_tps(dir, dent, tps) { in record_event_files()
[all …]
A Dpath.c59 bool is_directory(const char *base_path, const struct dirent *dent) in is_directory() argument
64 snprintf(path, sizeof(path), "%s/%s", base_path, dent->d_name); in is_directory()
A Dpath.h14 bool is_directory(const char *base_path, const struct dirent *dent);
A Ddata.c91 struct dirent *dent; in perf_data__open_dir() local
114 while ((dent = readdir(dir)) != NULL) { in perf_data__open_dir()
119 snprintf(path, sizeof(path), "%s/%s", data->path, dent->d_name); in perf_data__open_dir()
123 if (!S_ISREG(st.st_mode) || strncmp(dent->d_name, "data.", 5)) in perf_data__open_dir()
A Dpmus.c246 struct io_dirent64 *dent; in pmu_read_sysfs() local
254 while ((dent = io_dir__readdir(&dir)) != NULL) { in pmu_read_sysfs()
255 if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, "..")) in pmu_read_sysfs()
257 if (core_only && !is_pmu_core(dent->d_name)) in pmu_read_sysfs()
260 perf_pmu__find2(fd, dent->d_name); in pmu_read_sysfs()
A Dsynthetic-events.c600 struct dirent *dent; in perf_event__walk_cgroup_tree() local
613 while ((dent = readdir(d)) != NULL) { in perf_event__walk_cgroup_tree()
614 if (dent->d_type != DT_DIR) in perf_event__walk_cgroup_tree()
616 if (!strcmp(dent->d_name, ".") || in perf_event__walk_cgroup_tree()
617 !strcmp(dent->d_name, "..")) in perf_event__walk_cgroup_tree()
621 if (strlen(path) + strlen(dent->d_name) + 1 >= PATH_MAX) in perf_event__walk_cgroup_tree()
626 strcat(path, dent->d_name); in perf_event__walk_cgroup_tree()
778 struct io_dirent64 *dent; in __event__synthesize_thread() local
816 while ((dent = io_dir__readdir(&iod)) != NULL) { in __event__synthesize_thread()
821 if (!isdigit(dent->d_name[0])) in __event__synthesize_thread()
[all …]
A Dmachine.c1382 struct io_dirent64 *dent; in maps__set_modules_path_dir() local
1396 while ((dent = io_dir__readdir(&iod)) != NULL) { in maps__set_modules_path_dir()
1397 if (io_dir__is_dir(&iod, dent)) { in maps__set_modules_path_dir()
1398 if (!strcmp(dent->d_name, ".") || in maps__set_modules_path_dir()
1399 !strcmp(dent->d_name, "..")) in maps__set_modules_path_dir()
1404 if (!strcmp(dent->d_name, "source") || in maps__set_modules_path_dir()
1405 !strcmp(dent->d_name, "build")) in maps__set_modules_path_dir()
1410 if (root_len + strlen(dent->d_name) >= path_size) in maps__set_modules_path_dir()
1413 strcpy(path + root_len, dent->d_name); in maps__set_modules_path_dir()
1420 ret = kmod_path__parse_name(&m, dent->d_name); in maps__set_modules_path_dir()
[all …]
/tools/lib/api/
A Dio_dir.h89 static inline bool io_dir__is_dir(const struct io_dir *iod, struct io_dirent64 *dent) in io_dir__is_dir() argument
91 if (dent->d_type == DT_UNKNOWN) { in io_dir__is_dir()
94 if (fstatat(iod->dirfd, dent->d_name, &st, /*flags=*/0)) in io_dir__is_dir()
98 dent->d_type = DT_DIR; in io_dir__is_dir()
102 return dent->d_type == DT_DIR; in io_dir__is_dir()
/tools/power/cpupower/lib/
A Dpowercap.c190 struct dirent *dent; in powercap_read_zone() local
218 while ((dent = readdir(zone_dir)) != NULL) { in powercap_read_zone()
221 if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0) in powercap_read_zone()
224 if (stat(dent->d_name, &st) != 0 || !S_ISDIR(st.st_mode)) in powercap_read_zone()
225 if (fstatat(dirfd(zone_dir), dent->d_name, &st, 0) < 0) in powercap_read_zone()
228 if (strncmp(dent->d_name, "intel-rapl:", 11) != 0) in powercap_read_zone()
248 strcat(child_zone->sys_name, dent->d_name); in powercap_read_zone()
/tools/perf/arch/arm/util/
A Dauxtrace.c60 struct dirent *dent; in find_all_hisi_ptt_pmus() local
73 while ((dent = readdir(dir))) { in find_all_hisi_ptt_pmus()
74 if (strstr(dent->d_name, HISI_PTT_PMU_NAME)) in find_all_hisi_ptt_pmus()
89 while ((dent = readdir(dir))) { in find_all_hisi_ptt_pmus()
90 if (strstr(dent->d_name, HISI_PTT_PMU_NAME) && idx < *nr_ptts) { in find_all_hisi_ptt_pmus()
91 hisi_ptt_pmus[idx] = perf_pmus__find(dent->d_name); in find_all_hisi_ptt_pmus()
/tools/testing/selftests/ir/
A Dir_loopback.c73 struct dirent *dent; in lirc_open() local
84 while ((dent = readdir(d)) != NULL) { in lirc_open()
85 if (!strncmp(dent->d_name, "lirc", 4)) { in lirc_open()
86 snprintf(buf, sizeof(buf), "/dev/%s", dent->d_name); in lirc_open()
91 if (!dent) in lirc_open()
/tools/testing/selftests/perf_events/
A Dmmap.c59 static bool read_event_type(struct dirent *dent, __u32 *type) in read_event_type() argument
65 snprintf(typefn, sizeof(typefn), "%s/%s/type", EVENT_SRC_DIR, dent->d_name); in read_event_type()
86 struct dirent *dent; in FIXTURE_SETUP() local
101 while ((dent = readdir(dir))) { in FIXTURE_SETUP()
104 if (!read_event_type(dent, &attr.type)) in FIXTURE_SETUP()
/tools/perf/
A Dbuiltin-buildid-cache.c85 struct dirent *dent; in build_id_cache__kcore_existing() local
96 dent = readdir(d); in build_id_cache__kcore_existing()
97 if (!dent) in build_id_cache__kcore_existing()
99 if (dent->d_type != DT_DIR) in build_id_cache__kcore_existing()
102 dent->d_name); in build_id_cache__kcore_existing()
104 to_dir, dent->d_name); in build_id_cache__kcore_existing()
/tools/perf/arch/x86/util/
A Dpmu.c87 struct io_dirent64 *dent; in num_chas() local
94 while ((dent = io_dir__readdir(&dir)) != NULL) { in num_chas()
96 if (starts_with(dent->d_name, "uncore_cha_")) in num_chas()
/tools/perf/tests/
A Ddso-data.c194 struct dirent *dent; in open_files_cnt() local
204 while ((dent = readdir(dir)) != NULL) { in open_files_cnt()
205 if (!strcmp(dent->d_name, ".") || in open_files_cnt()
206 !strcmp(dent->d_name, "..")) in open_files_cnt()
A Dparse-events.c2721 struct dirent *dent; in test_alias() local
2734 while ((dent = readdir(dir))) { in test_alias()
2735 if (!strcmp(dent->d_name, ".") || in test_alias()
2736 !strcmp(dent->d_name, "..")) in test_alias()
2740 sysfs, dent->d_name); in test_alias()
2758 *event = strdup(dent->d_name); in test_alias()
/tools/testing/selftests/iommu/
A Diommufd_fail_nth.c62 struct dirent *dent; in setup_fault_injection() local
73 while ((dent = readdir(debugfs))) { in setup_fault_injection()
76 if (strncmp(dent->d_name, "fail", 4) != 0) in setup_fault_injection()
80 snprintf(fn, sizeof(fn), "%s/verbose", dent->d_name); in setup_fault_injection()
/tools/perf/ui/browsers/
A Dhists.c2379 struct dirent *dent; in switch_data_file() local
2392 while ((dent = readdir(pwd_dir))) { in switch_data_file()
2395 char *name = dent->d_name; in switch_data_file()
2398 if (!(dent->d_type == DT_REG)) in switch_data_file()

Completed in 42 milliseconds