public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miles Bader <miles@gnu.org>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: tools/perf: "perf record" restricted to root in latest kernel?
Date: Thu, 07 Jan 2010 11:49:34 +0900	[thread overview]
Message-ID: <buovdfeocht.fsf@dhlpc061.dev.necel.com> (raw)
In-Reply-To: <20100106205911.GC18919@ghostprotocols.net> (Arnaldo Carvalho de Melo's message of "Wed, 6 Jan 2010 18:59:11 -0200")

Arnaldo Carvalho de Melo <acme@infradead.org> writes:
>> Next I updated to the latest linus tree (c5974b835a), and recompiled perf.
>> It still seems to work, and has obviously had a lot of features added, but
>> now it only wants to let me run "perf record" if I'm root.
>
> Don't recall noticing such problem, here it works just fine:
>
> [acme@doppio linux-2.6-tip]$ mkdir tmp
> [acme@doppio linux-2.6-tip]$ cd tmp
> [acme@doppio tmp]$ time perf record find ~/git/ > /dev/null
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.053 MB perf.data (~2312 samples) ]

Weird... if I try your recipe, I get:

   $ cd /usr/local/tmp
   $ ls
   gstlfilt.zip  q2.jpg  q3.jpg
   $ time perf record find /usr/local/src/git/ > /dev/null
     Fatal: Permission error - are you root?

   real	0m0.032s
   user	0m0.004s
   sys	0m0.012s

> [acme@doppio linux-2.6-tip]$ uname -r
> 2.6.33-rc3-tip+

Perhaps the newer version of perf works better with newer kernels, or
with some specific option enabled?  [Since it's a fairly new tool, I
suppose it may not work well unless the perf version and the kernel
version are in sync.]

I'm using a standard debian kernel:

   $ uname -r
   2.6.32-trunk-amd64

   $ grep PERF_ /boot/config-2.6.32-trunk-amd64 
   CONFIG_HAVE_PERF_EVENTS=y
   CONFIG_PERF_EVENTS=y
   # CONFIG_PERF_COUNTERS is not set
   # CONFIG_DEBUG_PERF_USE_VMALLOC is not set

I notice that the system call which results in an error for me changed
between the two versions of perf -- from "sys_perf_counter_open" to
"sys_perf_event_open" -- though I don't understand the difference.

Thanks,

-Miles

-- 
Youth, n. The Period of Possibility, when Archimedes finds a fulcrum,
Cassandra has a following and seven cities compete for the honor of endowing a
living Homer.

  reply	other threads:[~2010-01-07  2:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  5:32 tools/perf: "perf record" restricted to root in latest kernel? Miles Bader
2010-01-06 20:59 ` Arnaldo Carvalho de Melo
2010-01-07  2:49   ` Miles Bader [this message]
2010-01-07  4:48     ` Mike Galbraith
2010-01-07  5:05       ` Mike Galbraith
2010-01-07  8:29       ` Peter Zijlstra

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=buovdfeocht.fsf@dhlpc061.dev.necel.com \
    --to=miles@gnu.org \
    --cc=acme@infradead.org \
    --cc=linux-kernel@vger.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