All of lore.kernel.org
 help / color / mirror / Atom feed
* [perf tool] record failure with 3.14-rc4
@ 2014-02-24 17:24 Will Deacon
  2014-02-24 17:36 ` Jiri Olsa
  0 siblings, 1 reply; 2+ messages in thread
From: Will Deacon @ 2014-02-24 17:24 UTC (permalink / raw)
  To: adrian.hunter, jolsa, acme, a.p.zijlstra; +Cc: linux-kernel

Hi guys,

If I try to run perf record as a non-root user, I end up with the following
(unhelpful) error:

  $ perf record -e cycles ls
  [...]
  Not enough memory for reading perf file header

This is because the addresses in /proc/kallsyms always read as 0x0 when
viewed by a non-privileged user, causing kallsyms__get_function_start to
return 0x0 in args.start. machine__create_kernel_maps then treats this as
an error an returns -1 to perf_session__create_kernel_maps, causing
perf_session__new to fail and perf to exit.

The perf tool code in 3.13 is perfectly happy creating maps at 0x0, but I
can see this has changed quite substantially in the recent merge window.

Any ideas? We could fix kallsyms__get_function_start to return < 0 on
failure then fix the checks in the callers. Adrian?

Will

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [perf tool] record failure with 3.14-rc4
  2014-02-24 17:24 [perf tool] record failure with 3.14-rc4 Will Deacon
@ 2014-02-24 17:36 ` Jiri Olsa
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Olsa @ 2014-02-24 17:36 UTC (permalink / raw)
  To: Will Deacon; +Cc: adrian.hunter, acme, a.p.zijlstra, linux-kernel

On Mon, Feb 24, 2014 at 05:24:41PM +0000, Will Deacon wrote:
> Hi guys,
> 
> If I try to run perf record as a non-root user, I end up with the following
> (unhelpful) error:
> 
>   $ perf record -e cycles ls
>   [...]
>   Not enough memory for reading perf file header
> 
> This is because the addresses in /proc/kallsyms always read as 0x0 when
> viewed by a non-privileged user, causing kallsyms__get_function_start to
> return 0x0 in args.start. machine__create_kernel_maps then treats this as
> an error an returns -1 to perf_session__create_kernel_maps, causing
> perf_session__new to fail and perf to exit.
> 
> The perf tool code in 3.13 is perfectly happy creating maps at 0x0, but I
> can see this has changed quite substantially in the recent merge window.
> 
> Any ideas? We could fix kallsyms__get_function_start to return < 0 on
> failure then fix the checks in the callers. Adrian?
hi,
not sure it's related, but i sent out rfc some time ago
for similar bad error messages:
  http://marc.info/?l=linux-kernel&m=138572558210216&w=2

maybe it could be updated for your case as well,
I'll try to check deeply later

jirka

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-24 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24 17:24 [perf tool] record failure with 3.14-rc4 Will Deacon
2014-02-24 17:36 ` Jiri Olsa

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.