diff options
author | Dave Martin <dave.martin@linaro.org> | 2010-07-27 16:46:12 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-27 16:46:12 +0200 |
commit | 88ca895dd4e0e64ebd942adb7925fa60ca5b2a98 (patch) | |
tree | f3680bbdcd63e60068fe18ec0c34d8f99e0519fe /tools/perf/util/session.c | |
parent | perf report: Don't abbreviate file paths relative to the cwd (diff) | |
download | linux-88ca895dd4e0e64ebd942adb7925fa60ca5b2a98.tar.xz linux-88ca895dd4e0e64ebd942adb7925fa60ca5b2a98.zip |
perf tools: Remove unneeded code for tracking the cwd in perf sessions
Tidy-up patch to remove some code and struct perf_session data members
which are no longer needed due to the previous patch: "perf tools: Don't
abbreviate file paths relative to the cwd".
LKML-Reference: <new-submission>
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 030791870e33..8cbea122e349 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -96,8 +96,6 @@ struct perf_session *perf_session__new(const char *filename, int mode, bool forc self->hists_tree = RB_ROOT; self->last_match = NULL; self->mmap_window = 32; - self->cwd = NULL; - self->cwdlen = 0; self->machines = RB_ROOT; self->repipe = repipe; INIT_LIST_HEAD(&self->ordered_samples.samples_head); @@ -130,7 +128,6 @@ void perf_session__delete(struct perf_session *self) { perf_header__exit(&self->header); close(self->fd); - free(self->cwd); free(self); } @@ -832,23 +829,6 @@ int perf_session__process_events(struct perf_session *self, if (perf_session__register_idle_thread(self) == NULL) return -ENOMEM; - if (!symbol_conf.full_paths) { - char bf[PATH_MAX]; - - if (getcwd(bf, sizeof(bf)) == NULL) { - err = -errno; -out_getcwd_err: - pr_err("failed to get the current directory\n"); - goto out_err; - } - self->cwd = strdup(bf); - if (self->cwd == NULL) { - err = -ENOMEM; - goto out_getcwd_err; - } - self->cwdlen = strlen(self->cwd); - } - if (!self->fd_pipe) err = __perf_session__process_events(self, self->header.data_offset, @@ -856,7 +836,7 @@ out_getcwd_err: self->size, ops); else err = __perf_session__process_pipe_events(self, ops); -out_err: + return err; } |