All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Will Deacon <will.deacon@arm.com>
Cc: Felipe Balbi <balbi@ti.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Tony Lindgren <tony@atomide.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel Mailing List 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: perf not capturing stack traces
Date: Mon, 26 Jan 2015 13:51:23 +0000	[thread overview]
Message-ID: <20150126135123.GC11502@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20150126102711.GC15598@arm.com>

On Mon, Jan 26, 2015 at 10:27:11AM +0000, Will Deacon wrote:
> On Sun, Jan 25, 2015 at 03:56:52PM +0000, Russell King - ARM Linux wrote:
> > On Sat, Jan 24, 2015 at 04:23:42PM -0600, Felipe Balbi wrote:
> > > yeah, I'll try a few older kernels, also see if I can reproduce on other
> > > boards.
> > 
> > Perf works for me with CONFIG_FRAME_POINTER=y, but that's only for kernel
> > space, and for userspace where the programs have been built for ARM mode
> > with frame pointers.
> > 
> > The kernel may work without CONFIG_FRAME_POINTER set, but I've never
> > tested that, and I'd suggest that (given my experience looking at oops
> > dumps) it's not all that reliable.
> > 
> > Lastly, userspace without frame pointers is pretty much hopeless.
> 
> FWIW, perf can now use libunwind for unwinding the userspace side of
> things, so it's not quite as bad as it used to be. For the kernel side,
> if the unwinder isn't working properly it would be nice to know *why*,
> but I agree that it tends to be far flakier than the frame-pointer method.

I don't see how userspace could be unwound without capturing the entire
userspace stack on every perf event - and that could be a considerable
size.  We have no way to know within the kernel which words on the
userspace stack are part of the callchain and which aren't - the only
way we'd know is by loading the userspace's unwind tables, having the
kernel parsing them and generate a list of functions.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: perf not capturing stack traces
Date: Mon, 26 Jan 2015 13:51:23 +0000	[thread overview]
Message-ID: <20150126135123.GC11502@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20150126102711.GC15598@arm.com>

On Mon, Jan 26, 2015 at 10:27:11AM +0000, Will Deacon wrote:
> On Sun, Jan 25, 2015 at 03:56:52PM +0000, Russell King - ARM Linux wrote:
> > On Sat, Jan 24, 2015 at 04:23:42PM -0600, Felipe Balbi wrote:
> > > yeah, I'll try a few older kernels, also see if I can reproduce on other
> > > boards.
> > 
> > Perf works for me with CONFIG_FRAME_POINTER=y, but that's only for kernel
> > space, and for userspace where the programs have been built for ARM mode
> > with frame pointers.
> > 
> > The kernel may work without CONFIG_FRAME_POINTER set, but I've never
> > tested that, and I'd suggest that (given my experience looking at oops
> > dumps) it's not all that reliable.
> > 
> > Lastly, userspace without frame pointers is pretty much hopeless.
> 
> FWIW, perf can now use libunwind for unwinding the userspace side of
> things, so it's not quite as bad as it used to be. For the kernel side,
> if the unwinder isn't working properly it would be nice to know *why*,
> but I agree that it tends to be far flakier than the frame-pointer method.

I don't see how userspace could be unwound without capturing the entire
userspace stack on every perf event - and that could be a considerable
size.  We have no way to know within the kernel which words on the
userspace stack are part of the callchain and which aren't - the only
way we'd know is by loading the userspace's unwind tables, having the
kernel parsing them and generate a list of functions.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2015-01-26 13:51 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 19:51 perf not capturing stack traces Felipe Balbi
2015-01-23 19:51 ` Felipe Balbi
2015-01-23 19:51 ` Felipe Balbi
2015-01-23 19:53 ` Felipe Balbi
2015-01-23 19:53   ` Felipe Balbi
2015-01-23 19:53   ` Felipe Balbi
2015-01-23 20:59 ` Arnaldo Carvalho de Melo
2015-01-23 20:59   ` Arnaldo Carvalho de Melo
2015-01-23 20:59   ` Arnaldo Carvalho de Melo
2015-01-23 22:37   ` Felipe Balbi
2015-01-23 22:37     ` Felipe Balbi
2015-01-23 22:37     ` Felipe Balbi
2015-01-24 15:12     ` Arnaldo Carvalho de Melo
2015-01-24 15:12       ` Arnaldo Carvalho de Melo
2015-01-24 15:12       ` Arnaldo Carvalho de Melo
2015-01-24 22:23       ` Felipe Balbi
2015-01-24 22:23         ` Felipe Balbi
2015-01-24 22:23         ` Felipe Balbi
2015-01-25 15:56         ` Russell King - ARM Linux
2015-01-25 15:56           ` Russell King - ARM Linux
2015-01-25 15:56           ` Russell King - ARM Linux
2015-01-26 10:27           ` Will Deacon
2015-01-26 10:27             ` Will Deacon
2015-01-26 10:27             ` Will Deacon
2015-01-26 12:12             ` Arnaldo Carvalho de Melo
2015-01-26 12:12               ` Arnaldo Carvalho de Melo
2015-01-26 12:12               ` Arnaldo Carvalho de Melo
2015-01-26 12:16               ` Will Deacon
2015-01-26 12:16                 ` Will Deacon
2015-01-26 12:16                 ` Will Deacon
2015-01-26 12:29                 ` Arnaldo Carvalho de Melo
2015-01-26 12:29                   ` Arnaldo Carvalho de Melo
2015-01-26 12:29                   ` Arnaldo Carvalho de Melo
2015-01-26 13:54               ` Russell King - ARM Linux
2015-01-26 13:54                 ` Russell King - ARM Linux
2015-01-26 13:54                 ` Russell King - ARM Linux
2015-01-26 14:33                 ` Arnaldo Carvalho de Melo
2015-01-26 14:33                   ` Arnaldo Carvalho de Melo
2015-01-26 14:33                   ` Arnaldo Carvalho de Melo
2015-01-26 13:51             ` Russell King - ARM Linux [this message]
2015-01-26 13:51               ` Russell King - ARM Linux
2015-01-26 13:51               ` Russell King - ARM Linux
2015-01-26 14:37               ` Arnaldo Carvalho de Melo
2015-01-26 14:37                 ` Arnaldo Carvalho de Melo
2015-01-26 14:37                 ` Arnaldo Carvalho de Melo

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=20150126135123.GC11502@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=tony@atomide.com \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.