#include <linux/ring_buffer.h>
#include <linux/utsname.h>
#include <linux/stacktrace.h>
#include <linux/writeback.h>
#include <linux/kallsyms.h>
#include <linux/security.h>
#include <linux/seq_file.h>
#include <linux/irqflags.h>
#include <linux/debugfs.h>
#include <linux/tracefs.h>
#include <linux/pagemap.h>
#include <linux/hardirq.h>
#include <linux/linkage.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include <linux/ftrace.h>
#include <linux/module.h>
#include <linux/percpu.h>
#include <linux/splice.h>
#include <linux/kdebug.h>
#include <linux/string.h>
#include <linux/mount.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/panic_notifier.h>
#include <linux/poll.h>
#include <linux/nmi.h>
#include <linux/fs.h>
#include <linux/trace.h>
#include <linux/sched/clock.h>
#include <linux/sched/rt.h>
#include <linux/fsnotify.h>
#include <linux/irq_work.h>
#include <linux/workqueue.h>
#include <asm/setup.h>
#include "trace.h"
#include "trace_output.h"
#ifdef CONFIG_FTRACE_STARTUP_TEST
static bool __read_mostly tracing_selftest_running;
bool __read_mostly tracing_selftest_disabled;
void __init disable_tracing_selftest(const char *reason)
{ … }
#else
#define tracing_selftest_running …
#define tracing_selftest_disabled …
#endif
static struct trace_iterator *tracepoint_print_iter;
int tracepoint_printk;
static bool tracepoint_printk_stop_on_boot __initdata;
static DEFINE_STATIC_KEY_FALSE(tracepoint_printk_key);
static struct tracer_opt dummy_tracer_opt[] = …;
static int
dummy_set_flag(struct trace_array *tr, u32 old_flags, u32 bit, int set)
{ … }
DEFINE_PER_CPU(bool, trace_taskinfo_save);
static int tracing_disabled = …;
cpumask_var_t __read_mostly tracing_buffer_mask;
char ftrace_dump_on_oops[MAX_TRACER_SIZE] = …;
int __disable_trace_on_warning;
#ifdef CONFIG_TRACE_EVAL_MAP_FILE
struct trace_eval_map_head { … };
trace_eval_map_item;
struct trace_eval_map_tail { … };
static DEFINE_MUTEX(trace_eval_mutex);
trace_eval_map_item;
static union trace_eval_map_item *trace_eval_maps;
#endif
int tracing_set_tracer(struct trace_array *tr, const char *buf);
static void ftrace_trace_userstack(struct trace_array *tr,
struct trace_buffer *buffer,
unsigned int trace_ctx);
static char bootup_tracer_buf[MAX_TRACER_SIZE] __initdata;
static char *default_bootup_tracer;
static bool allocate_snapshot;
static bool snapshot_at_boot;
static char boot_instance_info[COMMAND_LINE_SIZE] __initdata;
static int boot_instance_index;
static char boot_snapshot_info[COMMAND_LINE_SIZE] __initdata;
static int boot_snapshot_index;
static int __init set_cmdline_ftrace(char *str)
{ … }
__setup(…);
int ftrace_dump_on_oops_enabled(void)
{ … }
static int __init set_ftrace_dump_on_oops(char *str)
{ … }
__setup(…);
static int __init stop_trace_on_warning(char *str)
{ … }
__setup(…);
static int __init boot_alloc_snapshot(char *str)
{ … }
__setup(…);
static int __init boot_snapshot(char *str)
{ … }
__setup(…);
static int __init boot_instance(char *str)
{ … }
__setup(…);
static char trace_boot_options_buf[MAX_TRACER_SIZE] __initdata;
static int __init set_trace_boot_options(char *str)
{ … }
__setup(…);
static char trace_boot_clock_buf[MAX_TRACER_SIZE] __initdata;
static char *trace_boot_clock __initdata;
static int __init set_trace_boot_clock(char *str)
{ … }
__setup(…);
static int __init set_tracepoint_printk(char *str)
{ … }
__setup(…);
static int __init set_tracepoint_printk_stop(char *str)
{ … }
__setup(…);
unsigned long long ns2usecs(u64 nsec)
{ … }
static void
trace_process_export(struct trace_export *export,
struct ring_buffer_event *event, int flag)
{ … }
static DEFINE_MUTEX(ftrace_export_lock);
static struct trace_export __rcu *ftrace_exports_list __read_mostly;
static DEFINE_STATIC_KEY_FALSE(trace_function_exports_enabled);
static DEFINE_STATIC_KEY_FALSE(trace_event_exports_enabled);
static DEFINE_STATIC_KEY_FALSE(trace_marker_exports_enabled);
static inline void ftrace_exports_enable(struct trace_export *export)
{ … }
static inline void ftrace_exports_disable(struct trace_export *export)
{ … }
static void ftrace_exports(struct ring_buffer_event *event, int flag)
{ … }
static inline void
add_trace_export(struct trace_export **list, struct trace_export *export)
{ … }
static inline int
rm_trace_export(struct trace_export **list, struct trace_export *export)
{ … }
static inline void
add_ftrace_export(struct trace_export **list, struct trace_export *export)
{ … }
static inline int
rm_ftrace_export(struct trace_export **list, struct trace_export *export)
{ … }
int register_ftrace_export(struct trace_export *export)
{ … }
EXPORT_SYMBOL_GPL(…);
int unregister_ftrace_export(struct trace_export *export)
{ … }
EXPORT_SYMBOL_GPL(…);
#define TRACE_DEFAULT_FLAGS …
#define TOP_LEVEL_TRACE_FLAGS …
#define ZEROED_TRACE_FLAGS …
static struct trace_array global_trace = …;
void trace_set_ring_buffer_expanded(struct trace_array *tr)
{ … }
LIST_HEAD(…);
int trace_array_get(struct trace_array *this_tr)
{ … }
static void __trace_array_put(struct trace_array *this_tr)
{ … }
void trace_array_put(struct trace_array *this_tr)
{ … }
EXPORT_SYMBOL_GPL(…);
int tracing_check_open_get_tr(struct trace_array *tr)
{ … }
int call_filter_check_discard(struct trace_event_call *call, void *rec,
struct trace_buffer *buffer,
struct ring_buffer_event *event)
{ … }
bool
trace_find_filtered_pid(struct trace_pid_list *filtered_pids, pid_t search_pid)
{ … }
bool
trace_ignore_this_task(struct trace_pid_list *filtered_pids,
struct trace_pid_list *filtered_no_pids,
struct task_struct *task)
{ … }
void trace_filter_add_remove_task(struct trace_pid_list *pid_list,
struct task_struct *self,
struct task_struct *task)
{ … }
void *trace_pid_next(struct trace_pid_list *pid_list, void *v, loff_t *pos)
{ … }
void *trace_pid_start(struct trace_pid_list *pid_list, loff_t *pos)
{ … }
int trace_pid_show(struct seq_file *m, void *v)
{ … }
#define PID_BUF_SIZE …
int trace_pid_write(struct trace_pid_list *filtered_pids,
struct trace_pid_list **new_pid_list,
const char __user *ubuf, size_t cnt)
{ … }
static u64 buffer_ftrace_now(struct array_buffer *buf, int cpu)
{ … }
u64 ftrace_now(int cpu)
{ … }
int tracing_is_enabled(void)
{ … }
#define TRACE_BUF_SIZE_DEFAULT …
static unsigned long trace_buf_size = …;
static struct tracer *trace_types __read_mostly;
DEFINE_MUTEX(…) …;
#ifdef CONFIG_SMP
static DECLARE_RWSEM(all_cpu_access_lock);
static DEFINE_PER_CPU(struct mutex, cpu_access_lock);
static inline void trace_access_lock(int cpu)
{ … }
static inline void trace_access_unlock(int cpu)
{ … }
static inline void trace_access_lock_init(void)
{ … }
#else
static DEFINE_MUTEX(access_lock);
static inline void trace_access_lock(int cpu)
{
(void)cpu;
mutex_lock(&access_lock);
}
static inline void trace_access_unlock(int cpu)
{
(void)cpu;
mutex_unlock(&access_lock);
}
static inline void trace_access_lock_init(void)
{
}
#endif
#ifdef CONFIG_STACKTRACE
static void __ftrace_trace_stack(struct trace_buffer *buffer,
unsigned int trace_ctx,
int skip, struct pt_regs *regs);
static inline void ftrace_trace_stack(struct trace_array *tr,
struct trace_buffer *buffer,
unsigned int trace_ctx,
int skip, struct pt_regs *regs);
#else
static inline void __ftrace_trace_stack(struct trace_buffer *buffer,
unsigned int trace_ctx,
int skip, struct pt_regs *regs)
{
}
static inline void ftrace_trace_stack(struct trace_array *tr,
struct trace_buffer *buffer,
unsigned long trace_ctx,
int skip, struct pt_regs *regs)
{
}
#endif
static __always_inline void
trace_event_setup(struct ring_buffer_event *event,
int type, unsigned int trace_ctx)
{ … }
static __always_inline struct ring_buffer_event *
__trace_buffer_lock_reserve(struct trace_buffer *buffer,
int type,
unsigned long len,
unsigned int trace_ctx)
{ … }
void tracer_tracing_on(struct trace_array *tr)
{ … }
void tracing_on(void)
{ … }
EXPORT_SYMBOL_GPL(…);
static __always_inline void
__buffer_unlock_commit(struct trace_buffer *buffer, struct ring_buffer_event *event)
{ … }
int __trace_array_puts(struct trace_array *tr, unsigned long ip,
const char *str, int size)
{ … }
EXPORT_SYMBOL_GPL(…);
int __trace_puts(unsigned long ip, const char *str, int size)
{ … }
EXPORT_SYMBOL_GPL(…);
int __trace_bputs(unsigned long ip, const char *str)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_TRACER_SNAPSHOT
static void tracing_snapshot_instance_cond(struct trace_array *tr,
void *cond_data)
{ … }
void tracing_snapshot_instance(struct trace_array *tr)
{ … }
void tracing_snapshot(void)
{ … }
EXPORT_SYMBOL_GPL(…);
void tracing_snapshot_cond(struct trace_array *tr, void *cond_data)
{ … }
EXPORT_SYMBOL_GPL(…);
void *tracing_cond_snapshot_data(struct trace_array *tr)
{ … }
EXPORT_SYMBOL_GPL(…);
static int resize_buffer_duplicate_size(struct array_buffer *trace_buf,
struct array_buffer *size_buf, int cpu_id);
static void set_buffer_entries(struct array_buffer *buf, unsigned long val);
int tracing_alloc_snapshot_instance(struct trace_array *tr)
{ … }
static void free_snapshot(struct trace_array *tr)
{ … }
static int tracing_arm_snapshot_locked(struct trace_array *tr)
{ … }
int tracing_arm_snapshot(struct trace_array *tr)
{ … }
void tracing_disarm_snapshot(struct trace_array *tr)
{ … }
int tracing_alloc_snapshot(void)
{ … }
EXPORT_SYMBOL_GPL(…);
void tracing_snapshot_alloc(void)
{ … }
EXPORT_SYMBOL_GPL(…);
int tracing_snapshot_cond_enable(struct trace_array *tr, void *cond_data,
cond_update_fn_t update)
{ … }
EXPORT_SYMBOL_GPL(…);
int tracing_snapshot_cond_disable(struct trace_array *tr)
{ … }
EXPORT_SYMBOL_GPL(…);
#else
void tracing_snapshot(void)
{
WARN_ONCE(1, "Snapshot feature not enabled, but internal snapshot used");
}
EXPORT_SYMBOL_GPL(tracing_snapshot);
void tracing_snapshot_cond(struct trace_array *tr, void *cond_data)
{
WARN_ONCE(1, "Snapshot feature not enabled, but internal conditional snapshot used");
}
EXPORT_SYMBOL_GPL(tracing_snapshot_cond);
int tracing_alloc_snapshot(void)
{
WARN_ONCE(1, "Snapshot feature not enabled, but snapshot allocation used");
return -ENODEV;
}
EXPORT_SYMBOL_GPL(tracing_alloc_snapshot);
void tracing_snapshot_alloc(void)
{
tracing_snapshot();
}
EXPORT_SYMBOL_GPL(tracing_snapshot_alloc);
void *tracing_cond_snapshot_data(struct trace_array *tr)
{
return NULL;
}
EXPORT_SYMBOL_GPL(tracing_cond_snapshot_data);
int tracing_snapshot_cond_enable(struct trace_array *tr, void *cond_data, cond_update_fn_t update)
{
return -ENODEV;
}
EXPORT_SYMBOL_GPL(tracing_snapshot_cond_enable);
int tracing_snapshot_cond_disable(struct trace_array *tr)
{
return false;
}
EXPORT_SYMBOL_GPL(tracing_snapshot_cond_disable);
#define free_snapshot …
#define tracing_arm_snapshot_locked …
#endif
void tracer_tracing_off(struct trace_array *tr)
{ … }
void tracing_off(void)
{ … }
EXPORT_SYMBOL_GPL(…);
void disable_trace_on_warning(void)
{ … }
bool tracer_tracing_is_on(struct trace_array *tr)
{ … }
int tracing_is_on(void)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init set_buf_size(char *str)
{ … }
__setup(…);
static int __init set_tracing_thresh(char *str)
{ … }
__setup(…);
unsigned long nsecs_to_usecs(unsigned long nsecs)
{ … }
#undef C
#define C(a, b) …
static const char *trace_options[] = …;
static struct { … } trace_clocks[] = …;
bool trace_clock_in_ns(struct trace_array *tr)
{ … }
int trace_parser_get_init(struct trace_parser *parser, int size)
{ … }
void trace_parser_put(struct trace_parser *parser)
{ … }
int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
{ … }
unsigned long __read_mostly tracing_thresh;
#ifdef CONFIG_TRACER_MAX_TRACE
static const struct file_operations tracing_max_lat_fops;
#ifdef LATENCY_FS_NOTIFY
static struct workqueue_struct *fsnotify_wq;
static void latency_fsnotify_workfn(struct work_struct *work)
{ … }
static void latency_fsnotify_workfn_irq(struct irq_work *iwork)
{ … }
static void trace_create_maxlat_file(struct trace_array *tr,
struct dentry *d_tracer)
{ … }
__init static int latency_fsnotify_init(void)
{ … }
late_initcall_sync(latency_fsnotify_init);
void latency_fsnotify(struct trace_array *tr)
{ … }
#else
#define trace_create_maxlat_file …
#endif
static void
__update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
{ … }
void
update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu,
void *cond_data)
{ … }
void
update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu)
{ … }
#endif
struct pipe_wait { … };
static bool wait_pipe_cond(void *data)
{ … }
static int wait_on_pipe(struct trace_iterator *iter, int full)
{ … }
#ifdef CONFIG_FTRACE_STARTUP_TEST
static bool selftests_can_run;
struct trace_selftests { … };
static LIST_HEAD(postponed_selftests);
static int save_selftest(struct tracer *type)
{ … }
static int run_tracer_selftest(struct tracer *type)
{ … }
static int do_run_tracer_selftest(struct tracer *type)
{ … }
static __init int init_trace_selftests(void)
{ … }
core_initcall(init_trace_selftests);
#else
static inline int run_tracer_selftest(struct tracer *type)
{
return 0;
}
static inline int do_run_tracer_selftest(struct tracer *type)
{
return 0;
}
#endif
static void add_tracer_options(struct trace_array *tr, struct tracer *t);
static void __init apply_trace_boot_options(void);
int __init register_tracer(struct tracer *type)
{ … }
static void tracing_reset_cpu(struct array_buffer *buf, int cpu)
{ … }
void tracing_reset_online_cpus(struct array_buffer *buf)
{ … }
void tracing_reset_all_online_cpus_unlocked(void)
{ … }
void tracing_reset_all_online_cpus(void)
{ … }
int is_tracing_stopped(void)
{ … }
static void tracing_start_tr(struct trace_array *tr)
{ … }
void tracing_start(void)
{ … }
static void tracing_stop_tr(struct trace_array *tr)
{ … }
void tracing_stop(void)
{ … }
enum print_line_t trace_handle_return(struct trace_seq *s)
{ … }
EXPORT_SYMBOL_GPL(…);
static unsigned short migration_disable_value(void)
{ … }
unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status)
{ … }
struct ring_buffer_event *
trace_buffer_lock_reserve(struct trace_buffer *buffer,
int type,
unsigned long len,
unsigned int trace_ctx)
{ … }
DEFINE_PER_CPU(struct ring_buffer_event *, trace_buffered_event);
DEFINE_PER_CPU(int, trace_buffered_event_cnt);
static int trace_buffered_event_ref;
void trace_buffered_event_enable(void)
{ … }
static void enable_trace_buffered_event(void *data)
{ … }
static void disable_trace_buffered_event(void *data)
{ … }
void trace_buffered_event_disable(void)
{ … }
static struct trace_buffer *temp_buffer;
struct ring_buffer_event *
trace_event_buffer_lock_reserve(struct trace_buffer **current_rb,
struct trace_event_file *trace_file,
int type, unsigned long len,
unsigned int trace_ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
static DEFINE_RAW_SPINLOCK(tracepoint_iter_lock);
static DEFINE_MUTEX(tracepoint_printk_mutex);
static void output_printk(struct trace_event_buffer *fbuffer)
{ … }
int tracepoint_printk_sysctl(const struct ctl_table *table, int write,
void *buffer, size_t *lenp,
loff_t *ppos)
{ … }
void trace_event_buffer_commit(struct trace_event_buffer *fbuffer)
{ … }
EXPORT_SYMBOL_GPL(…);
#define STACK_SKIP …
void trace_buffer_unlock_commit_regs(struct trace_array *tr,
struct trace_buffer *buffer,
struct ring_buffer_event *event,
unsigned int trace_ctx,
struct pt_regs *regs)
{ … }
void
trace_buffer_unlock_commit_nostack(struct trace_buffer *buffer,
struct ring_buffer_event *event)
{ … }
void
trace_function(struct trace_array *tr, unsigned long ip, unsigned long
parent_ip, unsigned int trace_ctx)
{ … }
#ifdef CONFIG_STACKTRACE
#define FTRACE_KSTACK_NESTING …
#define FTRACE_KSTACK_ENTRIES …
struct ftrace_stack { … };
struct ftrace_stacks { … };
static DEFINE_PER_CPU(struct ftrace_stacks, ftrace_stacks);
static DEFINE_PER_CPU(int, ftrace_stack_reserve);
static void __ftrace_trace_stack(struct trace_buffer *buffer,
unsigned int trace_ctx,
int skip, struct pt_regs *regs)
{ … }
static inline void ftrace_trace_stack(struct trace_array *tr,
struct trace_buffer *buffer,
unsigned int trace_ctx,
int skip, struct pt_regs *regs)
{ … }
void __trace_stack(struct trace_array *tr, unsigned int trace_ctx,
int skip)
{ … }
void trace_dump_stack(int skip)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_USER_STACKTRACE_SUPPORT
static DEFINE_PER_CPU(int, user_stack_count);
static void
ftrace_trace_userstack(struct trace_array *tr,
struct trace_buffer *buffer, unsigned int trace_ctx)
{ … }
#else
static void ftrace_trace_userstack(struct trace_array *tr,
struct trace_buffer *buffer,
unsigned int trace_ctx)
{
}
#endif
#endif
static inline void
func_repeats_set_delta_ts(struct func_repeats_entry *entry,
unsigned long long delta)
{ … }
void trace_last_func_repeats(struct trace_array *tr,
struct trace_func_repeats *last_info,
unsigned int trace_ctx)
{ … }
struct trace_buffer_struct { … };
static struct trace_buffer_struct __percpu *trace_percpu_buffer;
static char *get_trace_buf(void)
{ … }
static void put_trace_buf(void)
{ … }
static int alloc_percpu_trace_buffer(void)
{ … }
static int buffers_allocated;
void trace_printk_init_buffers(void)
{ … }
EXPORT_SYMBOL_GPL(…);
void trace_printk_start_comm(void)
{ … }
static void trace_printk_start_stop_comm(int enabled)
{ … }
int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
{ … }
EXPORT_SYMBOL_GPL(…);
__printf(3, 0)
static int
__trace_array_vprintk(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, va_list args)
{ … }
__printf(3, 0)
int trace_array_vprintk(struct trace_array *tr,
unsigned long ip, const char *fmt, va_list args)
{ … }
__printf(3, 0)
int trace_array_printk(struct trace_array *tr,
unsigned long ip, const char *fmt, ...)
{ … }
EXPORT_SYMBOL_GPL(…);
int trace_array_init_printk(struct trace_array *tr)
{ … }
EXPORT_SYMBOL_GPL(…);
__printf(3, 4)
int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...)
{ … }
__printf(2, 0)
int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
{ … }
EXPORT_SYMBOL_GPL(…);
static void trace_iterator_increment(struct trace_iterator *iter)
{ … }
static struct trace_entry *
peek_next_entry(struct trace_iterator *iter, int cpu, u64 *ts,
unsigned long *lost_events)
{ … }
static struct trace_entry *
__find_next_entry(struct trace_iterator *iter, int *ent_cpu,
unsigned long *missing_events, u64 *ent_ts)
{ … }
#define STATIC_FMT_BUF_SIZE …
static char static_fmt_buf[STATIC_FMT_BUF_SIZE];
char *trace_iter_expand_format(struct trace_iterator *iter)
{ … }
static bool trace_safe_str(struct trace_iterator *iter, const char *str,
bool star, int len)
{ … }
static DEFINE_STATIC_KEY_FALSE(trace_no_verify);
static int test_can_verify_check(const char *fmt, ...)
{ … }
static void test_can_verify(void)
{ … }
void trace_check_vprintf(struct trace_iterator *iter, const char *fmt,
va_list ap)
{ … }
const char *trace_event_format(struct trace_iterator *iter, const char *fmt)
{ … }
#define STATIC_TEMP_BUF_SIZE …
static char static_temp_buf[STATIC_TEMP_BUF_SIZE] __aligned(…);
struct trace_entry *trace_find_next_entry(struct trace_iterator *iter,
int *ent_cpu, u64 *ent_ts)
{ … }
void *trace_find_next_entry_inc(struct trace_iterator *iter)
{ … }
static void trace_consume(struct trace_iterator *iter)
{ … }
static void *s_next(struct seq_file *m, void *v, loff_t *pos)
{ … }
void tracing_iter_reset(struct trace_iterator *iter, int cpu)
{ … }
static void *s_start(struct seq_file *m, loff_t *pos)
{ … }
static void s_stop(struct seq_file *m, void *p)
{ … }
static void
get_total_entries_cpu(struct array_buffer *buf, unsigned long *total,
unsigned long *entries, int cpu)
{ … }
static void
get_total_entries(struct array_buffer *buf,
unsigned long *total, unsigned long *entries)
{ … }
unsigned long trace_total_entries_cpu(struct trace_array *tr, int cpu)
{ … }
unsigned long trace_total_entries(struct trace_array *tr)
{ … }
static void print_lat_help_header(struct seq_file *m)
{ … }
static void print_event_info(struct array_buffer *buf, struct seq_file *m)
{ … }
static void print_func_help_header(struct array_buffer *buf, struct seq_file *m,
unsigned int flags)
{ … }
static void print_func_help_header_irq(struct array_buffer *buf, struct seq_file *m,
unsigned int flags)
{ … }
void
print_trace_header(struct seq_file *m, struct trace_iterator *iter)
{ … }
static void test_cpu_buff_start(struct trace_iterator *iter)
{ … }
static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
{ … }
static enum print_line_t print_raw_fmt(struct trace_iterator *iter)
{ … }
static enum print_line_t print_hex_fmt(struct trace_iterator *iter)
{ … }
static enum print_line_t print_bin_fmt(struct trace_iterator *iter)
{ … }
int trace_empty(struct trace_iterator *iter)
{ … }
enum print_line_t print_trace_line(struct trace_iterator *iter)
{ … }
void trace_latency_header(struct seq_file *m)
{ … }
void trace_default_header(struct seq_file *m)
{ … }
static void test_ftrace_alive(struct seq_file *m)
{ … }
#ifdef CONFIG_TRACER_MAX_TRACE
static void show_snapshot_main_help(struct seq_file *m)
{ … }
static void show_snapshot_percpu_help(struct seq_file *m)
{ … }
static void print_snapshot_help(struct seq_file *m, struct trace_iterator *iter)
{ … }
#else
static inline void print_snapshot_help(struct seq_file *m, struct trace_iterator *iter) { }
#endif
static int s_show(struct seq_file *m, void *v)
{ … }
static inline int tracing_get_cpu(struct inode *inode)
{ … }
static const struct seq_operations tracer_seq_ops = …;
static void free_trace_iter_content(struct trace_iterator *iter)
{ … }
static struct trace_iterator *
__tracing_open(struct inode *inode, struct file *file, bool snapshot)
{ … }
int tracing_open_generic(struct inode *inode, struct file *filp)
{ … }
bool tracing_is_disabled(void)
{ … }
int tracing_open_generic_tr(struct inode *inode, struct file *filp)
{ … }
int tracing_open_file_tr(struct inode *inode, struct file *filp)
{ … }
int tracing_release_file_tr(struct inode *inode, struct file *filp)
{ … }
int tracing_single_release_file_tr(struct inode *inode, struct file *filp)
{ … }
static int tracing_mark_open(struct inode *inode, struct file *filp)
{ … }
static int tracing_release(struct inode *inode, struct file *file)
{ … }
int tracing_release_generic_tr(struct inode *inode, struct file *file)
{ … }
static int tracing_single_release_tr(struct inode *inode, struct file *file)
{ … }
static int tracing_open(struct inode *inode, struct file *file)
{ … }
static bool
trace_ok_for_array(struct tracer *t, struct trace_array *tr)
{ … }
static struct tracer *
get_tracer_for_array(struct trace_array *tr, struct tracer *t)
{ … }
static void *
t_next(struct seq_file *m, void *v, loff_t *pos)
{ … }
static void *t_start(struct seq_file *m, loff_t *pos)
{ … }
static void t_stop(struct seq_file *m, void *p)
{ … }
static int t_show(struct seq_file *m, void *v)
{ … }
static const struct seq_operations show_traces_seq_ops = …;
static int show_traces_open(struct inode *inode, struct file *file)
{ … }
static int show_traces_release(struct inode *inode, struct file *file)
{ … }
static ssize_t
tracing_write_stub(struct file *filp, const char __user *ubuf,
size_t count, loff_t *ppos)
{ … }
loff_t tracing_lseek(struct file *file, loff_t offset, int whence)
{ … }
static const struct file_operations tracing_fops = …;
static const struct file_operations show_traces_fops = …;
static ssize_t
tracing_cpumask_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *ppos)
{ … }
int tracing_set_cpumask(struct trace_array *tr,
cpumask_var_t tracing_cpumask_new)
{ … }
static ssize_t
tracing_cpumask_write(struct file *filp, const char __user *ubuf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations tracing_cpumask_fops = …;
static int tracing_trace_options_show(struct seq_file *m, void *v)
{ … }
static int __set_tracer_option(struct trace_array *tr,
struct tracer_flags *tracer_flags,
struct tracer_opt *opts, int neg)
{ … }
static int set_tracer_option(struct trace_array *tr, char *cmp, int neg)
{ … }
int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set)
{ … }
int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled)
{ … }
int trace_set_options(struct trace_array *tr, char *option)
{ … }
static void __init apply_trace_boot_options(void)
{ … }
static ssize_t
tracing_trace_options_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static int tracing_trace_options_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations tracing_iter_fops = …;
static const char readme_msg[] = …
#endif
#endif
;
static ssize_t
tracing_readme_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static const struct file_operations tracing_readme_fops = …;
#ifdef CONFIG_TRACE_EVAL_MAP_FILE
static union trace_eval_map_item *
update_eval_map(union trace_eval_map_item *ptr)
{ … }
static void *eval_map_next(struct seq_file *m, void *v, loff_t *pos)
{ … }
static void *eval_map_start(struct seq_file *m, loff_t *pos)
{ … }
static void eval_map_stop(struct seq_file *m, void *v)
{ … }
static int eval_map_show(struct seq_file *m, void *v)
{ … }
static const struct seq_operations tracing_eval_map_seq_ops = …;
static int tracing_eval_map_open(struct inode *inode, struct file *filp)
{ … }
static const struct file_operations tracing_eval_map_fops = …;
static inline union trace_eval_map_item *
trace_eval_jmp_to_tail(union trace_eval_map_item *ptr)
{ … }
static void
trace_insert_eval_map_file(struct module *mod, struct trace_eval_map **start,
int len)
{ … }
static void trace_create_eval_file(struct dentry *d_tracer)
{ … }
#else
static inline void trace_create_eval_file(struct dentry *d_tracer) { }
static inline void trace_insert_eval_map_file(struct module *mod,
struct trace_eval_map **start, int len) { }
#endif
static void trace_insert_eval_map(struct module *mod,
struct trace_eval_map **start, int len)
{ … }
static ssize_t
tracing_set_trace_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
int tracer_init(struct tracer *t, struct trace_array *tr)
{ … }
static void set_buffer_entries(struct array_buffer *buf, unsigned long val)
{ … }
static void update_buffer_entries(struct array_buffer *buf, int cpu)
{ … }
#ifdef CONFIG_TRACER_MAX_TRACE
static int resize_buffer_duplicate_size(struct array_buffer *trace_buf,
struct array_buffer *size_buf, int cpu_id)
{ … }
#endif
static int __tracing_resize_ring_buffer(struct trace_array *tr,
unsigned long size, int cpu)
{ … }
ssize_t tracing_resize_ring_buffer(struct trace_array *tr,
unsigned long size, int cpu_id)
{ … }
int tracing_update_buffers(struct trace_array *tr)
{ … }
struct trace_option_dentry;
static void
create_trace_option_files(struct trace_array *tr, struct tracer *tracer);
static void tracing_set_nop(struct trace_array *tr)
{ … }
static bool tracer_options_updated;
static void add_tracer_options(struct trace_array *tr, struct tracer *t)
{ … }
int tracing_set_tracer(struct trace_array *tr, const char *buf)
{ … }
static ssize_t
tracing_set_trace_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_nsecs_read(unsigned long *ptr, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_nsecs_write(unsigned long *ptr, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_thresh_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_thresh_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
#ifdef CONFIG_TRACER_MAX_TRACE
static ssize_t
tracing_max_lat_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_max_lat_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
#endif
static int open_pipe_on_cpu(struct trace_array *tr, int cpu)
{ … }
static void close_pipe_on_cpu(struct trace_array *tr, int cpu)
{ … }
static int tracing_open_pipe(struct inode *inode, struct file *filp)
{ … }
static int tracing_release_pipe(struct inode *inode, struct file *file)
{ … }
static __poll_t
trace_poll(struct trace_iterator *iter, struct file *filp, poll_table *poll_table)
{ … }
static __poll_t
tracing_poll_pipe(struct file *filp, poll_table *poll_table)
{ … }
static int tracing_wait_pipe(struct file *filp)
{ … }
static ssize_t
tracing_read_pipe(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static void tracing_spd_release_pipe(struct splice_pipe_desc *spd,
unsigned int idx)
{ … }
static size_t
tracing_fill_pipe_page(size_t rem, struct trace_iterator *iter)
{ … }
static ssize_t tracing_splice_read_pipe(struct file *filp,
loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len,
unsigned int flags)
{ … }
static ssize_t
tracing_entries_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_entries_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_total_entries_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
tracing_free_buffer_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static int
tracing_free_buffer_release(struct inode *inode, struct file *filp)
{ … }
#define TRACE_MARKER_MAX_SIZE …
static ssize_t
tracing_mark_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *fpos)
{ … }
static ssize_t
tracing_mark_raw_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *fpos)
{ … }
static int tracing_clock_show(struct seq_file *m, void *v)
{ … }
int tracing_set_clock(struct trace_array *tr, const char *clockstr)
{ … }
static ssize_t tracing_clock_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *fpos)
{ … }
static int tracing_clock_open(struct inode *inode, struct file *file)
{ … }
static int tracing_time_stamp_mode_show(struct seq_file *m, void *v)
{ … }
static int tracing_time_stamp_mode_open(struct inode *inode, struct file *file)
{ … }
u64 tracing_event_time_stamp(struct trace_buffer *buffer, struct ring_buffer_event *rbe)
{ … }
int tracing_set_filter_buffering(struct trace_array *tr, bool set)
{ … }
struct ftrace_buffer_info { … };
#ifdef CONFIG_TRACER_SNAPSHOT
static int tracing_snapshot_open(struct inode *inode, struct file *file)
{ … }
static void tracing_swap_cpu_buffer(void *tr)
{ … }
static ssize_t
tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos)
{ … }
static int tracing_snapshot_release(struct inode *inode, struct file *file)
{ … }
static int tracing_buffers_open(struct inode *inode, struct file *filp);
static ssize_t tracing_buffers_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *ppos);
static int tracing_buffers_release(struct inode *inode, struct file *file);
static ssize_t tracing_buffers_splice_read(struct file *file, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len, unsigned int flags);
static int snapshot_raw_open(struct inode *inode, struct file *filp)
{ … }
#endif
static const struct file_operations tracing_thresh_fops = …;
#ifdef CONFIG_TRACER_MAX_TRACE
static const struct file_operations tracing_max_lat_fops = …;
#endif
static const struct file_operations set_tracer_fops = …;
static const struct file_operations tracing_pipe_fops = …;
static const struct file_operations tracing_entries_fops = …;
static const struct file_operations tracing_total_entries_fops = …;
static const struct file_operations tracing_free_buffer_fops = …;
static const struct file_operations tracing_mark_fops = …;
static const struct file_operations tracing_mark_raw_fops = …;
static const struct file_operations trace_clock_fops = …;
static const struct file_operations trace_time_stamp_mode_fops = …;
#ifdef CONFIG_TRACER_SNAPSHOT
static const struct file_operations snapshot_fops = …;
static const struct file_operations snapshot_raw_fops = …;
#endif
static ssize_t
trace_min_max_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos)
{ … }
static ssize_t
trace_min_max_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos)
{ … }
const struct file_operations trace_min_max_fops = …;
#define TRACING_LOG_ERRS_MAX …
#define TRACING_LOG_LOC_MAX …
#define CMD_PREFIX …
struct err_info { … };
struct tracing_log_err { … };
static DEFINE_MUTEX(tracing_err_log_lock);
static struct tracing_log_err *alloc_tracing_log_err(int len)
{ … }
static void free_tracing_log_err(struct tracing_log_err *err)
{ … }
static struct tracing_log_err *get_tracing_log_err(struct trace_array *tr,
int len)
{ … }
unsigned int err_pos(char *cmd, const char *str)
{ … }
void tracing_log_err(struct trace_array *tr,
const char *loc, const char *cmd,
const char **errs, u8 type, u16 pos)
{ … }
static void clear_tracing_err_log(struct trace_array *tr)
{ … }
static void *tracing_err_log_seq_start(struct seq_file *m, loff_t *pos)
{ … }
static void *tracing_err_log_seq_next(struct seq_file *m, void *v, loff_t *pos)
{ … }
static void tracing_err_log_seq_stop(struct seq_file *m, void *v)
{ … }
static void tracing_err_log_show_pos(struct seq_file *m, u16 pos)
{ … }
static int tracing_err_log_seq_show(struct seq_file *m, void *v)
{ … }
static const struct seq_operations tracing_err_log_seq_ops = …;
static int tracing_err_log_open(struct inode *inode, struct file *file)
{ … }
static ssize_t tracing_err_log_write(struct file *file,
const char __user *buffer,
size_t count, loff_t *ppos)
{ … }
static int tracing_err_log_release(struct inode *inode, struct file *file)
{ … }
static const struct file_operations tracing_err_log_fops = …;
static int tracing_buffers_open(struct inode *inode, struct file *filp)
{ … }
static __poll_t
tracing_buffers_poll(struct file *filp, poll_table *poll_table)
{ … }
static ssize_t
tracing_buffers_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *ppos)
{ … }
static int tracing_buffers_flush(struct file *file, fl_owner_t id)
{ … }
static int tracing_buffers_release(struct inode *inode, struct file *file)
{ … }
struct buffer_ref { … };
static void buffer_ref_release(struct buffer_ref *ref)
{ … }
static void buffer_pipe_buf_release(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{ … }
static bool buffer_pipe_buf_get(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{ … }
static const struct pipe_buf_operations buffer_pipe_buf_ops = …;
static void buffer_spd_release(struct splice_pipe_desc *spd, unsigned int i)
{ … }
static ssize_t
tracing_buffers_splice_read(struct file *file, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{ … }
static long tracing_buffers_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
#ifdef CONFIG_TRACER_MAX_TRACE
static int get_snapshot_map(struct trace_array *tr)
{ … }
static void put_snapshot_map(struct trace_array *tr)
{ … }
#else
static inline int get_snapshot_map(struct trace_array *tr) { return 0; }
static inline void put_snapshot_map(struct trace_array *tr) { }
#endif
static void tracing_buffers_mmap_close(struct vm_area_struct *vma)
{ … }
static const struct vm_operations_struct tracing_buffers_vmops = …;
static int tracing_buffers_mmap(struct file *filp, struct vm_area_struct *vma)
{ … }
static const struct file_operations tracing_buffers_fops = …;
static ssize_t
tracing_stats_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations tracing_stats_fops = …;
#ifdef CONFIG_DYNAMIC_FTRACE
static ssize_t
tracing_read_dyn_info(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static const struct file_operations tracing_dyn_info_fops = …;
#endif
#if defined(CONFIG_TRACER_SNAPSHOT) && defined(CONFIG_DYNAMIC_FTRACE)
static void
ftrace_snapshot(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
{ … }
static void
ftrace_count_snapshot(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
{ … }
static int
ftrace_snapshot_print(struct seq_file *m, unsigned long ip,
struct ftrace_probe_ops *ops, void *data)
{ … }
static int
ftrace_snapshot_init(struct ftrace_probe_ops *ops, struct trace_array *tr,
unsigned long ip, void *init_data, void **data)
{ … }
static void
ftrace_snapshot_free(struct ftrace_probe_ops *ops, struct trace_array *tr,
unsigned long ip, void *data)
{ … }
static struct ftrace_probe_ops snapshot_probe_ops = …;
static struct ftrace_probe_ops snapshot_count_probe_ops = …;
static int
ftrace_trace_snapshot_callback(struct trace_array *tr, struct ftrace_hash *hash,
char *glob, char *cmd, char *param, int enable)
{ … }
static struct ftrace_func_command ftrace_snapshot_cmd = …;
static __init int register_snapshot_cmd(void)
{ … }
#else
static inline __init int register_snapshot_cmd(void) { return 0; }
#endif
static struct dentry *tracing_get_dentry(struct trace_array *tr)
{ … }
static struct dentry *tracing_dentry_percpu(struct trace_array *tr, int cpu)
{ … }
static struct dentry *
trace_create_cpu_file(const char *name, umode_t mode, struct dentry *parent,
void *data, long cpu, const struct file_operations *fops)
{ … }
static void
tracing_init_tracefs_percpu(struct trace_array *tr, long cpu)
{ … }
#ifdef CONFIG_FTRACE_SELFTEST
#include "trace_selftest.c"
#endif
static ssize_t
trace_options_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos)
{ … }
static ssize_t
trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos)
{ … }
static int tracing_open_options(struct inode *inode, struct file *filp)
{ … }
static int tracing_release_options(struct inode *inode, struct file *file)
{ … }
static const struct file_operations trace_options_fops = …;
static void get_tr_index(void *data, struct trace_array **ptr,
unsigned int *pindex)
{ … }
static ssize_t
trace_options_core_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos)
{ … }
static ssize_t
trace_options_core_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos)
{ … }
static const struct file_operations trace_options_core_fops = …;
struct dentry *trace_create_file(const char *name,
umode_t mode,
struct dentry *parent,
void *data,
const struct file_operations *fops)
{ … }
static struct dentry *trace_options_init_dentry(struct trace_array *tr)
{ … }
static void
create_trace_option_file(struct trace_array *tr,
struct trace_option_dentry *topt,
struct tracer_flags *flags,
struct tracer_opt *opt)
{ … }
static void
create_trace_option_files(struct trace_array *tr, struct tracer *tracer)
{ … }
static struct dentry *
create_trace_option_core_file(struct trace_array *tr,
const char *option, long index)
{ … }
static void create_trace_options_dir(struct trace_array *tr)
{ … }
static ssize_t
rb_simple_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
rb_simple_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static const struct file_operations rb_simple_fops = …;
static ssize_t
buffer_percent_read(struct file *filp, char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static ssize_t
buffer_percent_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static const struct file_operations buffer_percent_fops = …;
static ssize_t
buffer_subbuf_size_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos)
{ … }
static ssize_t
buffer_subbuf_size_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{ … }
static const struct file_operations buffer_subbuf_size_fops = …;
static struct dentry *trace_instance_dir;
static void
init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer);
static int
allocate_trace_buffer(struct trace_array *tr, struct array_buffer *buf, int size)
{ … }
static void free_trace_buffer(struct array_buffer *buf)
{ … }
static int allocate_trace_buffers(struct trace_array *tr, int size)
{ … }
static void free_trace_buffers(struct trace_array *tr)
{ … }
static void init_trace_flags_index(struct trace_array *tr)
{ … }
static void __update_tracer_options(struct trace_array *tr)
{ … }
static void update_tracer_options(struct trace_array *tr)
{ … }
struct trace_array *trace_array_find(const char *instance)
{ … }
struct trace_array *trace_array_find_get(const char *instance)
{ … }
static int trace_array_create_dir(struct trace_array *tr)
{ … }
static struct trace_array *
trace_array_create_systems(const char *name, const char *systems)
{ … }
static struct trace_array *trace_array_create(const char *name)
{ … }
static int instance_mkdir(const char *name)
{ … }
struct trace_array *trace_array_get_by_name(const char *name, const char *systems)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __remove_instance(struct trace_array *tr)
{ … }
int trace_array_destroy(struct trace_array *this_tr)
{ … }
EXPORT_SYMBOL_GPL(…);
static int instance_rmdir(const char *name)
{ … }
static __init void create_trace_instances(struct dentry *d_tracer)
{ … }
static void
init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer)
{ … }
static struct vfsmount *trace_automount(struct dentry *mntpt, void *ingore)
{ … }
int tracing_init_dentry(void)
{ … }
extern struct trace_eval_map *__start_ftrace_eval_maps[];
extern struct trace_eval_map *__stop_ftrace_eval_maps[];
static struct workqueue_struct *eval_map_wq __initdata;
static struct work_struct eval_map_work __initdata;
static struct work_struct tracerfs_init_work __initdata;
static void __init eval_map_work_func(struct work_struct *work)
{ … }
static int __init trace_eval_init(void)
{ … }
subsys_initcall(trace_eval_init);
static int __init trace_eval_sync(void)
{ … }
late_initcall_sync(trace_eval_sync);
#ifdef CONFIG_MODULES
static void trace_module_add_evals(struct module *mod)
{ … }
#ifdef CONFIG_TRACE_EVAL_MAP_FILE
static void trace_module_remove_evals(struct module *mod)
{ … }
#else
static inline void trace_module_remove_evals(struct module *mod) { }
#endif
static int trace_module_notify(struct notifier_block *self,
unsigned long val, void *data)
{ … }
static struct notifier_block trace_module_nb = …;
#endif
static __init void tracer_init_tracefs_work_func(struct work_struct *work)
{ … }
static __init int tracer_init_tracefs(void)
{ … }
fs_initcall(tracer_init_tracefs);
static int trace_die_panic_handler(struct notifier_block *self,
unsigned long ev, void *unused);
static struct notifier_block trace_panic_notifier = …;
static struct notifier_block trace_die_notifier = …;
static int trace_die_panic_handler(struct notifier_block *self,
unsigned long ev, void *unused)
{ … }
#define TRACE_MAX_PRINT …
#define KERN_TRACE …
void
trace_printk_seq(struct trace_seq *s)
{ … }
static void trace_init_iter(struct trace_iterator *iter, struct trace_array *tr)
{ … }
void trace_init_global_iter(struct trace_iterator *iter)
{ … }
static void ftrace_dump_one(struct trace_array *tr, enum ftrace_dump_mode dump_mode)
{ … }
static void ftrace_dump_by_param(void)
{ … }
void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
{ … }
EXPORT_SYMBOL_GPL(…);
#define WRITE_BUFSIZE …
ssize_t trace_parse_run_command(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos,
int (*createfn)(const char *))
{ … }
#ifdef CONFIG_TRACER_MAX_TRACE
__init static bool tr_needs_alloc_snapshot(const char *name)
{ … }
__init static void do_allocate_snapshot(const char *name)
{ … }
#else
static inline void do_allocate_snapshot(const char *name) { }
#endif
__init static void enable_instances(void)
{ … }
__init static int tracer_alloc_buffers(void)
{ … }
void __init ftrace_boot_snapshot(void)
{ … }
void __init early_trace_init(void)
{ … }
void __init trace_init(void)
{ … }
__init static void clear_boot_tracer(void)
{ … }
#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
__init static void tracing_set_default_clock(void)
{ … }
#else
static inline void tracing_set_default_clock(void) { }
#endif
__init static int late_trace_init(void)
{ … }
late_initcall_sync(late_trace_init);