Lines Matching +full:ftrace +full:- +full:size

1 // SPDX-License-Identifier: GPL-2.0
4 * Tracing kernel boot-time
11 #include <linux/ftrace.h>
32 /* Common ftrace options */ in trace_boot_set_instance_options()
63 pr_err("Buffer size is too small: %s\n", p); in trace_boot_set_instance_options()
133 return -ENOTSUPP; in trace_boot_add_kprobe_event()
170 return -ENOTSUPP; in trace_boot_add_synth_event()
182 return -ENOSPC; in append_printf()
185 ret = vsnprintf(*bufp, end - *bufp, fmt, args); in append_printf()
186 if (ret < end - *bufp) { in append_printf()
190 ret = -ERANGE; in append_printf()
203 while (p < end - 1 && *str != '\0') { in append_str_nospace()
209 if (p == end - 1) { in append_str_nospace()
211 return -ENOSPC; in append_str_nospace()
213 len = p - *bufp; in append_str_nospace()
230 return -EINVAL; in trace_boot_hist_add_array()
241 return -ENOENT; in trace_boot_hist_add_array()
260 return -EINVAL; in trace_boot_hist_add_one_handler()
275 return -EINVAL; in trace_boot_hist_add_one_handler()
291 return -EINVAL; in trace_boot_hist_add_one_handler()
326 * ftrace.[instance.INSTANCE.]event.GROUP.EVENT.hist[.N] {
329 * sort = <SORT-KEY>[,...]
330 * size = <ENTRIES>
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()
357 if (ret == -ENOENT) in trace_boot_compose_hist_cmd()
359 return -EINVAL; in trace_boot_compose_hist_cmd()
363 if (ret == -EINVAL) in trace_boot_compose_hist_cmd()
366 if (ret == -EINVAL) in trace_boot_compose_hist_cmd()
369 p = xbc_node_find_value(hnode, "size", NULL); in trace_boot_compose_hist_cmd()
371 append_printf(&buf, end, ":size=%s", p); in trace_boot_compose_hist_cmd()
398 return -EINVAL; in trace_boot_compose_hist_cmd()
401 return -EINVAL; in trace_boot_compose_hist_cmd()
404 return -EINVAL; in trace_boot_compose_hist_cmd()
412 return -E2BIG; 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()
442 if (trace_boot_compose_hist_cmd(hnode, buf, size) == 0) { in trace_boot_init_histograms()
455 struct xbc_node *hnode, char *buf, size_t size) in trace_boot_init_histograms() argument
527 /* per-event key starts with "event.GROUP.EVENT" */ in trace_boot_init_events()
566 xbc_node_for_each_array_value(node, "ftrace.filters", anode, p) { in trace_boot_set_ftrace_filter()
570 if (ftrace_set_filter(tr->ops, q, strlen(q), 0) < 0) in trace_boot_set_ftrace_filter()
571 pr_err("Failed to add %s to ftrace filter\n", p); in trace_boot_set_ftrace_filter()
576 xbc_node_for_each_array_value(node, "ftrace.notraces", anode, p) { in trace_boot_set_ftrace_filter()
580 if (ftrace_set_notrace(tr->ops, q, strlen(q), 0) < 0) in trace_boot_set_ftrace_filter()
581 pr_err("Failed to add %s to ftrace filter\n", p); in trace_boot_set_ftrace_filter()
651 trace_node = xbc_find_node("ftrace"); in trace_boot_init()
663 disable_tracing_selftest("running boot-time tracing"); in trace_boot_init()
668 * Start tracing at the end of core-initcall, so that it starts tracing