From 27f9d2ecf343a9e5732df249e4380ef12d07ea07 Mon Sep 17 00:00:00 2001 From: Dave Martin Date: Tue, 27 Jul 2010 16:40:02 +0100 Subject: [PATCH] --- yaml --- r: 205337 b: refs/heads/master c: 361d13462585474267a0c41e956f1a1c19a93f17 h: refs/heads/master i: 205335: 6ec1ed7672239121902c682d85f08c124f04b470 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/event.c | 2 +- trunk/tools/perf/util/map.c | 22 +--------------------- trunk/tools/perf/util/map.h | 2 +- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/[refs] b/[refs] index c4e29ce14cc5..e136c337a06b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f0cbf7aa3d3460a3eb201a772326739a0c0210a +refs/heads/master: 361d13462585474267a0c41e956f1a1c19a93f17 diff --git a/trunk/tools/perf/util/event.c b/trunk/tools/perf/util/event.c index 121339f4360d..5b81bb29a07a 100644 --- a/trunk/tools/perf/util/event.c +++ b/trunk/tools/perf/util/event.c @@ -517,7 +517,7 @@ int event__process_mmap(event_t *self, struct perf_session *session) map = map__new(&machine->user_dsos, self->mmap.start, self->mmap.len, self->mmap.pgoff, self->mmap.pid, self->mmap.filename, - MAP__FUNCTION, session->cwd, session->cwdlen); + MAP__FUNCTION); if (thread == NULL || map == NULL) goto out_problem; diff --git a/trunk/tools/perf/util/map.c b/trunk/tools/perf/util/map.c index e672f2fef65b..37cab9038538 100644 --- a/trunk/tools/perf/util/map.c +++ b/trunk/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) { diff --git a/trunk/tools/perf/util/map.h b/trunk/tools/perf/util/map.h index f39134512829..3b2f706c0ba2 100644 --- a/trunk/tools/perf/util/map.h +++ b/trunk/tools/perf/util/map.h @@ -106,7 +106,7 @@ void map__init(struct map *self, enum map_type type, u64 start, u64 end, u64 pgoff, struct dso *dso); 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); void map__delete(struct map *self); struct map *map__clone(struct map *self); int map__overlap(struct map *l, struct map *r);