From: David Ahern <dsahern@gmail.com>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
"ak@linux.intel.com" <ak@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH v2] perf: disable PERF_RECORD_MMAP2 support
Date: Thu, 17 Oct 2013 09:59:28 -0600 [thread overview]
Message-ID: <52600960.1090907@gmail.com> (raw)
In-Reply-To: <CABPqkBR1LhiL-HpbffZAZ=HouFnGRaxvkgREBFUy3HsMXCA=jg@mail.gmail.com>
On 10/17/13 9:57 AM, Stephane Eranian wrote:
> On Thu, Oct 17, 2013 at 5:54 PM, David Ahern <dsahern@gmail.com> wrote:
>> On 10/17/13 8:28 AM, Stephane Eranian wrote:
>>>
>>>
>>> For now, we disable the extended MMAP record support (MMAP2).
>>> We have identified cases where it would not report the correct
>>> mapping information, clone(VM_CLONE) but with separate pids.
>>> We will revisit the support once we find a solution for this case.
>>>
>>> The patch changes the kernel to return EINVAL if attr->mmap2
>>> is set. The patch also modifies the perf tool to use regular
>>> PERF_RECORD_MMAP
>>> for synthetic events and it also prevents the tool from requesting
>>> attr->mmap2
>>> mode because the kernel would reject it.
>>>
>>> The support will be revisited once the kenrel interface is updated.
>>
>>
>> Why not disable mmap2 as well:
>>
>> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
>> index 0ce9febf1ba0..289f34dbe970 100644
>> --- a/tools/perf/util/evsel.c
>> +++ b/tools/perf/util/evsel.c
>> @@ -678,7 +678,7 @@ void perf_evsel__config(struct perf_evsel *evsel,
>> attr->sample_type |= PERF_SAMPLE_WEIGHT;
>>
>> attr->mmap = track;
>> - attr->mmap2 = track && !perf_missing_features.mmap2;
>> + /* attr->mmap2 = track && !perf_missing_features.mmap2; */
>> attr->comm = track;
>>
> It is disabled automatically later on. I checked that. Wanted to minimize
> the changes.
>
Understood that the fallback kicks in. Why fail the perf_event_open
every single time when we know it is not going to succeed?
David
next prev parent reply other threads:[~2013-10-17 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 14:28 [PATCH v2] perf: disable PERF_RECORD_MMAP2 support Stephane Eranian
2013-10-17 15:54 ` David Ahern
2013-10-17 15:57 ` Stephane Eranian
2013-10-17 15:59 ` David Ahern [this message]
2013-10-17 16:09 ` Stephane Eranian
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=52600960.1090907@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=hughd@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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