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

Commit ec1bb60b authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'tracing/sysprof' into auto-ftrace-next

parents 5373fdbd 37f5d732
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -75,6 +75,14 @@ config PREEMPT_TRACER
	  enabled. This option and the irqs-off timing option can be
	  used together or separately.)

config SYSPROF_TRACER
	bool "Sysprof Tracer"
	depends on X86
	select TRACING
	help
	  This tracer provides the trace needed by the 'Sysprof' userspace
	  tool.

config SCHED_TRACER
	bool "Scheduling Latency Tracer"
	depends on HAVE_FTRACE
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ obj-$(CONFIG_FTRACE) += libftrace.o

obj-$(CONFIG_TRACING) += trace.o
obj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o
obj-$(CONFIG_SYSPROF_TRACER) += trace_sysprof.o
obj-$(CONFIG_FTRACE) += trace_functions.o
obj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o
obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o
+3 −0
Original line number Diff line number Diff line
@@ -2913,6 +2913,9 @@ static __init void tracer_init_debugfs(void)
		pr_warning("Could not create debugfs "
			   "'dyn_ftrace_total_info' entry\n");
#endif
#ifdef CONFIG_SYSPROF_TRACER
	init_tracer_sysprof_debugfs(d_tracer);
#endif
}

static int trace_alloc_page(void)
+6 −0
Original line number Diff line number Diff line
@@ -193,6 +193,8 @@ struct trace_iterator {
void tracing_reset(struct trace_array_cpu *data);
int tracing_open_generic(struct inode *inode, struct file *filp);
struct dentry *tracing_init_dentry(void);
void init_tracer_sysprof_debugfs(struct dentry *d_tracer);

void ftrace(struct trace_array *tr,
			    struct trace_array_cpu *data,
			    unsigned long ip,
@@ -294,6 +296,10 @@ extern int trace_selftest_startup_wakeup(struct tracer *trace,
extern int trace_selftest_startup_sched_switch(struct tracer *trace,
					       struct trace_array *tr);
#endif
#ifdef CONFIG_SYSPROF_TRACER
extern int trace_selftest_startup_sysprof(struct tracer *trace,
					       struct trace_array *tr);
#endif
#endif /* CONFIG_FTRACE_STARTUP_TEST */

extern void *head_page(struct trace_array_cpu *data);
+23 −0
Original line number Diff line number Diff line
@@ -538,3 +538,26 @@ trace_selftest_startup_sched_switch(struct tracer *trace, struct trace_array *tr
	return ret;
}
#endif /* CONFIG_CONTEXT_SWITCH_TRACER */

#ifdef CONFIG_SYSPROF_TRACER
int
trace_selftest_startup_sysprof(struct tracer *trace, struct trace_array *tr)
{
	unsigned long count;
	int ret;

	/* start the tracing */
	tr->ctrl = 1;
	trace->init(tr);
	/* Sleep for a 1/10 of a second */
	msleep(100);
	/* stop the tracing. */
	tr->ctrl = 0;
	trace->ctrl_update(tr);
	/* check the trace buffer */
	ret = trace_test_buffer(tr, &count);
	trace->reset(tr);

	return ret;
}
#endif /* CONFIG_SYSPROF_TRACER */
Loading