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

Commit 8b54e45b authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branches 'tracing/docs', 'tracing/filters', 'tracing/ftrace',...

Merge branches 'tracing/docs', 'tracing/filters', 'tracing/ftrace', 'tracing/kprobes', 'tracing/blktrace-v2' and 'tracing/textedit' into tracing/core-v2
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -410,7 +410,6 @@ int ftrace_disable_ftrace_graph_caller(void)
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
{
	unsigned long old;
	unsigned long long calltime;
	int faulted;
	struct ftrace_graph_ent trace;
	unsigned long return_hooker = (unsigned long)
@@ -453,10 +452,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
		return;
	}

	calltime = trace_clock_local();

	if (ftrace_push_return_trace(old, calltime,
				self_addr, &trace.depth) == -EBUSY) {
	if (ftrace_push_return_trace(old, self_addr, &trace.depth) == -EBUSY) {
		*parent = old;
		return;
	}
+9 −8
Original line number Diff line number Diff line
@@ -638,13 +638,13 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
#else
			"	pushf\n"
			/*
			 * Skip cs, ip, orig_ax.
			 * Skip cs, ip, orig_ax and gs.
			 * trampoline_handler() will plug in these values
			 */
			"	subl $12, %esp\n"
			"	subl $16, %esp\n"
			"	pushl %fs\n"
			"	pushl %ds\n"
			"	pushl %es\n"
			"	pushl %ds\n"
			"	pushl %eax\n"
			"	pushl %ebp\n"
			"	pushl %edi\n"
@@ -655,10 +655,10 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
			"	movl %esp, %eax\n"
			"	call trampoline_handler\n"
			/* Move flags to cs */
			"	movl 52(%esp), %edx\n"
			"	movl %edx, 48(%esp)\n"
			"	movl 56(%esp), %edx\n"
			"	movl %edx, 52(%esp)\n"
			/* Replace saved flags with true return address. */
			"	movl %eax, 52(%esp)\n"
			"	movl %eax, 56(%esp)\n"
			"	popl %ebx\n"
			"	popl %ecx\n"
			"	popl %edx\n"
@@ -666,8 +666,8 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
			"	popl %edi\n"
			"	popl %ebp\n"
			"	popl %eax\n"
			/* Skip ip, orig_ax, es, ds, fs */
			"	addl $20, %esp\n"
			/* Skip ds, es, fs, gs, orig_ax and ip */
			"	addl $24, %esp\n"
			"	popf\n"
#endif
			"	ret\n");
@@ -691,6 +691,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs)
	regs->cs = __KERNEL_CS;
#else
	regs->cs = __KERNEL_CS | get_kernel_rpl();
	regs->gs = 0;
#endif
	regs->ip = trampoline_address;
	regs->orig_ax = ~0UL;
+16 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@

static struct vfsmount *debugfs_mount;
static int debugfs_mount_count;
static bool debugfs_registered;

static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev)
{
@@ -496,6 +497,16 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
}
EXPORT_SYMBOL_GPL(debugfs_rename);

/**
 * debugfs_initialized - Tells whether debugfs has been registered
 */
bool debugfs_initialized(void)
{
	return debugfs_registered;
}
EXPORT_SYMBOL_GPL(debugfs_initialized);


static struct kobject *debug_kobj;

static int __init debugfs_init(void)
@@ -509,11 +520,16 @@ static int __init debugfs_init(void)
	retval = register_filesystem(&debug_fs_type);
	if (retval)
		kobject_put(debug_kobj);
	else
		debugfs_registered = true;

	return retval;
}

static void __exit debugfs_exit(void)
{
	debugfs_registered = false;

	simple_release_fs(&debugfs_mount, &debugfs_mount_count);
	unregister_filesystem(&debug_fs_type);
	kobject_put(debug_kobj);
+8 −0
Original line number Diff line number Diff line
@@ -71,6 +71,9 @@ struct dentry *debugfs_create_bool(const char *name, mode_t mode,
struct dentry *debugfs_create_blob(const char *name, mode_t mode,
				  struct dentry *parent,
				  struct debugfs_blob_wrapper *blob);

bool debugfs_initialized(void);

#else

#include <linux/err.h>
@@ -183,6 +186,11 @@ static inline struct dentry *debugfs_create_blob(const char *name, mode_t mode,
	return ERR_PTR(-ENODEV);
}

static inline bool debugfs_initialized(void)
{
	return false;
}

#endif

#endif
+10 −5
Original line number Diff line number Diff line
@@ -145,8 +145,14 @@ enum {
};

struct dyn_ftrace {
	union {
		unsigned long		ip; /* address of mcount call-site */
		struct dyn_ftrace	*freelist;
	};
	union {
		unsigned long		flags;
		struct dyn_ftrace	*newlist;
	};
	struct dyn_arch_ftrace		arch;
};

@@ -369,8 +375,7 @@ struct ftrace_ret_stack {
extern void return_to_handler(void);

extern int
ftrace_push_return_trace(unsigned long ret, unsigned long long time,
			 unsigned long func, int *depth);
ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth);
extern void
ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret);

Loading