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

Commit 3e344a0d authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Ingo Molnar
Browse files

oprofile/x86: Add regs->ip to oprofile trace



dump_trace() doesn't add the interrupted instruction's address to the
trace, so add it manually.  This makes the profile more useful, and also
makes it more consistent with what perf profiling does.

Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Acked-by: default avatarRobert Richter <rric@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nilay Vaish <nilayvaish@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/6c745a83dbd69fc6857ef9b2f8be0f011d775936.1472057064.git.jpoimboe@redhat.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 019e579d
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -114,7 +114,14 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth)

	if (!user_mode(regs)) {
		unsigned long stack = kernel_stack_pointer(regs);
		if (depth)

		if (!depth)
			return;

		oprofile_add_trace(regs->ip);
		if (!--depth)
			return;

		dump_trace(NULL, regs, (unsigned long *)stack, 0,
			   &backtrace_ops, &depth);
		return;