Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1472428
| Path | csiph.com!goblin3!goblin1!goblin2!goblin.stu.neva.ru!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Robert Richter <rric@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/6] oprofile/x86: add regs->ip to oprofile trace |
| Date | Tue, 30 Aug 2016 13:40:02 +0200 |
| Message-ID | <sbPyy-4bb-17@gated-at.bofh.it> (permalink) |
| References | <s9JGV-4Wy-3@gated-at.bofh.it> <s9JGW-4Wy-23@gated-at.bofh.it> |
| X-Original-To | Josh Poimboeuf <jpoimboe@redhat.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=U3ObjAjctX048/s2Z8Gg9VhKvK1LdnHi6Ts6LNE5u34=; b=ue2D3CLp1UIF5JHLuf/z4NpfLi+LTRkl9Q+eJE2fKsu6hxFv+ve1R1NSH97mbzaKni 6e3lb84xOvoY1YGP6fNfSzc+g0jtMCvHM+OcpPUHZ+e13SqspH5Wa29LBmp4doMADcK4 7/Ys2u6swSfQCEA306Qb6kz+rzeioVC4+F8CVlaIKyvafrRtOC9bTKRQSVx5IUa+5bwr tf0M3JtXuJFIhHJTSNiagkoxbglkYgCupPn9FGWT/qz/bHoFlYCkbQyQykN98ovgcoM+ okha1CbJ0gXzdIQfXyAGoVZtQCIXXfL4UaPVJz1A8cyON1GfYe1rF5UM3ym1UZFQZi2N 1b8A== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=U3ObjAjctX048/s2Z8Gg9VhKvK1LdnHi6Ts6LNE5u34=; b=eKoRGRXYp8fPfgUcLqNxffzyONE0+1TX73xHgGK3aiTPqmtSeq09l0RKMasvBeN73i h9tXkJS4VAOFkIogET7fXI6lL7Vj7tqckM3LqMo0vQ+EZIKNs0R8Gn/UA6OUeNcu9927 FJ5M1hJmK1q96dGqvLOC6DaSdqLo3RkNJ7PbyHfCLOXqGszMfpiMFHAH+KFG8vFuBzdc UBCns+KT/6sKzAnNWhR9emRFV3teN5kbYEVHwU6tPEJYi+bQut3gl+6g5SE3y3UC/K2o kU2dHU58cwhP6kohhw7N5ygxNV6VU6ymchzkdgfV4zUW9D6UDXuVaZBTS9HZ0kEI8X4q MbuA== |
| X-Gm-Message-State | AE9vXwM+5ymsJhZMHts9xezV1z8yP7XMLez/4c9Op3Qb/TPy/RWbi3xNY1Q3LWW4boeRUQ== |
| X-Received | by 10.194.16.65 with SMTP id e1mr2794082wjd.143.1472556604490; Tue, 30 Aug 2016 04:30:04 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 50 |
| Organization | linux.* mail to news gateway |
| X-Original-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 |
| X-Original-Date | Tue, 30 Aug 2016 13:30:00 +0200 |
| X-Original-Message-ID | <20160830113000.GO25086@rric.localdomain> |
| X-Original-References | <cover.1472057064.git.jpoimboe@redhat.com> <6c745a83dbd69fc6857ef9b2f8be0f011d775936.1472057064.git.jpoimboe@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1472428 |
Show key headers only | View raw
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
>
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 2/6] oprofile/x86: add regs->ip to oprofile trace Robert Richter <rric@kernel.org> - 2016-08-30 13:40 +0200
csiph-web