summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-09 19:57:08 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-09 21:14:52 -0300
commit1f626bc36847ac8dd192f055aed0f9678a781313 (patch)
treed96b43c56217fb1ec7adaf4a9e12e11a61d0ce44 /tools/perf/util/map.c
parent4cc4945844fe2cf493f1783b6ce938ba1617d5c2 (diff)
downloadlinux-1f626bc36847ac8dd192f055aed0f9678a781313.tar.gz
linux-1f626bc36847ac8dd192f055aed0f9678a781313.tar.bz2
linux-1f626bc36847ac8dd192f055aed0f9678a781313.zip
perf session: Embed the host machine data on perf_session
We have just one host on a given session, and that is the most common setup right now, so embed a ->host_machine struct machine instance directly in the perf_session class, check if we're looking for it before going to the rb_tree. This also fixes a problem found when we try to process old perf.data files where we didn't have MMAP events for the kernel and modules and thus don't create the kernel maps, do it in event__preprocess_sample if it wasn't already. Reported-by: Ingo Molnar <mingo@elte.hu> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Tom Zanussi <tzanussi@gmail.com> Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 44a4df68b3cf..e672f2fef65b 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -579,30 +579,6 @@ struct machine *machines__find(struct rb_root *self, pid_t pid)
return default_machine;
}
-/*
- * FIXME: Why repeatedly search for this?
- */
-struct machine *machines__find_host(struct rb_root *self)
-{
- struct rb_node **p = &self->rb_node;
- struct rb_node *parent = NULL;
- struct machine *machine;
- pid_t pid = HOST_KERNEL_ID;
-
- while (*p != NULL) {
- parent = *p;
- machine = rb_entry(parent, struct machine, rb_node);
- if (pid < machine->pid)
- p = &(*p)->rb_left;
- else if (pid > machine->pid)
- p = &(*p)->rb_right;
- else
- return machine;
- }
-
- return NULL;
-}
-
struct machine *machines__findnew(struct rb_root *self, pid_t pid)
{
char path[PATH_MAX];