diff options
author | Dave Martin <dave.martin@linaro.org> | 2010-07-27 16:40:02 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-27 11:39:04 -0300 |
commit | 361d13462585474267a0c41e956f1a1c19a93f17 (patch) | |
tree | 75321c401c73da41ff4023547dbf17cede7ab294 /tools/perf/util/map.c | |
parent | 0f0cbf7aa3d3460a3eb201a772326739a0c0210a (diff) | |
download | op-kernel-dev-361d13462585474267a0c41e956f1a1c19a93f17.zip op-kernel-dev-361d13462585474267a0c41e956f1a1c19a93f17.tar.gz |
perf report: Don't abbreviate file paths relative to the cwd
This avoids around some problems where the full path is executables and DSOs it
needed for finding debug symbols on platforms with separated debug symbol files
such as Ubuntu. This is simpler than tracking an extra name for each image.
The only impact should be that paths in verbose output from the perf tools
become absolute, instead of relative to .
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/map.c')
-rw-r--r-- | tools/perf/util/map.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index e672f2f..37cab90 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -17,16 +17,6 @@ static inline int is_anon_memory(const char *filename) return strcmp(filename, "//anon") == 0; } -static int strcommon(const char *pathname, char *cwd, int cwdlen) -{ - int n = 0; - - while (n < cwdlen && pathname[n] == cwd[n]) - ++n; - - return n; -} - void map__init(struct map *self, enum map_type type, u64 start, u64 end, u64 pgoff, struct dso *dso) { @@ -43,7 +33,7 @@ void map__init(struct map *self, enum map_type type, struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, u64 pgoff, u32 pid, char *filename, - enum map_type type, char *cwd, int cwdlen) + enum map_type type) { struct map *self = malloc(sizeof(*self)); @@ -52,16 +42,6 @@ struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, struct dso *dso; int anon; - if (cwd) { - int n = strcommon(filename, cwd, cwdlen); - - if (n == cwdlen) { - snprintf(newfilename, sizeof(newfilename), - ".%s", filename + n); - filename = newfilename; - } - } - anon = is_anon_memory(filename); if (anon) { |