perf header: Fix numa topology printing
authorNamhyung Kim <namhyung@kernel.org>
Tue, 23 Oct 2012 13:44:49 +0000 (22:44 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 30 Oct 2012 12:32:55 +0000 (10:32 -0200)
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@redhat.com>
Tested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andrew Jones <drjones@redhat.com>
Link: http://lkml.kernel.org/r/1350999890-6920-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c

index 7daad237dea530f504f764b8189b06957b1905e6..566b84c695c880b43349675780ff88225b2828cc 100644 (file)
@@ -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: