From: Robert Richter <rric@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Borislav Petkov <bp@alien8.de>, Jiri Olsa <jolsa@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] perf tools: Retry mapping buffers readonly on EACCES
Date: Fri, 14 Jun 2013 09:29:18 +0200 [thread overview]
Message-ID: <20130614072918.GT12218@rric.localhost> (raw)
In-Reply-To: <87ip1h30lz.fsf@sejong.aot.lge.com>
On 14.06.13 11:08:40, Namhyung Kim wrote:
> > - if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) {
> > +try_again2:
> > + if (perf_evlist__mmap(evlist, opts->mmap_pages, opts->mmap_ro) < 0) {
> > + if (!opts->mmap_ro && errno == EACCES) {
> > + opts->mmap_ro = true;
> > + goto try_again2;
> > + }
> > ui__error("Failed to mmap with %d (%s)\n",
> > errno, strerror(errno));
> > goto out_err;
>
>
> You will need this also:
>
>
> @@ -161,7 +161,8 @@ static int perf_record__mmap_read(struct perf_record *rec,
> }
>
> md->prev = old;
> - perf_mmap__write_tail(md, old);
> + if (!rec->opts.mmap_ro)
> + perf_mmap__write_tail(md, old);
>
> out:
> return rc;
Yes, indeed. Will add your change
-Robert
next prev parent reply other threads:[~2013-06-14 7:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 9:16 [PATCH 0/4] perf tools: Persistent events, changes for perf tool integration Robert Richter
2013-05-31 9:16 ` [PATCH 1/4] perf tools: Rename flex conditions to avoid name conflicts Robert Richter
2013-05-31 9:16 ` [PATCH 2/4] perf tools: Modify event parser to update event attribute by index Robert Richter
2013-05-31 9:16 ` [PATCH 3/4] perf tools: Add attr<num> syntax to event parser Robert Richter
2013-06-03 13:54 ` Jiri Olsa
2013-06-07 14:17 ` Robert Richter
2013-05-31 9:16 ` [PATCH 4/4] perf tools: Retry mapping buffers readonly on EACCES Robert Richter
2013-06-14 2:08 ` Namhyung Kim
2013-06-14 7:29 ` Robert Richter [this message]
2013-05-31 12:07 ` [PATCH 0/4] perf tools: Persistent events, changes for perf tool integration Ingo Molnar
2013-05-31 12:24 ` Borislav Petkov
2013-05-31 12:48 ` Ingo Molnar
2013-05-31 13:44 ` Robert Richter
2013-05-31 15:31 ` Borislav Petkov
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=20130614072918.GT12218@rric.localhost \
--to=rric@kernel.org \
--cc=acme@ghostprotocols.net \
--cc=bp@alien8.de \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--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