aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-11-09 10:24:25 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-11-28 07:35:31 -0500
commitb424eba27160dd19577896d4520b8eebabed919f (patch)
treef70a5cceecb05ad86b043f7b7cde6b5401af536f /tools/perf/util/map.h
parent01c2d99bcf6fc7f6ce3fe3d0fb38b124e1f127fc (diff)
perf session: Move threads to struct machine
The 'machine' abstraction was introduced with 'perf kvm' where we could have samples for the host and multiple guests, but at the time we ended up keeping the list of all machines threads all in session->host_machine. Move the threads rb_tree to struct machine to separate the namespaces. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-mdg7sm6j3va09vtgj49gbsrp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r--tools/perf/util/map.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 890d85545d0f..bde6835ee257 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -62,6 +62,9 @@ struct machine {
62 struct rb_node rb_node; 62 struct rb_node rb_node;
63 pid_t pid; 63 pid_t pid;
64 char *root_dir; 64 char *root_dir;
65 struct rb_root threads;
66 struct list_head dead_threads;
67 struct thread *last_match;
65 struct list_head user_dsos; 68 struct list_head user_dsos;
66 struct list_head kernel_dsos; 69 struct list_head kernel_dsos;
67 struct map_groups kmaps; 70 struct map_groups kmaps;
@@ -190,6 +193,12 @@ struct symbol *map_groups__find_symbol_by_name(struct map_groups *mg,
190 struct map **mapp, 193 struct map **mapp,
191 symbol_filter_t filter); 194 symbol_filter_t filter);
192 195
196
197struct thread *machine__findnew_thread(struct machine *machine, pid_t pid);
198void machine__remove_thread(struct machine *machine, struct thread *th);
199
200size_t machine__fprintf(struct machine *machine, FILE *fp);
201
193static inline 202static inline
194struct symbol *machine__find_kernel_symbol(struct machine *self, 203struct symbol *machine__find_kernel_symbol(struct machine *self,
195 enum map_type type, u64 addr, 204 enum map_type type, u64 addr,