Skip to contentSkip to conversation

perf tools: Fix up /proc/PID/maps parsing

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Oct 28, 2013 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  2fd869f08aec5a8e4cbf01bc3fa345c4e53342d7
Gitweb:     http://git.kernel.org/tip/2fd869f08aec5a8e4cbf01bc3fa345c4e53342d7
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 28 Oct 2013 09:38:12 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 28 Oct 2013 09:38:12 -0300

perf tools: Fix up /proc/PID/maps parsing

When introducing support for MMAP2 we considered more parts of each map representation in /proc/PID/maps, and when disabling it we forgot to reduce the number of expected parsed/assigned entries in the sscanf call, fix it to expect the right number of desired fields, 5.

---
 tools/perf/util/event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/event.c +1 -1
index 63df031..49096ea 100644
@@ -213,7 +213,7 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 		       &event->mmap.pgoff,
 		       execname);
 
-		if (n != 8)
+		if (n != 5)
 			continue;
 
 		if (prot[2] != 'x')