Lines Matching refs:path

90 	char *path = get_events_file("header_page");  in record_header_files()  local
94 if (!path) { in record_header_files()
99 if (stat(path, &st) < 0) { in record_header_files()
100 pr_debug("can't read '%s'", path); in record_header_files()
109 if (record_file(path, 8) < 0) { in record_header_files()
114 put_events_file(path); in record_header_files()
116 path = get_events_file("header_event"); in record_header_files()
117 if (!path) { in record_header_files()
123 if (stat(path, &st) < 0) { in record_header_files()
124 pr_debug("can't read '%s'", path); in record_header_files()
133 if (record_file(path, 8) < 0) { in record_header_files()
140 put_events_file(path); in record_header_files()
226 char *path; in record_ftrace_files() local
229 path = get_events_file("ftrace"); in record_ftrace_files()
230 if (!path) { in record_ftrace_files()
235 ret = copy_event_system(path, tps); in record_ftrace_files()
237 put_tracing_file(path); in record_ftrace_files()
257 char *path; in record_event_files() local
264 path = get_tracing_file("events"); in record_event_files()
265 if (!path) { in record_event_files()
270 dir = opendir(path); in record_event_files()
273 pr_debug("can't read directory '%s'", path); in record_event_files()
297 if (asprintf(&sys, "%s/%s", path, dent->d_name) < 0) { in record_event_files()
317 put_tracing_file(path); in record_event_files()
337 char *path; in record_ftrace_printk() local
341 path = get_tracing_file("printk_formats"); in record_ftrace_printk()
342 if (!path) { in record_ftrace_printk()
347 ret = stat(path, &st); in record_ftrace_printk()
355 err = record_file(path, 4); in record_ftrace_printk()
358 put_tracing_file(path); in record_ftrace_printk()
365 char *path; in record_saved_cmdline() local
369 path = get_tracing_file("saved_cmdlines"); in record_saved_cmdline()
370 if (!path) { in record_saved_cmdline()
375 ret = stat(path, &st); in record_saved_cmdline()
383 err = record_file(path, 8); in record_saved_cmdline()
386 put_tracing_file(path); in record_saved_cmdline()
405 struct tracepoint_path *path = NULL; in tracepoint_id_to_path() local
443 path = zalloc(sizeof(*path)); in tracepoint_id_to_path()
444 if (!path) in tracepoint_id_to_path()
446 if (asprintf(&path->system, "%.*s", in tracepoint_id_to_path()
448 free(path); in tracepoint_id_to_path()
451 if (asprintf(&path->name, "%.*s", in tracepoint_id_to_path()
453 zfree(&path->system); in tracepoint_id_to_path()
454 free(path); in tracepoint_id_to_path()
457 return path; in tracepoint_id_to_path()
471 struct tracepoint_path *path = zalloc(sizeof(*path)); in tracepoint_name_to_path() local
474 if (path == NULL || str == NULL) { in tracepoint_name_to_path()
475 free(path); in tracepoint_name_to_path()
479 path->system = strndup(name, str - name); in tracepoint_name_to_path()
480 path->name = strdup(str+1); in tracepoint_name_to_path()
482 if (path->system == NULL || path->name == NULL) { in tracepoint_name_to_path()
483 zfree(&path->system); in tracepoint_name_to_path()
484 zfree(&path->name); in tracepoint_name_to_path()
485 zfree(&path); in tracepoint_name_to_path()
488 return path; in tracepoint_name_to_path()
494 struct tracepoint_path path, *ppath = &path; in get_tracepoints_path() local
519 put_tracepoints_path(path.next); in get_tracepoints_path()
526 return nr_tracepoints > 0 ? path.next : NULL; in get_tracepoints_path()