Lines Matching refs:buf
29 char buf[MAX_BUF_LEN]; in trace_boot_set_instance_options() local
34 if (strlcpy(buf, p, ARRAY_SIZE(buf)) >= ARRAY_SIZE(buf)) { in trace_boot_set_instance_options()
39 if (trace_set_options(tr, buf) < 0) in trace_boot_set_instance_options()
40 pr_err("Failed to set option: %s\n", buf); in trace_boot_set_instance_options()
86 char buf[MAX_BUF_LEN]; in trace_boot_enable_events() local
90 if (strlcpy(buf, p, ARRAY_SIZE(buf)) >= ARRAY_SIZE(buf)) { in trace_boot_enable_events()
95 if (ftrace_set_clr_event(tr, buf, 1) < 0) in trace_boot_enable_events()
106 char buf[MAX_BUF_LEN]; in trace_boot_add_kprobe_event() local
111 kprobe_event_cmd_init(&cmd, buf, MAX_BUF_LEN); in trace_boot_add_kprobe_event()
115 pr_err("Failed to generate probe: %s\n", buf); in trace_boot_add_kprobe_event()
121 pr_err("Failed to add probe: %s\n", buf); in trace_boot_add_kprobe_event()
143 char buf[MAX_BUF_LEN]; in trace_boot_add_synth_event() local
147 synth_event_cmd_init(&cmd, buf, MAX_BUF_LEN); in trace_boot_add_synth_event()
161 pr_err("Failed to add synthetic event: %s\n", buf); in trace_boot_add_synth_event()
346 trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size) in trace_boot_compose_hist_cmd() argument
349 char *end = buf + size; in trace_boot_compose_hist_cmd()
353 append_printf(&buf, end, "hist"); in trace_boot_compose_hist_cmd()
355 ret = trace_boot_hist_add_array(hnode, &buf, end, "keys"); in trace_boot_compose_hist_cmd()
362 ret = trace_boot_hist_add_array(hnode, &buf, end, "values"); in trace_boot_compose_hist_cmd()
365 ret = trace_boot_hist_add_array(hnode, &buf, end, "sort"); in trace_boot_compose_hist_cmd()
371 append_printf(&buf, end, ":size=%s", p); in trace_boot_compose_hist_cmd()
375 append_printf(&buf, end, ":name=%s", p); in trace_boot_compose_hist_cmd()
381 append_printf(&buf, end, ":%s=", in trace_boot_compose_hist_cmd()
383 append_str_nospace(&buf, end, p); in trace_boot_compose_hist_cmd()
389 append_printf(&buf, end, ":pause"); in trace_boot_compose_hist_cmd()
391 append_printf(&buf, end, ":continue"); in trace_boot_compose_hist_cmd()
393 append_printf(&buf, end, ":clear"); in trace_boot_compose_hist_cmd()
397 if (node && trace_boot_hist_add_handlers(node, &buf, end, "var") < 0) in trace_boot_compose_hist_cmd()
400 if (node && trace_boot_hist_add_handlers(node, &buf, end, "var") < 0) in trace_boot_compose_hist_cmd()
403 if (node && trace_boot_hist_add_handlers(node, &buf, end, "event") < 0) in trace_boot_compose_hist_cmd()
408 append_printf(&buf, end, " if %s", p); in trace_boot_compose_hist_cmd()
410 if (buf == end) { in trace_boot_compose_hist_cmd()
420 struct xbc_node *hnode, char *buf, size_t size) in trace_boot_init_histograms() argument
431 if (trace_boot_compose_hist_cmd(node, buf, size) == 0) { in trace_boot_init_histograms()
432 tmp = kstrdup(buf, GFP_KERNEL); in trace_boot_init_histograms()
435 if (trigger_process_regex(file, buf) < 0) in trace_boot_init_histograms()
442 if (trace_boot_compose_hist_cmd(hnode, buf, size) == 0) { in trace_boot_init_histograms()
443 tmp = kstrdup(buf, GFP_KERNEL); in trace_boot_init_histograms()
446 if (trigger_process_regex(file, buf) < 0) in trace_boot_init_histograms()
455 struct xbc_node *hnode, char *buf, size_t size) in trace_boot_init_histograms() argument
467 char buf[MAX_BUF_LEN]; in trace_boot_init_one_event() local
489 if (strlcpy(buf, p, ARRAY_SIZE(buf)) >= ARRAY_SIZE(buf)) in trace_boot_init_one_event()
491 else if (apply_event_filter(file, buf) < 0) in trace_boot_init_one_event()
492 pr_err("Failed to apply filter: %s\n", buf); in trace_boot_init_one_event()
497 if (strlcpy(buf, p, ARRAY_SIZE(buf)) >= ARRAY_SIZE(buf)) in trace_boot_init_one_event()
499 else if (trigger_process_regex(file, buf) < 0) in trace_boot_init_one_event()
504 trace_boot_init_histograms(file, anode, buf, ARRAY_SIZE(buf)); in trace_boot_init_one_event()