[PATCH 1/2] perf header: Fix numa topology printing

From: Arnaldo Carvalho de Melo
Date: Tue Oct 30 2012 - 09:02:35 EST


From: Namhyung Kim <namhyung@xxxxxxxxxx>

Andrew reported that the commit 7e94cfcc9d20 ("perf header: Use pre-
processed session env when printing") regresses the header output. It
was because of a missed string pointer calculation in the loop.

Reported-by: Andrew Jones <drjones@xxxxxxxxxx>
Tested-by: Andrew Jones <drjones@xxxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Andrew Jones <drjones@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1350999890-6920-1-git-send-email-namhyung@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/header.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 7daad23..566b84c 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1378,6 +1378,8 @@ static void print_numa_topology(struct perf_header *ph, int fd __maybe_unused,

str = tmp + 1;
fprintf(fp, "# node%u cpu list : %s\n", c, str);
+
+ str += strlen(str) + 1;
}
return;
error:
--
1.7.9.2.358.g22243

--
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/