linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lin Ming <minggr@gmail.com>
To: linux-perf-users@vger.kernel.org, 陳韋任 <chenwj@iis.sinica.edu.tw>
Subject: Re: What perf_event_paranoid can do?
Date: Mon, 21 Mar 2011 21:46:35 +0800	[thread overview]
Message-ID: <AANLkTik3FT02nBPoKRh66hGA+bT7dPe2Vc0DK9HNmu7C@mail.gmail.com> (raw)
In-Reply-To: <20110321095643.GA57074@cs.nctu.edu.tw>

2011/3/21 陳韋任 <chenwj@iis.sinica.edu.tw>:
> Hi, Lin
>
>> It's used to control if some action is allowed or not for normal user.
>> See comments at kernel/perf_event.c:
>>
>> /*
>>  * perf event paranoia level:
>>  *  -1 - not paranoid at all
>>  *   0 - disallow raw tracepoint access for unpriv
>>  *   1 - disallow cpu events for unpriv
>>  *   2 - disallow kernel profiling for unpriv
>>  */
>
>  I assume -1 give normal user the most high level privilege,
> but it doesn't work. I have tried -1 through 2, but none of
> them works. Any suggestion? Or maybe the event "branches" does
> not support PBES modifier (pp)?

In x86_setup_perfctr:

        /*
         * Branch tracing:
         */
        if ((attr->config == PERF_COUNT_HW_BRANCH_INSTRUCTIONS) &&
            (hwc->sample_period == 1)) {
                /* BTS is not supported by this architecture. */
                if (!x86_pmu.bts_active)
                        return -EOPNOTSUPP;

                /* BTS is currently only allowed for user-mode. */
                if (!attr->exclude_kernel)
                        return -EOPNOTSUPP;
        }

Does your CPU support PEBS? Please attach below output.

dmesg |grep "Performance Events"

Lin Ming

>
>  Thanks!
>
> Regards,
> chenwj
>
> --
> Wei-Ren Chen (陳韋任)
> Parallel Processing Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
>

  reply	other threads:[~2011-03-21 13:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21  6:14 What perf_event_paranoid can do? 陳韋任
2011-03-21  8:35 ` Lin Ming
2011-03-21  9:19   ` 陳韋任
2011-03-21  9:56   ` 陳韋任
2011-03-21 13:46     ` Lin Ming [this message]
2011-03-21 13:51       ` Lin Ming
2011-03-22  1:10         ` 陳韋任
2011-03-22  1:55           ` 陳韋任
2011-03-22  3:09             ` Lin Ming

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=AANLkTik3FT02nBPoKRh66hGA+bT7dPe2Vc0DK9HNmu7C@mail.gmail.com \
    --to=minggr@gmail.com \
    --cc=chenwj@iis.sinica.edu.tw \
    --cc=linux-perf-users@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;
as well as URLs for NNTP newsgroup(s).