}
 
        thread = perf_session__findnew(session, self->mmap.pid);
-       map = map__new(&self->mmap, MAP__FUNCTION,
+       map = map__new(self->mmap.start, self->mmap.len, self->mmap.pgoff,
+                      self->mmap.pid, self->mmap.filename, MAP__FUNCTION,
                       session->cwd, session->cwdlen);
 
        if (thread == NULL || map == NULL)
 
-#include "event.h"
 #include "symbol.h"
 #include <stdlib.h>
 #include <string.h>
        RB_CLEAR_NODE(&self->rb_node);
 }
 
-struct map *map__new(struct mmap_event *event, enum map_type type,
-                    char *cwd, int cwdlen)
+struct map *map__new(u64 start, u64 len, u64 pgoff, u32 pid, char *filename,
+                    enum map_type type, char *cwd, int cwdlen)
 {
        struct map *self = malloc(sizeof(*self));
 
        if (self != NULL) {
-               const char *filename = event->filename;
                char newfilename[PATH_MAX];
                struct dso *dso;
                int anon;
                anon = is_anon_memory(filename);
 
                if (anon) {
-                       snprintf(newfilename, sizeof(newfilename), "/tmp/perf-%d.map", event->pid);
+                       snprintf(newfilename, sizeof(newfilename), "/tmp/perf-%d.map", pid);
                        filename = newfilename;
                }
 
                if (dso == NULL)
                        goto out_delete;
 
-               map__init(self, type, event->start, event->start + event->len,
-                         event->pgoff, dso);
+               map__init(self, type, start, start + len, pgoff, dso);
 
                if (anon) {
 set_identity:
 
 u64 map__objdump_2ip(struct map *map, u64 addr);
 
 struct symbol;
-struct mmap_event;
 
 typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym);
 
 void map__init(struct map *self, enum map_type type,
               u64 start, u64 end, u64 pgoff, struct dso *dso);
-struct map *map__new(struct mmap_event *event, enum map_type,
-                    char *cwd, int cwdlen);
+struct map *map__new(u64 start, u64 len, u64 pgoff, u32 pid, char *filename,
+                    enum map_type type, char *cwd, int cwdlen);
 void map__delete(struct map *self);
 struct map *map__clone(struct map *self);
 int map__overlap(struct map *l, struct map *r);