From: Robert Richter <rric@kernel.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, "H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Andy Lutomirski <luto@amacapital.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Brian Gerst <brgerst@gmail.com>,
Kees Cook <keescook@chromium.org>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Byungchul Park <byungchul.park@lge.com>,
Nilay Vaish <nilayvaish@gmail.com>,
oprofile-list@lists.sourceforge.net
Subject: Re: [PATCH 2/6] oprofile/x86: add regs->ip to oprofile trace
Date: Tue, 30 Aug 2016 13:30:00 +0200 [thread overview]
Message-ID: <20160830113000.GO25086@rric.localdomain> (raw)
In-Reply-To: <6c745a83dbd69fc6857ef9b2f8be0f011d775936.1472057064.git.jpoimboe@redhat.com>
On 24.08.16 11:50:15, Josh Poimboeuf wrote:
> 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.
>
> Cc: Robert Richter <rric@kernel.org>
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
> arch/x86/oprofile/backtrace.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
> index cb31a44..2ef6c8b 100644
> --- a/arch/x86/oprofile/backtrace.c
> +++ b/arch/x86/oprofile/backtrace.c
> @@ -114,9 +114,16 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth)
>
> if (!user_mode(regs)) {
> unsigned long stack = kernel_stack_pointer(regs);
> - if (depth)
> - dump_trace(NULL, regs, (unsigned long *)stack, 0,
> - &backtrace_ops, &depth);
> +
> + if (!depth)
> + return;
> +
> + oprofile_add_trace(regs->ip);
> + if (!--depth)
> + return;
> +
> + dump_trace(NULL, regs, (unsigned long *)stack, 0,
> + &backtrace_ops, &depth);
Acked-by: Robert Richter <rric@kernel.org>
Adding oprofile-list in case someone has objections since this may
break userland tools.
Ingo, please apply the patch to tip once this series is ok to you.
Thanks,
-Robert
> return;
> }
>
> --
> 2.7.4
>
next prev parent reply other threads:[~2016-08-30 11:30 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 16:50 [PATCH 0/6] x86/dumpstack: more stack dump improvements Josh Poimboeuf
2016-08-24 16:50 ` [PATCH 1/6] perf/x86: check perf_callchain_store() error Josh Poimboeuf
2016-09-08 9:48 ` [tip:x86/asm] perf/x86: Check " tip-bot for Josh Poimboeuf
2016-08-24 16:50 ` [PATCH 2/6] oprofile/x86: add regs->ip to oprofile trace Josh Poimboeuf
2016-08-30 11:30 ` Robert Richter [this message]
2016-09-08 9:48 ` [tip:x86/asm] oprofile/x86: Add " tip-bot for Josh Poimboeuf
2016-08-24 16:50 ` [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Josh Poimboeuf
2016-08-24 17:28 ` Joe Perches
2016-08-24 18:43 ` Josh Poimboeuf
2016-08-24 19:07 ` Joe Perches
2016-08-24 19:24 ` Josh Poimboeuf
2016-08-24 19:57 ` Joe Perches
2016-08-24 18:03 ` Linus Torvalds
2016-08-24 18:22 ` Peter Zijlstra
2016-08-24 18:37 ` Linus Torvalds
2016-08-24 19:37 ` Josh Poimboeuf
2016-08-25 17:49 ` Josh Poimboeuf
2016-08-25 20:41 ` Kees Cook
2016-08-25 21:07 ` Josh Poimboeuf
[not found] ` <CA+55aFy3sgA4=ZPhiDWiRMvWj9QPhUd0JBdUr1hm_6G0aSC6uw@mail.gmail.com>
2016-08-26 2:19 ` Kees Cook
2016-08-26 3:19 ` Josh Poimboeuf
2016-08-26 4:40 ` Linus Torvalds
2016-08-26 5:56 ` Josh Poimboeuf
[not found] ` <CA+55aFy8FPRiEr-4p++TGj+keTNsg781q1E1FQZ7z4+nAs0ZaQ@mail.gmail.com>
2016-08-26 13:30 ` Josh Poimboeuf
2016-08-31 16:53 ` Josh Poimboeuf
2016-08-31 17:15 ` Linus Torvalds
2016-09-01 13:09 ` Josh Poimboeuf
2016-09-01 16:30 ` Linus Torvalds
2016-09-08 9:49 ` [tip:x86/asm] x86/dumpstack: Make " tip-bot for Josh Poimboeuf
2016-08-24 16:50 ` [PATCH 4/6] x86/dumpstack: add get_stack_pointer() and get_frame_pointer() Josh Poimboeuf
2016-09-08 9:49 ` [tip:x86/asm] x86/dumpstack: Add " tip-bot for Josh Poimboeuf
2016-08-24 16:50 ` [PATCH 5/6] x86/dumpstack: remove unnecessary stack pointer arguments Josh Poimboeuf
2016-09-08 9:50 ` [tip:x86/asm] x86/dumpstack: Remove " tip-bot for Josh Poimboeuf
2016-08-24 16:50 ` [PATCH 6/6] x86/dumpstack: allow preemption in show_stack_log_lvl() and dump_trace() Josh Poimboeuf
2016-09-08 7:04 ` Ingo Molnar
2016-09-08 21:47 ` Josh Poimboeuf
2016-09-08 21:49 ` [PATCH v2] " Josh Poimboeuf
2016-09-13 18:29 ` Ingo Molnar
2016-09-13 19:38 ` Josh Poimboeuf
2016-09-14 17:39 ` [tip:x86/asm] x86/dumpstack: Allow " tip-bot for Josh Poimboeuf
2016-09-09 6:11 ` [PATCH 6/6] x86/dumpstack: allow " Ingo Molnar
2016-09-01 13:13 ` [PATCH 0/6] x86/dumpstack: more stack dump improvements Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160830113000.GO25086@rric.localdomain \
--to=rric@kernel.org \
--cc=brgerst@gmail.com \
--cc=byungchul.park@lge.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=nilayvaish@gmail.com \
--cc=oprofile-list@lists.sourceforge.net \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®