diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 04:56:39 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 07:39:12 -0500 |
commit | 743eb868657bdb1b26c7b24077ca21c67c82c777 (patch) | |
tree | 4803b557725213043ccd5d3f83d2eec796a49f69 /tools/perf/util/thread.h | |
parent | d20deb64e0490ee9442b5181bc08a62d2cadcb90 (diff) |
perf tools: Resolve machine earlier and pass it to perf_event_ops
Reducing the exposure of perf_session further, so that we can use the
classes in cases where no perf.data file is created.
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-stua66dcscsezzrcdugvbmvd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread.h')
-rw-r--r-- | tools/perf/util/thread.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index e5f2401c1b5e..70c2c13ff679 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h | |||
@@ -18,16 +18,14 @@ struct thread { | |||
18 | int comm_len; | 18 | int comm_len; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | struct perf_session; | 21 | struct machine; |
22 | 22 | ||
23 | void thread__delete(struct thread *self); | 23 | void thread__delete(struct thread *self); |
24 | 24 | ||
25 | int thread__set_comm(struct thread *self, const char *comm); | 25 | int thread__set_comm(struct thread *self, const char *comm); |
26 | int thread__comm_len(struct thread *self); | 26 | int thread__comm_len(struct thread *self); |
27 | struct thread *perf_session__findnew(struct perf_session *self, pid_t pid); | ||
28 | void thread__insert_map(struct thread *self, struct map *map); | 27 | void thread__insert_map(struct thread *self, struct map *map); |
29 | int thread__fork(struct thread *self, struct thread *parent); | 28 | int thread__fork(struct thread *self, struct thread *parent); |
30 | size_t perf_session__fprintf(struct perf_session *self, FILE *fp); | ||
31 | 29 | ||
32 | static inline struct map *thread__find_map(struct thread *self, | 30 | static inline struct map *thread__find_map(struct thread *self, |
33 | enum map_type type, u64 addr) | 31 | enum map_type type, u64 addr) |
@@ -35,14 +33,12 @@ static inline struct map *thread__find_map(struct thread *self, | |||
35 | return self ? map_groups__find(&self->mg, type, addr) : NULL; | 33 | return self ? map_groups__find(&self->mg, type, addr) : NULL; |
36 | } | 34 | } |
37 | 35 | ||
38 | void thread__find_addr_map(struct thread *self, | 36 | void thread__find_addr_map(struct thread *thread, struct machine *machine, |
39 | struct perf_session *session, u8 cpumode, | 37 | u8 cpumode, enum map_type type, u64 addr, |
40 | enum map_type type, pid_t pid, u64 addr, | ||
41 | struct addr_location *al); | 38 | struct addr_location *al); |
42 | 39 | ||
43 | void thread__find_addr_location(struct thread *self, | 40 | void thread__find_addr_location(struct thread *thread, struct machine *machine, |
44 | struct perf_session *session, u8 cpumode, | 41 | u8 cpumode, enum map_type type, u64 addr, |
45 | enum map_type type, pid_t pid, u64 addr, | ||
46 | struct addr_location *al, | 42 | struct addr_location *al, |
47 | symbol_filter_t filter); | 43 | symbol_filter_t filter); |
48 | #endif /* __PERF_THREAD_H */ | 44 | #endif /* __PERF_THREAD_H */ |