linux/kernel/trace/trace_boot.c

// SPDX-License-Identifier: GPL-2.0
/*
 * trace_boot.c
 * Tracing kernel boot-time
 */

#define pr_fmt(fmt)

#include <linux/bootconfig.h>
#include <linux/cpumask.h>
#include <linux/ftrace.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/trace.h>
#include <linux/trace_events.h>

#include "trace.h"

#define MAX_BUF_LEN

static void __init
trace_boot_set_instance_options(struct trace_array *tr, struct xbc_node *node)
{}

#ifdef CONFIG_EVENT_TRACING
static void __init
trace_boot_enable_events(struct trace_array *tr, struct xbc_node *node)
{}

#ifdef CONFIG_KPROBE_EVENTS
static int __init
trace_boot_add_kprobe_event(struct xbc_node *node, const char *event)
{}
#else
static inline int __init
trace_boot_add_kprobe_event(struct xbc_node *node, const char *event)
{
	pr_err("Kprobe event is not supported.\n");
	return -ENOTSUPP;
}
#endif

#ifdef CONFIG_SYNTH_EVENTS
static int __init
trace_boot_add_synth_event(struct xbc_node *node, const char *event)
{}
#else
static inline int __init
trace_boot_add_synth_event(struct xbc_node *node, const char *event)
{
	pr_err("Synthetic event is not supported.\n");
	return -ENOTSUPP;
}
#endif

#ifdef CONFIG_HIST_TRIGGERS
static int __init __printf(3, 4)
append_printf(char **bufp, char *end, const char *fmt, ...)
{}

static int __init
append_str_nospace(char **bufp, char *end, const char *str)
{}

static int __init
trace_boot_hist_add_array(struct xbc_node *hnode, char **bufp,
			  char *end, const char *key)
{}

static int __init
trace_boot_hist_add_one_handler(struct xbc_node *hnode, char **bufp,
				char *end, const char *handler,
				const char *param)
{}

static int __init
trace_boot_hist_add_handlers(struct xbc_node *hnode, char **bufp,
			     char *end, const char *param)
{}

/*
 * Histogram boottime tracing syntax.
 *
 * ftrace.[instance.INSTANCE.]event.GROUP.EVENT.hist[.N] {
 *	keys = <KEY>[,...]
 *	values = <VAL>[,...]
 *	sort = <SORT-KEY>[,...]
 *	size = <ENTRIES>
 *	name = <HISTNAME>
 *	var { <VAR> = <EXPR> ... }
 *	pause|continue|clear
 *	onmax|onchange[.N] { var = <VAR>; <ACTION> [= <PARAM>] }
 *	onmatch[.N] { event = <EVENT>; <ACTION> [= <PARAM>] }
 *	filter = <FILTER>
 * }
 *
 * Where <ACTION> are;
 *
 *	trace = <EVENT>, <ARG1>[, ...]
 *	save = <ARG1>[, ...]
 *	snapshot
 */
static int __init
trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size)
{}

static void __init
trace_boot_init_histograms(struct trace_event_file *file,
			   struct xbc_node *hnode, char *buf, size_t size)
{}
#else
static void __init
trace_boot_init_histograms(struct trace_event_file *file,
			   struct xbc_node *hnode, char *buf, size_t size)
{
	/* do nothing */
}
#endif

static void __init
trace_boot_init_one_event(struct trace_array *tr, struct xbc_node *gnode,
			  struct xbc_node *enode)
{}

static void __init
trace_boot_init_events(struct trace_array *tr, struct xbc_node *node)
{}
#else
#define trace_boot_enable_events
#define trace_boot_init_events
#endif

#ifdef CONFIG_DYNAMIC_FTRACE
static void __init
trace_boot_set_ftrace_filter(struct trace_array *tr, struct xbc_node *node)
{}
#else
#define trace_boot_set_ftrace_filter
#endif

static void __init
trace_boot_enable_tracer(struct trace_array *tr, struct xbc_node *node)
{}

static void __init
trace_boot_init_one_instance(struct trace_array *tr, struct xbc_node *node)
{}

static void __init
trace_boot_init_instances(struct xbc_node *node)
{}

static int __init trace_boot_init(void)
{}
/*
 * Start tracing at the end of core-initcall, so that it starts tracing
 * from the beginning of postcore_initcall.
 */
core_initcall_sync(trace_boot_init);