summaryrefslogtreecommitdiff
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-07-22 17:17:53 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-23 23:45:50 +0400
commit2a03068c5cfa104768703cbefa2e23a6353f8de5 (patch)
tree7c41e71161602591c80a3c2cccbb113eeae0a2c6 /tools/perf/util/map.c
parent6d363459d7e6e05f0afeb8e36e6de262a4964694 (diff)
downloadlinux-2a03068c5cfa104768703cbefa2e23a6353f8de5.tar.xz
perf tools: Pass machine to vdso__dso_findnew()
This is preparation for removing the global variables used in vdso.c and thereby fixing the lifetime of the VDSO temporary file. Reviewed-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1406035081-14301-45-git-send-email-adrian.hunter@intel.com 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 845f627e45f4..dffc8dce6046 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -13,6 +13,7 @@
#include "build-id.h"
#include "util.h"
#include "debug.h"
+#include "machine.h"
#include <linux/string.h>
const char *map_type__name[MAP__NR_TYPES] = {
@@ -137,7 +138,7 @@ void map__init(struct map *map, enum map_type type,
map->erange_warned = false;
}
-struct map *map__new(struct list_head *dsos__list, u64 start, u64 len,
+struct map *map__new(struct machine *machine, u64 start, u64 len,
u64 pgoff, u32 pid, u32 d_maj, u32 d_min, u64 ino,
u64 ino_gen, u32 prot, u32 flags, char *filename,
enum map_type type)
@@ -173,9 +174,9 @@ struct map *map__new(struct list_head *dsos__list, u64 start, u64 len,
if (vdso) {
pgoff = 0;
- dso = vdso__dso_findnew(dsos__list);
+ dso = vdso__dso_findnew(machine);
} else
- dso = __dsos__findnew(dsos__list, filename);
+ dso = __dsos__findnew(&machine->user_dsos, filename);
if (dso == NULL)
goto out_delete;