perf map: Pass a dso_id to map__new()
Instead of the 4 fields, a step in the direction of moving this to struct dso. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-gp5s1xgxacurmih5d1l94ymy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -1651,6 +1651,12 @@ int machine__process_mmap2_event(struct machine *machine,
|
||||
{
|
||||
struct thread *thread;
|
||||
struct map *map;
|
||||
struct dso_id dso_id = {
|
||||
.maj = event->mmap2.maj,
|
||||
.min = event->mmap2.min,
|
||||
.ino = event->mmap2.ino,
|
||||
.ino_generation = event->mmap2.ino_generation,
|
||||
};
|
||||
int ret = 0;
|
||||
|
||||
if (dump_trace)
|
||||
@@ -1671,10 +1677,7 @@ int machine__process_mmap2_event(struct machine *machine,
|
||||
|
||||
map = map__new(machine, event->mmap2.start,
|
||||
event->mmap2.len, event->mmap2.pgoff,
|
||||
event->mmap2.maj,
|
||||
event->mmap2.min, event->mmap2.ino,
|
||||
event->mmap2.ino_generation,
|
||||
event->mmap2.prot,
|
||||
&dso_id, event->mmap2.prot,
|
||||
event->mmap2.flags,
|
||||
event->mmap2.filename, thread);
|
||||
|
||||
@@ -1727,9 +1730,7 @@ int machine__process_mmap_event(struct machine *machine, union perf_event *event
|
||||
|
||||
map = map__new(machine, event->mmap.start,
|
||||
event->mmap.len, event->mmap.pgoff,
|
||||
0, 0, 0, 0, prot, 0,
|
||||
event->mmap.filename,
|
||||
thread);
|
||||
NULL, prot, 0, event->mmap.filename, thread);
|
||||
|
||||
if (map == NULL)
|
||||
goto out_problem_map;
|
||||
|
Reference in New Issue
Block a user