Re: [GIT PULL] perf fixes

From: Arnaldo Carvalho de Melo
Date: Mon Oct 28 2013 - 08:34:24 EST


Em Mon, Oct 28, 2013 at 10:34:30AM +0100, Markus Trippelsdorf escreveu:
> On 2013.10.28 at 10:02 +0100, Markus Trippelsdorf wrote:
> > On 2013.10.28 at 09:28 +0100, Markus Trippelsdorf wrote:
> > > On 2013.10.26 at 14:24 +0200, Ingo Molnar wrote:
> > > > - Reversal of the new 'MMAP2' extended mmap record ABI, introduced

> > > commit 3090ffb5a2515990182f3f55b0688a7817325488
> > > Author: Stephane Eranian <eranian@xxxxxxxxxx>

> > > perf: Disable PERF_RECORD_MMAP2 support

> The following patch fixes the issue:

> diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
> /* 00400000-0040c000 r-xp 00000000 fd:01 41038 /bin/cat */
> - n = sscanf(bf, "%"PRIx64"-%"PRIx64" %s %"PRIx64" %*x:%*x %*u %s\n",
> + sscanf(bf, "%"PRIx64"-%"PRIx64" %s %"PRIx64" %*x:%*x %*u %s\n",
> &event->mmap.start, &event->mmap.len, prot,
> &event->mmap.pgoff,
> execname);

> - if (n != 8)
> - continue;
> -

Yeah, this one was added in the patch that introduced MMAP2 support in
the tooling side, it was unrelated to what the patch needed, i.e. should
have come in a separate patch, checking sscanf number of itens
successfully matched/assigned.

And then, when reverting it, Stephane forgot to match the number number
of expected entries to be matched/assigned from 8 to 5, can you try with
the following patch instead?

- Arnaldo

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 63df031fc9c7..49096ea58a15 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -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')
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/