lkml.org 
[lkml]   [2013]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [GIT PULL] perf fixes
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
> > > in this merge window. (Patches were proposed to fix it but it was
> > > all a bit late and we felt it's safer to just delay the ABI one
> > > more kernel release and do it right.)
> >
> > commit 3090ffb5a2515990182f3f55b0688a7817325488
> > Author: Stephane Eranian <eranian@google.com>
> > Date: Thu Oct 17 19:32:15 2013 +0200
> >
> > perf: Disable PERF_RECORD_MMAP2 support
> >
> > The commit above breaks "perf top" on my system, because it causes only
> > [kernel] symbols to show up in the list. When I revert the commit I get
> > the usual mixture of userspace and kernel symbols in the list.

The following patch fixes the issue:

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 63df031fc9c7..811f3950654d 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -199,7 +199,6 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
char execname[PATH_MAX];
char anonstr[] = "//anon";
size_t size;
- ssize_t n;

if (fgets(bf, sizeof(bf), fp) == NULL)
break;
@@ -208,14 +207,11 @@ static 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",
+ 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;
-
if (prot[2] != 'x')
continue;

--
Markus

\
 
 \ /
  Last update: 2013-10-28 11:01    [W:0.085 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site