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>
This commit is contained in:
Arnaldo Carvalho de Melo
2011-11-09 13:24:25 -02:00
parent 01c2d99bcf
commit b424eba271
6 changed files with 58 additions and 15 deletions

View File

@ -48,8 +48,8 @@ static int perf_event__exit_del_thread(union perf_event *event,
event->fork.ppid, event->fork.ptid);
if (thread) {
rb_erase(&thread->rb_node, &session->threads);
session->last_match = NULL;
rb_erase(&thread->rb_node, &session->host_machine.threads);
session->host_machine.last_match = NULL;
thread__delete(thread);
}