linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manuel Selva <selva.manuel@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: Per thread sampling
Date: Thu, 20 Feb 2014 11:44:39 +0100	[thread overview]
Message-ID: <5305DC97.4020202@gmail.com> (raw)
In-Reply-To: <20140220080418.GA1122@krava.brq.redhat.com>

Thanks for the answer Jirka. I saw this parameter and was wondering what 
was its purpose (because the name is
perf_event_mlock_kb and not
perf_event_mmap_kb).

Manu


On 02/20/2014 09:04 AM, Jiri Olsa wrote:
> On Wed, Feb 19, 2014 at 04:00:45PM +0100, Manuel Selva wrote:
>> Hi all,
>>
>> I just tried in a 2-threaded application to call twice (one call for
>> each thread) perf_event_open syscall with parameters configured to do
>> sampling on MEM INST RETIRED.LATENCY ABOVE THRESHOLD event. Both call
>> succeed.
>>
>> "mmaping" the file descriptor return by the first call succeed but
>> "mmaping" the second file descriptor results in a "Operation not
>> permitted" error (errno = 1).
>
> seems like you might have crossed the perf mem user limit?
>
> [jolsa@krava ~]$ sysctl kernel.perf_event_mlock_kb
> kernel.perf_event_mlock_kb = 516
>
> you can either split the memory amount between those
> threads or you can increase that limit.. or run your
> app under root ;-)
>
> jirka
>
>> mit
>> A work around could be to sample all threads (with pid = -1) including
>> pid and tid in samples and filter samples at processing time. Before
>> switching to this solution I wanted to ask if this a known limitation
>> of the syscall, an error from my side, or a bug  (the man page doesn't
>> answer to this question) ?
>>
>> Thanks,
>>
>> Manu
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2014-02-20 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 15:00 Per thread sampling Manuel Selva
2014-02-20  8:04 ` Jiri Olsa
2014-02-20 10:44   ` Manuel Selva [this message]
2014-05-21 20:55 ` Dipanjan Sengupta

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=5305DC97.4020202@gmail.com \
    --to=selva.manuel@gmail.com \
    --cc=jolsa@redhat.com \
    --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).