diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-12-13 16:50:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-14 10:57:16 -0500 |
commit | ec913369733923dbfd6bdff5953a918107059701 (patch) | |
tree | 4c4397f5de47bb1352bfed874919bb438b6e4816 /tools/perf/util/event.c | |
parent | 13df45ca1c9a430d5f53862854070fcc324e015c (diff) |
perf session: Reduce the number of parms to perf_session__process_events
By having the cwd/cwdlen in the perf_session struct and
full_paths in perf_event_ops.
Now its just a matter of passing the ops.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260741029-4430-4-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index e2c489533c6d..40d8d842a21f 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/types.h> | 1 | #include <linux/types.h> |
2 | #include "event.h" | 2 | #include "event.h" |
3 | #include "debug.h" | 3 | #include "debug.h" |
4 | #include "session.h" | ||
4 | #include "string.h" | 5 | #include "string.h" |
5 | #include "thread.h" | 6 | #include "thread.h" |
6 | 7 | ||
@@ -186,9 +187,6 @@ void event__synthesize_threads(int (*process)(event_t *event, | |||
186 | closedir(proc); | 187 | closedir(proc); |
187 | } | 188 | } |
188 | 189 | ||
189 | char *event__cwd; | ||
190 | int event__cwdlen; | ||
191 | |||
192 | struct events_stats event__stats; | 190 | struct events_stats event__stats; |
193 | 191 | ||
194 | int event__process_comm(event_t *self, struct perf_session *session __used) | 192 | int event__process_comm(event_t *self, struct perf_session *session __used) |
@@ -212,11 +210,11 @@ int event__process_lost(event_t *self, struct perf_session *session __used) | |||
212 | return 0; | 210 | return 0; |
213 | } | 211 | } |
214 | 212 | ||
215 | int event__process_mmap(event_t *self, struct perf_session *session __used) | 213 | int event__process_mmap(event_t *self, struct perf_session *session) |
216 | { | 214 | { |
217 | struct thread *thread = threads__findnew(self->mmap.pid); | 215 | struct thread *thread = threads__findnew(self->mmap.pid); |
218 | struct map *map = map__new(&self->mmap, MAP__FUNCTION, | 216 | struct map *map = map__new(&self->mmap, MAP__FUNCTION, |
219 | event__cwd, event__cwdlen); | 217 | session->cwd, session->cwdlen); |
220 | 218 | ||
221 | dump_printf(" %d/%d: [%p(%p) @ %p]: %s\n", | 219 | dump_printf(" %d/%d: [%p(%p) @ %p]: %s\n", |
222 | self->mmap.pid, self->mmap.tid, | 220 | self->mmap.pid, self->mmap.tid, |