|
@@ -541,10 +541,17 @@ static int __event__synthesize_thread(union perf_event *comm_event,
|
|
tgid, process, machine) < 0)
|
|
tgid, process, machine) < 0)
|
|
return -1;
|
|
return -1;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * send mmap only for thread group leader
|
|
|
|
+ * see thread__init_map_groups
|
|
|
|
+ */
|
|
|
|
+ if (pid == tgid &&
|
|
|
|
+ perf_event__synthesize_mmap_events(tool, mmap_event, pid, tgid,
|
|
|
|
+ process, machine, mmap_data,
|
|
|
|
+ proc_map_timeout))
|
|
|
|
+ return -1;
|
|
|
|
|
|
- return perf_event__synthesize_mmap_events(tool, mmap_event, pid, tgid,
|
|
|
|
- process, machine, mmap_data,
|
|
|
|
- proc_map_timeout);
|
|
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
if (machine__is_default_guest(machine))
|
|
if (machine__is_default_guest(machine))
|