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

Commit 3f5ec136 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar
Browse files

tracing/fastboot: move boot tracer structs and funcs into their own header.



Impact: Cleanups on the boot tracer and ftrace

This patch bring some cleanups about the boot tracer headers. The
functions and structures of this tracer have nothing related to ftrace
and should have so their own header file.

Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 60a011c7
Loading
Loading
Loading
Loading
+0 −41
Original line number Original line Diff line number Diff line
@@ -287,45 +287,4 @@ extern trace_function_return_t ftrace_function_return;
extern void unregister_ftrace_return(void);
extern void unregister_ftrace_return(void);
#endif
#endif


/*
 * Structure which defines the trace of an initcall.
 * You don't have to fill the func field since it is
 * only used internally by the tracer.
 */
struct boot_trace {
	pid_t			caller;
	char			func[KSYM_NAME_LEN];
	int			result;
	unsigned long long	duration;		/* usecs */
	ktime_t			calltime;
	ktime_t			rettime;
};

#ifdef CONFIG_BOOT_TRACER
/* Append the trace on the ring-buffer */
extern void trace_boot(struct boot_trace *it, initcall_t fn);

/* Tells the tracer that smp_pre_initcall is finished.
 * So we can start the tracing
 */
extern void start_boot_trace(void);

/* Resume the tracing of other necessary events
 * such as sched switches
 */
extern void enable_boot_trace(void);

/* Suspend this tracing. Actually, only sched_switches tracing have
 * to be suspended. Initcalls doesn't need it.)
 */
extern void disable_boot_trace(void);
#else
static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
static inline void start_boot_trace(void) { }
static inline void enable_boot_trace(void) { }
static inline void disable_boot_trace(void) { }
#endif



#endif /* _LINUX_FTRACE_H */
#endif /* _LINUX_FTRACE_H */

include/trace/boot.h

0 → 100644
+43 −0
Original line number Original line Diff line number Diff line
#ifndef _LINUX_TRACE_BOOT_H
#define _LINUX_TRACE_BOOT_H

/*
 * Structure which defines the trace of an initcall.
 * You don't have to fill the func field since it is
 * only used internally by the tracer.
 */
struct boot_trace {
	pid_t			caller;
	char			func[KSYM_NAME_LEN];
	int			result;
	unsigned long long	duration;		/* usecs */
	ktime_t			calltime;
	ktime_t			rettime;
};

#ifdef CONFIG_BOOT_TRACER
/* Append the trace on the ring-buffer */
extern void trace_boot(struct boot_trace *it, initcall_t fn);

/* Tells the tracer that smp_pre_initcall is finished.
 * So we can start the tracing
 */
extern void start_boot_trace(void);

/* Resume the tracing of other necessary events
 * such as sched switches
 */
extern void enable_boot_trace(void);

/* Suspend this tracing. Actually, only sched_switches tracing have
 * to be suspended. Initcalls doesn't need it.)
 */
extern void disable_boot_trace(void);
#else
static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
static inline void start_boot_trace(void) { }
static inline void enable_boot_trace(void) { }
static inline void disable_boot_trace(void) { }
#endif /* CONFIG_BOOT_TRACER */

#endif /* __LINUX_TRACE_BOOT_H */
+1 −0
Original line number Original line Diff line number Diff line
@@ -63,6 +63,7 @@
#include <linux/signal.h>
#include <linux/signal.h>
#include <linux/idr.h>
#include <linux/idr.h>
#include <linux/ftrace.h>
#include <linux/ftrace.h>
#include <trace/boot.h>


#include <asm/io.h>
#include <asm/io.h>
#include <asm/bugs.h>
#include <asm/bugs.h>
+1 −0
Original line number Original line Diff line number Diff line
@@ -8,6 +8,7 @@
#include <linux/ring_buffer.h>
#include <linux/ring_buffer.h>
#include <linux/mmiotrace.h>
#include <linux/mmiotrace.h>
#include <linux/ftrace.h>
#include <linux/ftrace.h>
#include <trace/boot.h>


enum trace_type {
enum trace_type {
	__TRACE_FIRST_TYPE = 0,
	__TRACE_FIRST_TYPE = 0,