Re: [PATCH 3/3] perf tools: Make 'struct map_shared' truly shared

2019-10-14 Thread Jiri Olsa
On Mon, Oct 14, 2019 at 12:46:19PM -0700, Andi Kleen wrote: > > > We may need a COW operation for this (hopefully rare) case. > > > > so the jitted mmaps are inserted into the data file > > and processed during report where they can overload > > existing maps - thats detected before addition in:

Re: [PATCH 3/3] perf tools: Make 'struct map_shared' truly shared

2019-10-14 Thread Andi Kleen
> > We may need a COW operation for this (hopefully rare) case. > > so the jitted mmaps are inserted into the data file > and processed during report where they can overload > existing maps - thats detected before addition in: > > thread__insert_map > map_groups__fixup_overlappings >

Re: [PATCH 3/3] perf tools: Make 'struct map_shared' truly shared

2019-10-14 Thread Jiri Olsa
On Sun, Oct 13, 2019 at 08:10:54PM -0700, Andi Kleen wrote: > On Sun, Oct 13, 2019 at 05:14:27PM +0200, Jiri Olsa wrote: > > Andi reported that maps cloning is eating lot of memory and > > it's probably unnecessary, because they keep the same data. > > > > Changing 'struct map_shared' to be a

Re: [PATCH 3/3] perf tools: Make 'struct map_shared' truly shared

2019-10-14 Thread Jiri Olsa
On Sun, Oct 13, 2019 at 08:10:54PM -0700, Andi Kleen wrote: > On Sun, Oct 13, 2019 at 05:14:27PM +0200, Jiri Olsa wrote: > > Andi reported that maps cloning is eating lot of memory and > > it's probably unnecessary, because they keep the same data. > > > > Changing 'struct map_shared' to be a

Re: [PATCH 3/3] perf tools: Make 'struct map_shared' truly shared

2019-10-13 Thread Andi Kleen
On Sun, Oct 13, 2019 at 05:14:27PM +0200, Jiri Olsa wrote: > Andi reported that maps cloning is eating lot of memory and > it's probably unnecessary, because they keep the same data. > > Changing 'struct map_shared' to be a pointer inside 'struct map', > so it can be shared on fork. Changing the