aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-12-13 16:50:27 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-14 10:57:16 -0500
commitec913369733923dbfd6bdff5953a918107059701 (patch)
tree4c4397f5de47bb1352bfed874919bb438b6e4816 /tools/perf/util/session.c
parent13df45ca1c9a430d5f53862854070fcc324e015c (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/session.c')
-rw-r--r--tools/perf/util/session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 39766868d43a..534a8770ee7f 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -61,6 +61,9 @@ struct perf_session *perf_session__new(const char *filename, int mode,
61 goto out_delete; 61 goto out_delete;
62 62
63 memcpy(self->filename, filename, len); 63 memcpy(self->filename, filename, len);
64 self->mmap_window = 32;
65 self->cwd = NULL;
66 self->cwdlen = 0;
64 67
65 if (mode == O_RDONLY && perf_session__open(self, force) < 0) { 68 if (mode == O_RDONLY && perf_session__open(self, force) < 0) {
66 perf_session__delete(self); 69 perf_session__delete(self);
@@ -77,5 +80,6 @@ void perf_session__delete(struct perf_session *self)
77{ 80{
78 perf_header__exit(&self->header); 81 perf_header__exit(&self->header);
79 close(self->fd); 82 close(self->fd);
83 free(self->cwd);
80 free(self); 84 free(self);
81} 85}