RE: [PATCH] perf map: fix overlapped map handling

2019-09-27 Thread Steve MacLean
>> An earlier version of this patch used: >> after->start = map->end; >> +after->pgoff += map->end - pos->start; >> >> Instead of the newer Functionally equivalent: >> after->start = map->end; >> +after->pgoff = pos-

Re: [PATCH] perf map: fix overlapped map handling

2019-09-27 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 20, 2019 at 09:46:15PM +, Steve MacLean escreveu: > >>after->start = map->end; > >> + after->pgoff = pos->map_ip(pos, map->end); > > > > So is this equivalent to what __split_vma() does in the kernel, i.e.: > > > >if (new_below) > >

RE: [PATCH] perf map: fix overlapped map handling

2019-09-20 Thread Steve MacLean
>> after->start = map->end; >> +after->pgoff = pos->map_ip(pos, map->end); > > So is this equivalent to what __split_vma() does in the kernel, i.e.: > >if (new_below) >new->vm_end = addr; >else { >new->vm_start

Re: [PATCH] perf map: fix overlapped map handling

2019-09-20 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 20, 2019 at 07:20:18PM +, Steve MacLean escreveu: > Whenever an mmap/mmap2 event occurs, the map tree must be updated to add a new > entry. If a new map overlaps a previous map, the overlapped section of the > previous map is effectively unmapped, but the non-overlapping sections ar