linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>,
	Andrew Jones <drjones@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 1/2] perf header: Fix numa topology printing
Date: Tue, 30 Oct 2012 11:02:38 -0200	[thread overview]
Message-ID: <1351602159-10340-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1351602159-10340-1-git-send-email-acme@infradead.org>

From: Namhyung Kim <namhyung@kernel.org>

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


  reply	other threads:[~2012-10-30 13:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 13:02 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
2012-10-30 13:02 ` Arnaldo Carvalho de Melo [this message]
2012-10-30 13:02 ` [PATCH 2/2] perf tools: Fix strbuf_addf() when the buffer needs to grow Arnaldo Carvalho de Melo
2012-11-13 17:55 ` [GIT PULL 0/2] perf/urgent fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2012-10-23  7:27 perf: header: Regression Andrew Jones
2012-10-23 13:44 ` [PATCH 1/2] perf header: Fix numa topology printing Namhyung Kim
2012-10-23 14:12   ` Andrew Jones
2012-10-24  7:00     ` Namhyung Kim
2012-10-24  7:49       ` Andrew Jones
2012-10-29 15:17         ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351602159-10340-2-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=drjones@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).