diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-19 12:41:23 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-19 12:45:08 -0400 |
commit | f869097e884d8cb65b2bb7831ca57b7dffb66fdd (patch) | |
tree | 4a12562d3121571b19d877b5ed2a1749caf1354e /tools/perf/util/symbol.c | |
parent | f6e1467d8303a397ce40bcfb5f72f97d3ebc768f (diff) |
perf session: Make read_build_id routines look at the host_machine too
The changes made to support host and guest machines in a session, that
started when the 'perf kvm' tool was introduced ended up introducing a
bug where the host_machine was not having its DSOs traversed for
build-id processing.
Fix it by moving some methods to the right classes and considering the
host_machine when processing build-ids.
Reported-by: Tom Zanussi <tzanussi@gmail.com>
Reported-by: Stephane Eranian <eranian@google.com>
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: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 87d9b1b8b6bb..96bff0e54863 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1937,6 +1937,12 @@ static size_t __dsos__fprintf_buildid(struct list_head *head, FILE *fp, | |||
1937 | return ret; | 1937 | return ret; |
1938 | } | 1938 | } |
1939 | 1939 | ||
1940 | size_t machine__fprintf_dsos_buildid(struct machine *self, FILE *fp, bool with_hits) | ||
1941 | { | ||
1942 | return __dsos__fprintf_buildid(&self->kernel_dsos, fp, with_hits) + | ||
1943 | __dsos__fprintf_buildid(&self->user_dsos, fp, with_hits); | ||
1944 | } | ||
1945 | |||
1940 | size_t machines__fprintf_dsos_buildid(struct rb_root *self, FILE *fp, bool with_hits) | 1946 | size_t machines__fprintf_dsos_buildid(struct rb_root *self, FILE *fp, bool with_hits) |
1941 | { | 1947 | { |
1942 | struct rb_node *nd; | 1948 | struct rb_node *nd; |
@@ -1944,8 +1950,7 @@ size_t machines__fprintf_dsos_buildid(struct rb_root *self, FILE *fp, bool with_ | |||
1944 | 1950 | ||
1945 | for (nd = rb_first(self); nd; nd = rb_next(nd)) { | 1951 | for (nd = rb_first(self); nd; nd = rb_next(nd)) { |
1946 | struct machine *pos = rb_entry(nd, struct machine, rb_node); | 1952 | struct machine *pos = rb_entry(nd, struct machine, rb_node); |
1947 | ret += __dsos__fprintf_buildid(&pos->kernel_dsos, fp, with_hits); | 1953 | ret += machine__fprintf_dsos_buildid(pos, fp, with_hits); |
1948 | ret += __dsos__fprintf_buildid(&pos->user_dsos, fp, with_hits); | ||
1949 | } | 1954 | } |
1950 | return ret; | 1955 | return ret; |
1951 | } | 1956 | } |