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()
318 put_tracing_file(path); in record_event_files()
338 char *path; in record_ftrace_printk() local
342 path = get_tracing_file("printk_formats"); in record_ftrace_printk()
343 if (!path) { in record_ftrace_printk()
348 ret = stat(path, &st); in record_ftrace_printk()
356 err = record_file(path, 4); in record_ftrace_printk()
359 put_tracing_file(path); in record_ftrace_printk()
366 char *path; in record_saved_cmdline() local
370 path = get_tracing_file("saved_cmdlines"); in record_saved_cmdline()
371 if (!path) { in record_saved_cmdline()
376 ret = stat(path, &st); in record_saved_cmdline()
384 err = record_file(path, 8); in record_saved_cmdline()
387 put_tracing_file(path); in record_saved_cmdline()
406 struct tracepoint_path *path = NULL; in tracepoint_id_to_path() local
444 path = zalloc(sizeof(*path)); in tracepoint_id_to_path()
445 if (!path) in tracepoint_id_to_path()
447 if (asprintf(&path->system, "%.*s", in tracepoint_id_to_path()
449 free(path); in tracepoint_id_to_path()
452 if (asprintf(&path->name, "%.*s", in tracepoint_id_to_path()
454 zfree(&path->system); in tracepoint_id_to_path()
455 free(path); in tracepoint_id_to_path()
458 return path; in tracepoint_id_to_path()
472 struct tracepoint_path *path = tracepoint_id_to_path(config); in tracepoint_id_to_name() local
475 if (path && asprintf(&buf, "%s:%s", path->system, path->name) < 0) in tracepoint_id_to_name()
478 put_tracepoints_path(path); in tracepoint_id_to_name()
484 struct tracepoint_path *path = zalloc(sizeof(*path)); in tracepoint_name_to_path() local
487 if (path == NULL || str == NULL) { in tracepoint_name_to_path()
488 free(path); in tracepoint_name_to_path()
492 path->system = strndup(name, str - name); in tracepoint_name_to_path()
493 path->name = strdup(str+1); in tracepoint_name_to_path()
495 if (path->system == NULL || path->name == NULL) { in tracepoint_name_to_path()
496 zfree(&path->system); in tracepoint_name_to_path()
497 zfree(&path->name); in tracepoint_name_to_path()
498 zfree(&path); in tracepoint_name_to_path()
501 return path; in tracepoint_name_to_path()
507 struct tracepoint_path path, *ppath = &path; in get_tracepoints_path() local
532 put_tracepoints_path(path.next); in get_tracepoints_path()
539 return nr_tracepoints > 0 ? path.next : NULL; in get_tracepoints_path()