/linux/tools/perf/tests/ |
A D | pe-file-parsing.c | 25 char filename[PATH_MAX]; in run_dir() 26 char debugfile[PATH_MAX]; in run_dir() 28 char debuglink[PATH_MAX]; in run_dir() 33 char expect_debuglink[PATH_MAX] = "pe-file.exe.debug"; in run_dir() 38 scnprintf(filename, PATH_MAX, "%s/pe-file.exe", d); in run_dir() 45 ret = filename__read_debuglink(filename, debuglink, PATH_MAX); in run_dir() 50 scnprintf(debugfile, PATH_MAX, "%s/%s", d, debuglink); in run_dir() 75 char path_dir[PATH_MAX]; in test__pe_file_parsing() 82 snprintf(path_dir, PATH_MAX, "%s/tests", get_argv_exec_path()); in test__pe_file_parsing()
|
A D | pmu.c | 90 static char dir[PATH_MAX]; in test_format_dir_get() 93 snprintf(dir, PATH_MAX, "/tmp/perf-pmu-test-format-XXXXXX"); in test_format_dir_get() 98 static char name[PATH_MAX]; in test_format_dir_get() 102 scnprintf(name, PATH_MAX, "%s/%s", dir, format->name); in test_format_dir_get() 120 char buf[PATH_MAX]; in test_format_dir_put() 121 snprintf(buf, PATH_MAX, "rm -f %s/*\n", dir); in test_format_dir_put() 125 snprintf(buf, PATH_MAX, "rmdir %s\n", dir); in test_format_dir_put()
|
A D | attr.c | 72 char path[PATH_MAX]; in store_event() 77 snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir, in store_event() 170 char cmd[3*PATH_MAX]; in run_dir() 175 scnprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s", in run_dir() 184 char path_perf[PATH_MAX]; in test__attr() 185 char path_dir[PATH_MAX]; in test__attr() 200 snprintf(path_dir, PATH_MAX, "%s/tests", exec_path); in test__attr() 201 snprintf(path_perf, PATH_MAX, "%s/perf", BINDIR); in test__attr()
|
A D | dlfilter-test.c | 47 char perf[PATH_MAX]; 48 char perf_data_file_name[PATH_MAX]; 49 char c_file_name[PATH_MAX]; 50 char prog_file_name[PATH_MAX]; 51 char dlfilters[PATH_MAX]; 219 char perf[PATH_MAX]; in get_dlfilters_path() 220 char path[PATH_MAX]; in get_dlfilters_path() 323 if (get_dlfilters_path(td->dlfilters, PATH_MAX)) in test__dlfilter_test() 409 snprintf(td.perf_data_file_name, PATH_MAX, "/tmp/dlfilter-test-%u-perf-data", pid); in test__dlfilter() 410 snprintf(td.c_file_name, PATH_MAX, "/tmp/dlfilter-test-%u-prog.c", pid); in test__dlfilter() [all …]
|
A D | api-io.c | 36 static int make_test_file(char path[PATH_MAX], const char *contents) in make_test_file() argument 57 static int setup_test(char path[PATH_MAX], const char *contents, in setup_test() argument 80 static void cleanup_test(char path[PATH_MAX], struct io *io) in cleanup_test() argument 89 char path[PATH_MAX]; in do_test_get_char() 136 char path[PATH_MAX]; in do_test_get_hex() 217 char path[PATH_MAX]; in do_test_get_dec()
|
/linux/tools/testing/selftests/bpf/ |
A D | cgroup_helpers.c | 54 char path[PATH_MAX + 1]; in enable_all_controllers() 55 char buf[PATH_MAX]; in enable_all_controllers() 109 char cgroup_workdir[PATH_MAX - 24]; in setup_cgroup_environment() 187 char cgroup_path[PATH_MAX + 1]; in join_cgroup() 208 char cgroup_workdir[PATH_MAX + 1]; in cleanup_cgroup_environment() 227 char cgroup_path[PATH_MAX + 1]; in create_and_get_cgroup() 260 char cgroup_workdir[PATH_MAX + 1]; in get_cgroup_id() 335 char cgroup_workdir[PATH_MAX + 1]; in setup_classid_environment() 378 char cgroup_workdir[PATH_MAX - 42]; in set_classid() 412 char cgroup_workdir[PATH_MAX + 1]; in join_classid() [all …]
|
/linux/tools/perf/util/ |
A D | cpumap.c | 117 char path[PATH_MAX]; in cpu__get_topology_int() 119 snprintf(path, PATH_MAX, in cpu__get_topology_int() 334 char path[PATH_MAX]; in set_max_cpu_num() 347 if (ret >= PATH_MAX) { in set_max_cpu_num() 358 if (ret >= PATH_MAX) { in set_max_cpu_num() 374 char path[PATH_MAX]; in set_max_node_num() 386 if (ret >= PATH_MAX) { in set_max_node_num() 457 char buf[PATH_MAX]; in cpu__setup_cpunode_map() 458 char path[PATH_MAX]; in cpu__setup_cpunode_map() 471 if (n >= PATH_MAX) { in cpu__setup_cpunode_map() [all …]
|
A D | namespaces.c | 65 char oldns[PATH_MAX]; in nsinfo__init() 66 char spath[PATH_MAX]; in nsinfo__init() 76 if (snprintf(oldns, PATH_MAX, "/proc/self/ns/mnt") >= PATH_MAX) in nsinfo__init() 100 if (snprintf(spath, PATH_MAX, "/proc/%d/status", nsi->pid) >= PATH_MAX) in nsinfo__init() 211 char curpath[PATH_MAX]; in nsinfo__mountns_enter() 225 if (snprintf(curpath, PATH_MAX, "/proc/self/ns/mnt") >= PATH_MAX) in nsinfo__mountns_enter()
|
A D | pmu.c | 62 char path[PATH_MAX]; in perf_pmu__format_parse() 92 char path[PATH_MAX]; in pmu_format() 153 char path[PATH_MAX]; in perf_pmu__parse_scale() 181 char path[PATH_MAX]; in perf_pmu__parse_unit() 212 char path[PATH_MAX]; in perf_pmu__parse_per_pkg() 230 char path[PATH_MAX]; in perf_pmu__parse_snapshot() 498 char path[PATH_MAX]; in pmu_aliases() 547 char path[PATH_MAX]; in pmu_type() 575 char path[PATH_MAX]; in pmu_read_sysfs() 623 char path[PATH_MAX]; in pmu_cpumask() [all …]
|
A D | path.c | 31 static char pathname_array[4][PATH_MAX]; in get_pathname() 55 len = vsnprintf(pathname, PATH_MAX, fmt, args); in mkpath() 57 if (len >= PATH_MAX) in mkpath() 86 char path[PATH_MAX]; in is_directory()
|
A D | cgroup.c | 33 char path[PATH_MAX + 1]; in open_cgroup() 34 char mnt[PATH_MAX + 1]; in open_cgroup() 38 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, "perf_event")) in open_cgroup() 41 scnprintf(path, PATH_MAX, "%s/%s", mnt, name); in open_cgroup() 53 char path[PATH_MAX + 1]; in read_cgroup_id() 54 char mnt[PATH_MAX + 1]; in read_cgroup_id() 61 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, "perf_event")) in read_cgroup_id() 64 scnprintf(path, PATH_MAX, "%s/%s", mnt, cgrp->name); in read_cgroup_id() 81 char mnt[PATH_MAX + 1]; in cgroup_is_v2() 84 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, subsys)) in cgroup_is_v2() [all …]
|
A D | llvm-utils.c | 76 char buf[PATH_MAX]; in search_program() 83 strlcpy(output, def, PATH_MAX); in search_program() 102 strlcpy(output, buf, PATH_MAX); in search_program() 458 char clang_path[PATH_MAX], llc_path[PATH_MAX], abspath[PATH_MAX], nr_cpus_avail_str[64]; in llvm__compile_bpf() 586 char clang_path[PATH_MAX]; in llvm__search_clang()
|
/linux/tools/lib/subcmd/ |
A D | exec-cmd.c | 15 #define PATH_MAX 4096 macro 38 static char cwd[PATH_MAX + 1]; in get_pwd_cwd() 41 if (getcwd(cwd, PATH_MAX) == NULL) in get_pwd_cwd() 49 strlcpy(cwd, pwd, PATH_MAX); in get_pwd_cwd() 57 static char buf[PATH_MAX + 1]; in make_nonrelative_path() 60 if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) in make_nonrelative_path() 66 if (snprintf(buf, PATH_MAX, "%s/%s", cwd, path) >= PATH_MAX) in make_nonrelative_path()
|
/linux/usr/ |
A D | gen_init_cpio.c | 136 char name[PATH_MAX + 1]; in cpio_mkslink_line() 137 char target[PATH_MAX + 1]; in cpio_mkslink_line() 143 …if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &ui… in cpio_mkslink_line() 208 char name[PATH_MAX + 1]; in cpio_mkgeneric_line() 276 char name[PATH_MAX + 1]; in cpio_mknod_line() 391 char expanded[PATH_MAX + 1]; in cpio_replace_env() 408 char name[PATH_MAX + 1]; in cpio_mkfile_line() 410 char location[PATH_MAX + 1]; in cpio_mkfile_line() 418 if (5 > sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) in cpio_mkfile_line() 439 if (sscanf(line + end, "%" str(PATH_MAX) "s %n", in cpio_mkfile_line() [all …]
|
/linux/tools/perf/jvmti/ |
A D | jvmti_agent.c | 45 static char jit_path[PATH_MAX]; 149 ret = snprintf(jit_path, PATH_MAX, "%s/.debug/", base); in create_jit_cache_dir() 150 if (ret >= PATH_MAX) { in create_jit_cache_dir() 164 ret = snprintf(jit_path, PATH_MAX, "%s/.debug/jit", base); in create_jit_cache_dir() 165 if (ret >= PATH_MAX) { in create_jit_cache_dir() 179 ret = snprintf(jit_path, PATH_MAX, "%s/.debug/jit/%s.XXXXXXXX", base, str); in create_jit_cache_dir() 180 if (ret >= PATH_MAX) { in create_jit_cache_dir() 248 char dump_path[PATH_MAX]; in jvmti_open() 276 ret = snprintf(dump_path, PATH_MAX, "%s/jit-%i.dump", jit_path, getpid()); in jvmti_open() 277 if (ret >= PATH_MAX) { in jvmti_open()
|
/linux/tools/lib/api/fs/ |
A D | tracing_path.c | 16 static char tracing_mnt[PATH_MAX] = "/sys/kernel/debug"; 17 static char tracing_path[PATH_MAX] = "/sys/kernel/debug/tracing"; 18 static char tracing_events_path[PATH_MAX] = "/sys/kernel/debug/tracing/events"; 120 char filename[PATH_MAX]; in tracing_path__strerror_open_tp() 122 snprintf(filename, PATH_MAX, "%s/%s", sys, name ?: "*"); in tracing_path__strerror_open_tp()
|
A D | fs.c | 91 char path[PATH_MAX]; 160 fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n", in fs__read_mounts() 443 char path[PATH_MAX]; in procfs__read_str() 457 char path[PATH_MAX]; in sysfs__read_ull_base() 480 char path[PATH_MAX]; in sysfs__read_int() 493 char path[PATH_MAX]; in sysfs__read_str() 535 char path[PATH_MAX]; in sysctl__read_int() 548 char path[PATH_MAX]; in sysfs__write_int() 554 if (snprintf(path, sizeof(path), "%s/%s", sysfs, entry) >= PATH_MAX) in sysfs__write_int()
|
/linux/fs/xfs/ |
A D | xfs_stats.c | 61 len += scnprintf(buf + len, PATH_MAX - len, "%s", in xfs_stats_format() 65 len += scnprintf(buf + len, PATH_MAX - len, " %u", in xfs_stats_format() 67 len += scnprintf(buf + len, PATH_MAX - len, "\n"); in xfs_stats_format() 77 len += scnprintf(buf + len, PATH_MAX-len, "xpc %Lu %Lu %Lu\n", in xfs_stats_format() 79 len += scnprintf(buf + len, PATH_MAX-len, "defer_relog %llu\n", in xfs_stats_format() 81 len += scnprintf(buf + len, PATH_MAX-len, "debug %u\n", in xfs_stats_format()
|
/linux/tools/testing/selftests/powerpc/ |
A D | utils.c | 144 char path[PATH_MAX] = "/sys/"; in read_sysfs_file() 147 strncat(path, fpath, PATH_MAX - strlen(path) - 1); in read_sysfs_file() 165 char path[PATH_MAX]; in read_debugfs_file() 169 strncat(path, debugfs_file, PATH_MAX - strlen(path) - 1); in read_debugfs_file() 187 char path[PATH_MAX]; in write_debugfs_file() 191 strncat(path, debugfs_file, PATH_MAX - strlen(path) - 1); in write_debugfs_file()
|
/linux/tools/perf/ |
A D | builtin-buildid-cache.c | 36 char root_dir[PATH_MAX]; in build_id_cache__kcore_buildid() 55 char from[PATH_MAX]; in same_kallsyms_reloc() 56 char to[PATH_MAX]; in same_kallsyms_reloc() 82 char from[PATH_MAX]; in build_id_cache__kcore_existing() 83 char to[PATH_MAX]; in build_id_cache__kcore_existing() 84 char to_subdir[PATH_MAX]; in build_id_cache__kcore_existing() 121 char from_dir[PATH_MAX], to_dir[PATH_MAX]; in build_id_cache__add_kcore() 277 char filename[PATH_MAX]; in dso__missing_buildid_cache()
|
/linux/tools/cgroup/ |
A D | cgroup_event_listener.c | 27 char event_control_path[PATH_MAX]; in main() 38 ret = snprintf(event_control_path, PATH_MAX, "%s/cgroup.event_control", in main() 40 if (ret >= PATH_MAX) in main()
|
/linux/tools/testing/selftests/powerpc/ptrace/ |
A D | core-pkey.c | 291 filename[0] = filenames = malloc(PATH_MAX); in parent() 297 ret = snprintf(filename[0], PATH_MAX, "core-pkey.%d", pid); in parent() 298 if (ret < 0 || ret >= PATH_MAX) { in parent() 304 ret = snprintf(filename[1], PATH_MAX - ret - 1, "core.%d", pid); in parent() 305 if (ret < 0 || ret >= PATH_MAX - ret - 1) { in parent() 373 core_pattern = malloc(PATH_MAX); in setup_core_pattern() 386 ret = fread(core_pattern, 1, PATH_MAX, f); in setup_core_pattern()
|
/linux/tools/testing/selftests/vm/ |
A D | khugepaged.c | 161 char path[PATH_MAX]; in read_string() 166 ret = snprintf(path, PATH_MAX, THP_SYSFS "%s", name); in read_string() 167 if (ret >= PATH_MAX) { in read_string() 206 char path[PATH_MAX]; in write_string() 209 ret = snprintf(path, PATH_MAX, THP_SYSFS "%s", name); in write_string() 210 if (ret >= PATH_MAX) { in write_string() 223 char path[PATH_MAX]; in read_num() 227 ret = snprintf(path, PATH_MAX, THP_SYSFS "%s", name); in read_num() 228 if (ret >= PATH_MAX) { in read_num() 244 char path[PATH_MAX]; in write_num() [all …]
|
/linux/tools/perf/arch/arm/util/ |
A D | cs-etm.c | 67 char path[PATH_MAX]; in cs_etm_set_context_id() 79 snprintf(path, PATH_MAX, "cpu%d/%s", in cs_etm_set_context_id() 151 char path[PATH_MAX]; in cs_etm_set_timestamp() 162 snprintf(path, PATH_MAX, "cpu%d/%s", in cs_etm_set_timestamp() 257 char msg[BUFSIZ], path[PATH_MAX], *sink; in cs_etm_set_sink_attr() 270 snprintf(path, PATH_MAX, "sinks/%s", sink); in cs_etm_set_sink_attr() 582 char path[PATH_MAX]; in cs_etm_is_etmv4() 590 snprintf(path, PATH_MAX, "cpu%d/%s", in cs_etm_is_etmv4() 603 char pmu_path[PATH_MAX]; in cs_etm_get_ro() 608 snprintf(pmu_path, PATH_MAX, "cpu%d/%s", cpu, path); in cs_etm_get_ro()
|
/linux/tools/testing/selftests/openat2/ |
A D | helpers.c | 61 target = malloc(PATH_MAX); in fdreadlink() 64 memset(target, 0, PATH_MAX); in fdreadlink() 66 E_readlink(tmp, target, PATH_MAX); in fdreadlink()
|