Lines Matching full:path

98 	char *path = get_events_file("header_page");  in record_header_files()  local
102 if (!path) { in record_header_files()
107 if (stat(path, &st) < 0) { in record_header_files()
108 pr_debug("can't read '%s'", path); in record_header_files()
117 if (record_file(path, 8) < 0) { in record_header_files()
122 put_events_file(path); in record_header_files()
124 path = get_events_file("header_event"); in record_header_files()
125 if (!path) { in record_header_files()
131 if (stat(path, &st) < 0) { in record_header_files()
132 pr_debug("can't read '%s'", path); in record_header_files()
141 if (record_file(path, 8) < 0) { in record_header_files()
148 put_events_file(path); in record_header_files()
234 char *path; in record_ftrace_files() local
237 path = get_events_file("ftrace"); in record_ftrace_files()
238 if (!path) { in record_ftrace_files()
243 ret = copy_event_system(path, tps); in record_ftrace_files()
245 put_tracing_file(path); in record_ftrace_files()
265 char *path; in record_event_files() local
272 path = get_tracing_file("events"); in record_event_files()
273 if (!path) { in record_event_files()
278 dir = opendir(path); in record_event_files()
281 pr_debug("can't read directory '%s'", path); in record_event_files()
305 if (asprintf(&sys, "%s/%s", path, dent->d_name) < 0) { in record_event_files()
325 put_tracing_file(path); in record_event_files()
337 * different path) couldn't be read. in record_proc_kallsyms()
345 char *path; in record_ftrace_printk() local
349 path = get_tracing_file("printk_formats"); in record_ftrace_printk()
350 if (!path) { in record_ftrace_printk()
355 ret = stat(path, &st); in record_ftrace_printk()
363 err = record_file(path, 4); in record_ftrace_printk()
366 put_tracing_file(path); in record_ftrace_printk()
373 char *path; in record_saved_cmdline() local
377 path = get_tracing_file("saved_cmdlines"); in record_saved_cmdline()
378 if (!path) { in record_saved_cmdline()
383 ret = stat(path, &st); in record_saved_cmdline()
391 err = record_file(path, 8); in record_saved_cmdline()
394 put_tracing_file(path); in record_saved_cmdline()
413 struct tracepoint_path *path = NULL; in tracepoint_id_to_path() local
451 path = zalloc(sizeof(*path)); in tracepoint_id_to_path()
452 if (!path) in tracepoint_id_to_path()
454 if (asprintf(&path->system, "%.*s", in tracepoint_id_to_path()
456 free(path); in tracepoint_id_to_path()
459 if (asprintf(&path->name, "%.*s", in tracepoint_id_to_path()
461 zfree(&path->system); in tracepoint_id_to_path()
462 free(path); in tracepoint_id_to_path()
465 return path; in tracepoint_id_to_path()
479 struct tracepoint_path *path = zalloc(sizeof(*path)); in tracepoint_name_to_path() local
482 if (path == NULL || str == NULL) { in tracepoint_name_to_path()
483 free(path); in tracepoint_name_to_path()
487 path->system = strndup(name, str - name); in tracepoint_name_to_path()
488 path->name = strdup(str+1); in tracepoint_name_to_path()
490 if (path->system == NULL || path->name == NULL) { in tracepoint_name_to_path()
491 zfree(&path->system); in tracepoint_name_to_path()
492 zfree(&path->name); in tracepoint_name_to_path()
493 zfree(&path); in tracepoint_name_to_path()
496 return path; in tracepoint_name_to_path()
502 struct tracepoint_path path, *ppath = &path; in get_tracepoints_path() local
527 put_tracepoints_path(path.next); in get_tracepoints_path()
534 return nr_tracepoints > 0 ? path.next : NULL; in get_tracepoints_path()