From: Kenth Eriksson <kenth.eriksson@transmode.com>
To: linux-kernel@vger.kernel.org, andi@firstfloor.org
Cc: Kenth Eriksson <kenth.eriksson@transmode.com>
Subject: [PATCH] Fix mmap error for perf data file. Not all file systems, e.g. JFFS2, support MAP_SHARED.
Date: Fri, 4 Sep 2015 09:00:45 +0200 [thread overview]
Message-ID: <1441350045-25360-1-git-send-email-kenth.eriksson@transmode.com> (raw)
In-Reply-To: <87d1xz49gj.fsf@tassilo.jf.intel.com>
Signed-off-by: Kenth Eriksson <kenth.eriksson@transmode.com>
---
tools/perf/util/session.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 0c74012..c6617fe 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1338,11 +1338,10 @@ static int __perf_session__process_events(struct perf_session *session,
memset(mmaps, 0, sizeof(mmaps));
mmap_prot = PROT_READ;
- mmap_flags = MAP_SHARED;
+ mmap_flags = MAP_PRIVATE;
if (session->header.needs_swap) {
mmap_prot |= PROT_WRITE;
- mmap_flags = MAP_PRIVATE;
}
remap:
buf = mmap(NULL, mmap_size, mmap_prot, mmap_flags, fd,
--
2.3.6
prev parent reply other threads:[~2015-09-04 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 7:49 perf fails to mmap data file (JFFS2) Kenth Eriksson
2015-09-03 18:57 ` Andi Kleen
2015-09-04 7:00 ` Kenth Eriksson [this message]
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=1441350045-25360-1-git-send-email-kenth.eriksson@transmode.com \
--to=kenth.eriksson@transmode.com \
--cc=andi@firstfloor.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
all inboxes | Powered by JetHome®