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.kim@lge.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Andi Kleen <ak@linux.intel.com>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/21] perf machine: Set kernel data mapping length
Date: Fri,  9 Nov 2012 18:42:50 -0300	[thread overview]
Message-ID: <1352497390-17716-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1352497390-17716-1-git-send-email-acme@infradead.org>

From: Namhyung Kim <namhyung.kim@lge.com>

Currently only text (function) mapping was set, so that the kernel data
addresses couldn't parsed correctly.  Fix it.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1352273234-28912-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/machine.c |   22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 502eec0..4c6754a 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -84,15 +84,19 @@ int machine__process_lost_event(struct machine *machine __maybe_unused,
 static void machine__set_kernel_mmap_len(struct machine *machine,
 					 union perf_event *event)
 {
-	machine->vmlinux_maps[MAP__FUNCTION]->start = event->mmap.start;
-	machine->vmlinux_maps[MAP__FUNCTION]->end   = (event->mmap.start +
-						       event->mmap.len);
-	/*
-	 * Be a bit paranoid here, some perf.data file came with
-	 * a zero sized synthesized MMAP event for the kernel.
-	 */
-	if (machine->vmlinux_maps[MAP__FUNCTION]->end == 0)
-		machine->vmlinux_maps[MAP__FUNCTION]->end = ~0ULL;
+	int i;
+
+	for (i = 0; i < MAP__NR_TYPES; i++) {
+		machine->vmlinux_maps[i]->start = event->mmap.start;
+		machine->vmlinux_maps[i]->end   = (event->mmap.start +
+						   event->mmap.len);
+		/*
+		 * Be a bit paranoid here, some perf.data file came with
+		 * a zero sized synthesized MMAP event for the kernel.
+		 */
+		if (machine->vmlinux_maps[i]->end == 0)
+			machine->vmlinux_maps[i]->end = ~0ULL;
+	}
 }
 
 static int machine__process_kernel_mmap_event(struct machine *machine,
-- 
1.7.9.2.358.g22243


  reply	other threads:[~2012-11-09 21:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09 21:42 [GIT PULL 00/21] perf/core improvements and fixes Arnaldo Carvalho de Melo
2012-11-09 21:42 ` Arnaldo Carvalho de Melo [this message]
2012-11-09 21:42 ` [PATCH 02/21] perf tools: Fix detection of stack area Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 03/21] perf hists: Free branch_info when freeing hist_entry Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 04/21] perf tests: Move attr.py temp dir cleanup into finally section Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 05/21] perf tools: Add LIBDW_DIR Makefile variable to for alternate libdw Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 06/21] perf tools: Add arbitary aliases and support names with - Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 07/21] perf tools: Don't try to lookup objdump for live mode Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 08/21] perf diff: Start moving to support matching more than two hists Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 09/21] perf diff: Move hists__match to the hists lib Arnaldo Carvalho de Melo
2012-11-09 21:42 ` [PATCH 10/21] perf hists: Introduce hists__link Arnaldo Carvalho de Melo
2012-11-12  2:40   ` Namhyung Kim
2012-11-12 16:04     ` Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 11/21] perf diff: Use hists__link when not pairing just with baseline Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 12/21] perf machine: Move more methods to machine.[ch] Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 13/21] perf test: fix a build error on builtin-test Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 14/21] perf annotate: Whitespace fixups Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 15/21] perf annotate: Don't try to follow jump target on PLT symbols Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 16/21] perf annotate: Merge same lines in summary view Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 17/21] tools lib traceevent: Add __maybe_unused to unused parameters Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 18/21] tools lib traceevent: Avoid comparisions between signed/unsigned Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 19/21] tools lib traceevent: No need to check for < 0 on an unsigned enum Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 20/21] tools lib traceevent: Handle INVALID_ARG_TYPE errno in pevent_strerror Arnaldo Carvalho de Melo
2012-11-09 21:43 ` [PATCH 21/21] tools lib traceevent: Use 'const' in variables pointing to const strings Arnaldo Carvalho de Melo
2012-11-12  2:10 ` [GIT PULL 00/21] perf/core improvements and fixes Namhyung Kim
2012-11-12 13:55   ` Jiri Olsa
2012-11-12 16:01     ` Arnaldo Carvalho de Melo
2012-11-13  1:20       ` Namhyung Kim
2012-11-13 18:11 ` Ingo Molnar

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=1352497390-17716-2-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.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).