]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Synthesize anon MMAP records again
authorDon Zickus <dzickus@redhat.com>
Wed, 13 Nov 2013 18:32:06 +0000 (15:32 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Nov 2013 19:00:01 +0000 (16:00 -0300)
commitf57d2d443f9f8e58afa8c01c29005db60a0f4b4b
treea585ae8a20208b8f1afe85d584cac2bfd42323a9
parentfa6ffa7cc57d6201e5cac185653502ea2b32b169
perf tools: Synthesize anon MMAP records again

When introducing the PERF_RECORD_MMAP2 in:

936392679bb5 perf tools: Add attr->mmap2 support

A check for the number of entries parsed by sscanf was introduced that
assumed all of the 8 fields needed to be correctly parsed so that
particular /proc/pid/maps line would be considered synthesizable.

That broke anon records synthesizing, as it doesn't have the 'execname'
field.

Fix it by keeping the sscanf return check, changing it to not require
that the 'execname' variable be parsed, so that the preexisting logic
can kick in and set it to '//anon'.

This should get things like JIT profiling working again.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Bill Gray <bgray@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Richard Fowles <rfowles@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/n/tip-bo4akalno7579shpz29u867j@git.kernel.org
[ commit log message is mine, dzickus reported the problem with a patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c