Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 66) sorted by relevance

123

/tools/perf/util/
Dpath.c47 static char *cleanup_path(char *path) in cleanup_path() argument
50 if (!memcmp(path, "./", 2)) { in cleanup_path()
51 path += 2; in cleanup_path()
52 while (*path == '/') in cleanup_path()
53 path++; in cleanup_path()
55 return path; in cleanup_path()
80 char path[PATH_MAX]; in perf_pathdup() local
83 (void)perf_vsnpath(path, sizeof(path), fmt, args); in perf_pathdup()
85 return xstrdup(path); in perf_pathdup()
124 static inline int chomp_trailing_dir_sep(const char *path, int len) in chomp_trailing_dir_sep() argument
[all …]
Dtrace-event-info.c51 const char *path = perf_debugfs_mount(NULL); in find_debugfs() local
53 if (!path) in find_debugfs()
56 return path; in find_debugfs()
165 char *path; in read_header_files() local
169 path = get_tracing_file("events/header_page"); in read_header_files()
170 if (!path) { in read_header_files()
175 if (stat(path, &st) < 0) { in read_header_files()
176 pr_debug("can't read '%s'", path); in read_header_files()
185 if (record_file(path, 8) < 0) { in read_header_files()
190 put_tracing_file(path); in read_header_files()
[all …]
Dexec_cmd.c12 const char *system_path(const char *path) in system_path() argument
17 if (is_absolute_path(path)) in system_path()
18 return path; in system_path()
20 strbuf_addf(&d, "%s/%s", prefix, path); in system_path()
21 path = strbuf_detach(&d, NULL); in system_path()
22 return path; in system_path()
70 static void add_path(struct strbuf *out, const char *path) in add_path() argument
72 if (path && *path) { in add_path()
73 if (is_absolute_path(path)) in add_path()
74 strbuf_addstr(out, path); in add_path()
[all …]
Dabspath.c22 const char *make_nonrelative_path(const char *path) in make_nonrelative_path() argument
26 if (is_absolute_path(path)) { in make_nonrelative_path()
27 if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) in make_nonrelative_path()
28 die("Too long path: %.*s", 60, path); in make_nonrelative_path()
33 if (snprintf(buf, PATH_MAX, "%s/%s", cwd, path) >= PATH_MAX) in make_nonrelative_path()
34 die("Too long path: %.*s", 60, path); in make_nonrelative_path()
Dpmu.c48 char path[PATH_MAX]; in perf_pmu__format_parse() local
55 snprintf(path, PATH_MAX, "%s/%s", dir, name); in perf_pmu__format_parse()
58 file = fopen(path, "r"); in perf_pmu__format_parse()
79 char path[PATH_MAX]; in pmu_format() local
86 snprintf(path, PATH_MAX, in pmu_format()
89 if (stat(path, &st) < 0) in pmu_format()
92 if (perf_pmu__format_parse(path, format)) in pmu_format()
140 char path[PATH_MAX]; in pmu_aliases_parse() local
147 snprintf(path, PATH_MAX, "%s/%s", dir, name); in pmu_aliases_parse()
150 file = fopen(path, "r"); in pmu_aliases_parse()
[all …]
Dcache.h59 static inline int is_absolute_path(const char *path) in is_absolute_path() argument
61 return path[0] == '/'; in is_absolute_path()
64 const char *make_nonrelative_path(const char *path);
65 char *strip_path_suffix(const char *path, const char *suffix);
Dutil.c32 int mkdir_p(char *path, mode_t mode) in mkdir_p() argument
36 char *d = path; in mkdir_p()
41 if (stat(path, &st) == 0) in mkdir_p()
48 err = stat(path, &st) && mkdir(path, mode); in mkdir_p()
55 return (stat(path, &st) && mkdir(path, mode)) ? -1 : 0; in mkdir_p()
Dexec_cmd.h5 extern const char *perf_extract_argv0_path(const char *path);
10 extern const char *system_path(const char *path);
Dhelp.c118 const char *path, in list_commands_in_dir() argument
122 DIR *dir = opendir(path); in list_commands_in_dir()
133 strbuf_addf(&buf, "%s/", path); in list_commands_in_dir()
172 char *paths, *path, *colon; in load_command_list() local
173 path = paths = strdup(env_path); in load_command_list()
175 if ((colon = strchr(path, PATH_SEP))) in load_command_list()
177 if (!exec_path || strcmp(path, exec_path)) in load_command_list()
178 list_commands_in_dir(other_cmds, path, prefix); in load_command_list()
182 path = colon + 1; in load_command_list()
Dthread_map.c65 char path[256]; in thread_map__new_by_uid() local
87 snprintf(path, sizeof(path), "/proc/%s", dirent.d_name); in thread_map__new_by_uid()
89 if (stat(path, &st) != 0) in thread_map__new_by_uid()
95 snprintf(path, sizeof(path), "/proc/%d/task", pid); in thread_map__new_by_uid()
96 items = scandir(path, &namelist, filter, NULL); in thread_map__new_by_uid()
Dcgroup.c59 char path[PATH_MAX + 1]; in open_cgroup() local
67 snprintf(path, PATH_MAX, "%s/%s", mnt, name); in open_cgroup()
69 fd = open(path, O_RDONLY); in open_cgroup()
71 fprintf(stderr, "no access to cgroup %s\n", path); in open_cgroup()
Dmachine.c164 char path[PATH_MAX]; in machines__findnew() local
174 sprintf(path, "%s/%d", symbol_conf.guestmount, pid); in machines__findnew()
175 if (access(path, R_OK)) { in machines__findnew()
181 if (!strlist__has_entry(seen, path)) { in machines__findnew()
182 pr_err("Can't access file %s\n", path); in machines__findnew()
183 strlist__add(seen, path); in machines__findnew()
188 root_dir = path; in machines__findnew()
454 char path[PATH_MAX]; in machine__get_kernel_start_addr() local
463 sprintf(path, "%s/proc/kallsyms", machine->root_dir); in machine__get_kernel_start_addr()
464 filename = path; in machine__get_kernel_start_addr()
[all …]
Dcpumap.c211 char path[PATH_MAX]; in cpu_map__get_socket() local
223 snprintf(path, PATH_MAX, in cpu_map__get_socket()
227 fp = fopen(path, "r"); in cpu_map__get_socket()
274 char path[PATH_MAX]; in cpu_map__get_core() local
286 snprintf(path, PATH_MAX, in cpu_map__get_core()
290 fp = fopen(path, "r"); in cpu_map__get_core()
/tools/power/cpupower/utils/helpers/
Dsysfs.c19 unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen) in sysfs_read_file() argument
24 fd = open(path, O_RDONLY); in sysfs_read_file()
50 char path[SYSFS_PATH_MAX]; in sysfs_is_cpu_online() local
58 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u", cpu); in sysfs_is_cpu_online()
60 if (stat(path, &statbuf) != 0) in sysfs_is_cpu_online()
67 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/online", cpu); in sysfs_is_cpu_online()
68 if (stat(path, &statbuf) != 0) in sysfs_is_cpu_online()
71 fd = open(path, O_RDONLY); in sysfs_is_cpu_online()
101 char path[SYSFS_PATH_MAX]; in sysfs_idlestate_read_file() local
105 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in sysfs_idlestate_read_file()
[all …]
Dtopology.c27 char path[SYSFS_PATH_MAX]; in sysfs_topology_read_file() local
29 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s", in sysfs_topology_read_file()
31 if (sysfs_read_file(path, linebuf, MAX_LINE_LEN) == 0) in sysfs_topology_read_file()
/tools/virtio/virtio-trace/
DREADME43 of CPUs and a control path, so FIFO (named pipe) should be created as follows:
45 # mkfifo /tmp/virtio-trace/trace-path-cpu{0,1,2,...,X}.{in,out}
46 # mkfifo /tmp/virtio-trace/agent-ctl-path.{in,out}
49 trace-path-cpu{0,1,2}.{in.out}
51 agent-ctl-path.{in,out}.
58 ##control path##
59 -chardev pipe,id=charchannel0,path=/tmp/virtio-trace/agent-ctl-path\
61 id=channel0,name=agent-ctl-path\
62 ##data path##
63 -chardev pipe,id=charchannel1,path=/tmp/virtio-trace/trace-path-cpu0\
[all …]
/tools/testing/selftests/efivarfs/
Dopen-unlink.c11 const char *path; in main() local
20 path = argv[1]; in main()
30 fd = open(path, O_WRONLY | O_CREAT); in main()
44 fd = open(path, O_RDONLY); in main()
50 if (unlink(path) < 0) { in main()
Dcreate-read.c13 const char *path; in main() local
22 path = argv[1]; in main()
25 fd = open(path, O_RDWR | O_CREAT, 0600); in main()
/tools/perf/
Dbuiltin-help.c103 static void exec_woman_emacs(const char *path, const char *page) in exec_woman_emacs() argument
109 if (!path) in exec_woman_emacs()
110 path = "emacsclient"; in exec_woman_emacs()
112 execlp(path, "emacsclient", "-e", man_page.buf, NULL); in exec_woman_emacs()
113 warning("failed to exec '%s': %s", path, strerror(errno)); in exec_woman_emacs()
117 static void exec_man_konqueror(const char *path, const char *page) in exec_man_konqueror() argument
125 if (path) { in exec_man_konqueror()
126 const char *file = strrchr(path, '/'); in exec_man_konqueror()
128 char *new = strdup(path); in exec_man_konqueror()
133 path = new; in exec_man_konqueror()
[all …]
/tools/perf/arch/
Dcommon.c59 char *path, *tmp; in lookup_path() local
70 path = strtok_r(env, ":", &tmp); in lookup_path()
71 while (path) { in lookup_path()
72 scnprintf(buf, sizeof(buf), "%s/%s", path, name); in lookup_path()
77 path = strtok_r(NULL, ":", &tmp); in lookup_path()
126 const char **path) in perf_session_env__lookup_binutils_path() argument
193 *path = buf; in perf_session_env__lookup_binutils_path()
197 *path = NULL; in perf_session_env__lookup_binutils_path()
/tools/perf/Documentation/
Dperf-kvm.txt11 'perf kvm' [--host] [--guest] [--guestmount=<path>
12 [--guestkallsyms=<path> --guestmodules=<path> | --guestvmlinux=<path>]]
14 'perf kvm' [--host] [--guest] [--guestkallsyms=<path> --guestmodules=<path>
15 | --guestvmlinux=<path>] {top|record|report|diff|buildid-list|stat}
65 --guestmount=<path>::
67 root directories under <path> by a specific filesystem access method,
74 --guestkallsyms=<path>::
77 --guestmodules=<path>::
80 --guestvmlinux=<path>::
/tools/perf/tests/
Dattr.py17 return '\'%s\' - %s' % (self.test.path, self.msg)
23 return '\'%s\'' % self.test.path
121 def __init__(self, path, options): argument
123 parser.read(path)
125 log.warning("running '%s'" % path)
127 self.path = path
141 self.load_events(path, self.expect)
149 def load_events(self, path, events): argument
151 parser_event.read(path)
/tools/net/
Dbpf_jit_disasm.c31 char *path; in get_exec_path() local
37 path = strdup(tpath); in get_exec_path()
38 assert(path); in get_exec_path()
40 len = readlink(path, tpath, size); in get_exec_path()
43 free(path); in get_exec_path()
/tools/perf/config/
Dutilities.mak133 # Usage: bool-value = $(call is-absolute,path)
139 # Usage: absolute-executable-path-or-empty = $(call lookup,path)
149 # Usage: bool-value = $(call is-executable,path)
160 # Usage: absolute-executable-path-or-empty = $(call get-executable,path)
162 # The goal is to get an absolute path for an executable;
165 # relative path resolution is requested, as determined
173 # Usage: absolute-executable-path-or-empty = $(call get-executable-or-default,variable,default)
179 _gea_warn = $(warning The path '$(1)' is not executable.)
/tools/power/cpupower/lib/
Dsysfs.c24 static unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen) in sysfs_read_file() argument
29 fd = open(path, O_RDONLY); in sysfs_read_file()
53 char path[SYSFS_PATH_MAX]; in sysfs_cpufreq_read_file() local
55 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s", in sysfs_cpufreq_read_file()
57 return sysfs_read_file(path, buf, buflen); in sysfs_cpufreq_read_file()
66 char path[SYSFS_PATH_MAX]; in sysfs_cpufreq_write_file() local
70 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s", in sysfs_cpufreq_write_file()
73 fd = open(path, O_WRONLY); in sysfs_cpufreq_write_file()

123