]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/util/event.c
sparc: Fix syscall fallback bugs in VDSO.
[linux.git] / tools / perf / util / event.c
index 0c8ecf0c78a40ac1088d40742d371cae7fa3d6e7..651cd6f6762cb42ed0b5b3b483582553ae82cc67 100644 (file)
@@ -541,10 +541,17 @@ static int __event__synthesize_thread(union perf_event *comm_event,
                                                      tgid, process, machine) < 0)
                        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))
@@ -1074,6 +1081,7 @@ void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max
        }
 
        *size += sizeof(struct cpu_map_data);
+       *size = PERF_ALIGN(*size, sizeof(u64));
        return zalloc(*size);
 }
 
@@ -1553,7 +1561,9 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
 
                return NULL;
        }
+#if 0
 try_again:
+#endif
        al->map = map_groups__find(mg, al->addr);
        if (al->map == NULL) {
                /*
@@ -1565,6 +1575,7 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
                 * "[vdso]" dso, but for now lets use the old trick of looking
                 * in the whole kernel symbol list.
                 */
+#if 0
                if (cpumode == PERF_RECORD_MISC_USER && machine &&
                    mg != &machine->kmaps &&
                    machine__kernel_ip(machine, al->addr)) {
@@ -1572,6 +1583,7 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
                        load_map = true;
                        goto try_again;
                }
+#endif
        } else {
                /*
                 * Kernel maps might be changed when loading symbols so loading