Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99793e3d authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branches 'tracing/kmemtrace2' and 'tracing/ftrace' into tracing/urgent

parents 3e806802 a103e2ab
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o
obj-$(CONFIG_RING_BUFFER) += ring_buffer.o

obj-$(CONFIG_TRACING) += trace.o
obj-$(CONFIG_TRACING) += trace_output.o
obj-$(CONFIG_TRACING) += trace_stat.o
obj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o
obj-$(CONFIG_SYSPROF_TRACER) += trace_sysprof.o
obj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o
+41 −700

File changed.

Preview size limit exceeded, changes collapsed.

+20 −16
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ enum trace_type {
	TRACE_FN,
	TRACE_CTX,
	TRACE_WAKE,
	TRACE_CONT,
	TRACE_STACK,
	TRACE_PRINT,
	TRACE_SPECIAL,
@@ -34,7 +33,7 @@ enum trace_type {
	TRACE_KMEM_FREE,
	TRACE_POWER,

	__TRACE_LAST_TYPE
	__TRACE_LAST_TYPE,
};

/*
@@ -199,7 +198,6 @@ struct kmemtrace_free_entry {
 *  NEED_RESCED		- reschedule is requested
 *  HARDIRQ		- inside an interrupt handler
 *  SOFTIRQ		- inside a softirq handler
 *  CONT		- multiple entries hold the trace item
 */
enum trace_flag_type {
	TRACE_FLAG_IRQS_OFF		= 0x01,
@@ -207,7 +205,6 @@ enum trace_flag_type {
	TRACE_FLAG_NEED_RESCHED		= 0x04,
	TRACE_FLAG_HARDIRQ		= 0x08,
	TRACE_FLAG_SOFTIRQ		= 0x10,
	TRACE_FLAG_CONT			= 0x20,
};

#define TRACE_BUF_SIZE		1024
@@ -283,7 +280,6 @@ extern void __ftrace_bad_type(void);
	do {								\
		IF_ASSIGN(var, ent, struct ftrace_entry, TRACE_FN);	\
		IF_ASSIGN(var, ent, struct ctx_switch_entry, 0);	\
		IF_ASSIGN(var, ent, struct trace_field_cont, TRACE_CONT); \
		IF_ASSIGN(var, ent, struct stack_entry, TRACE_STACK);	\
		IF_ASSIGN(var, ent, struct userstack_entry, TRACE_USER_STACK);\
		IF_ASSIGN(var, ent, struct print_entry, TRACE_PRINT);	\
@@ -365,6 +361,21 @@ struct tracer {
	struct tracer		*next;
	int			print_max;
	struct tracer_flags 	*flags;

	/*
	 * If you change one of the following on tracing runtime, recall
	 * init_tracer_stat()
	 */

	/* Iteration over statistic entries */
	void			*(*stat_start)(void);
	void			*(*stat_next)(void *prev, int idx);
	/* Compare two entries for sorting (optional) for stats */
	int			(*stat_cmp)(void *p1, void *p2);
	/* Print a stat entry */
	int			(*stat_show)(struct seq_file *s, void *p);
	/* Print the headers of your stat entries */
	int			(*stat_headers)(struct seq_file *s);
};

struct trace_seq {
@@ -450,6 +461,8 @@ void tracing_start_sched_switch_record(void);
int register_tracer(struct tracer *type);
void unregister_tracer(struct tracer *type);

void init_tracer_stat(struct tracer *trace);

extern unsigned long nsecs_to_usecs(unsigned long nsecs);

extern unsigned long tracing_max_latency;
@@ -481,10 +494,10 @@ struct tracer_switch_ops {
	void				*private;
	struct tracer_switch_ops	*next;
};

char *trace_find_cmdline(int pid);
#endif /* CONFIG_CONTEXT_SWITCH_TRACER */

extern char *trace_find_cmdline(int pid);

#ifdef CONFIG_DYNAMIC_FTRACE
extern unsigned long ftrace_update_tot_cnt;
#define DYN_FTRACE_TEST_NAME trace_selftest_dynamic_test_func
@@ -513,15 +526,6 @@ extern int trace_selftest_startup_branch(struct tracer *trace,
#endif /* CONFIG_FTRACE_STARTUP_TEST */

extern void *head_page(struct trace_array_cpu *data);
extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
extern void trace_seq_print_cont(struct trace_seq *s,
				 struct trace_iterator *iter);

extern int
seq_print_ip_sym(struct trace_seq *s, unsigned long ip,
		unsigned long sym_flags);
extern ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
				 size_t cnt);
extern long ns2usecs(cycle_t nsec);
extern int
trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args);
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/kallsyms.h>

#include "trace.h"
#include "trace_output.h"

static struct trace_array *boot_trace;
static bool pre_initcalls_finished;
+182 −113

File changed.

Preview size limit exceeded, changes collapsed.

Loading