From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
"Marcin Ślusarz" <marcin.slusarz@gmail.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>
Subject: [PATCH 13/19] perf tools: handle spaces in file names obtained from /proc/pid/maps
Date: Fri, 5 Feb 2016 13:26:04 -0300 [thread overview]
Message-ID: <1454689570-12912-14-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1454689570-12912-1-git-send-email-acme@kernel.org>
From: Marcin Ślusarz <marcin.slusarz@gmail.com>
Steam frequently puts game binaries in folders with spaces.
Note: "(deleted)" markers are now treated as part of the file name.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Fixes: 6064803313ba ("perf tools: Use sscanf for parsing /proc/pid/maps")
Link: http://lkml.kernel.org/r/20160119190303.GA17579@marcin-Inspiron-7720
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 85155e91b61b..7bad5c3fa7b7 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -282,7 +282,7 @@ int perf_event__synthesize_mmap_events(struct perf_tool *tool,
strcpy(execname, "");
/* 00400000-0040c000 r-xp 00000000 fd:01 41038 /bin/cat */
- n = sscanf(bf, "%"PRIx64"-%"PRIx64" %s %"PRIx64" %x:%x %u %s\n",
+ n = sscanf(bf, "%"PRIx64"-%"PRIx64" %s %"PRIx64" %x:%x %u %[^\n]\n",
&event->mmap2.start, &event->mmap2.len, prot,
&event->mmap2.pgoff, &event->mmap2.maj,
&event->mmap2.min,
--
2.5.0
next prev parent reply other threads:[~2016-02-05 16:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 16:25 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 01/19] perf build tests: Elide "-f Makefile" from make invokation Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 02/19] perf build tests: Move the feature related vars to the front of the make cmdline Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 03/19] perf config: Document 'ui.show-headers' variable in man page Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 04/19] perf config: Document variables for 'call-graph' section " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 05/19] perf config: Document variables for 'report' " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 06/19] perf config: Document 'top.children' variable " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 07/19] perf config: Document 'man.viewer' " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 08/19] perf config: Document 'pager.<subcommand>' variables " Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 09/19] perf config: Document 'kmem.default' variable " Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 10/19] perf config: Document 'record.build-id' " Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 11/19] perf tools: Fix parallel build including 'clean' target Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 12/19] perf build tests: Do parallell builds with 'build-test' Arnaldo Carvalho de Melo
2016-02-05 16:26 ` Arnaldo Carvalho de Melo [this message]
2016-02-05 16:26 ` [PATCH 14/19] perf symbols: add Java demangling support Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 15/19] perf build: Add libcrypto feature detection Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 16/19] perf inject: Make sure mmap records are ordered when injecting build_ids Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 17/19] perf inject: Add jitdump mmap injection support Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 18/19] perf tools: add JVMTI agent library Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 19/19] perf jit: add source line info support Arnaldo Carvalho de Melo
2016-02-09 9:40 ` [GIT PULL 00/19] perf/core improvements and fixes Ingo Molnar
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=1454689570-12912-14-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=mingo@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).