Re: [PATCH] perf/record: make perf_event__synthesize_mmap_events() scale

2017-03-15 Thread Stephane Eranian
Arnaldo, On Wed, Mar 15, 2017 at 10:44 AM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Mar 15, 2017 at 10:08:27AM -0700, Stephane Eranian escreveu: > > On Wed, Mar 15, 2017 at 6:58 AM, Arnaldo Carvalho de Melo > > wrote: > > > Em Wed, Mar 15, 2017 at 10:50:59AM -0300, Arnaldo Carvalho de Melo >

Re: [PATCH] perf/record: make perf_event__synthesize_mmap_events() scale

2017-03-15 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 15, 2017 at 10:08:27AM -0700, Stephane Eranian escreveu: > On Wed, Mar 15, 2017 at 6:58 AM, Arnaldo Carvalho de Melo > wrote: > > Em Wed, Mar 15, 2017 at 10:50:59AM -0300, Arnaldo Carvalho de Melo escreveu: > >> So, fixing up the "tasks" -> "tasks" we end up with something safe and > >

Re: [PATCH] perf/record: make perf_event__synthesize_mmap_events() scale

2017-03-15 Thread Stephane Eranian
On Wed, Mar 15, 2017 at 6:58 AM, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 15, 2017 at 10:50:59AM -0300, Arnaldo Carvalho de Melo escreveu: >> So, fixing up the "tasks" -> "tasks" we end up with something safe and >> that avoids this by now > > "tasks" -> "task", grrr > Oops, yeah, sorry about

Re: [PATCH] perf/record: make perf_event__synthesize_mmap_events() scale

2017-03-15 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 15, 2017 at 10:50:59AM -0300, Arnaldo Carvalho de Melo escreveu: > So, fixing up the "tasks" -> "tasks" we end up with something safe and > that avoids this by now "tasks" -> "task", grrr - Arnaldo

Re: [PATCH] perf/record: make perf_event__synthesize_mmap_events() scale

2017-03-15 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 14, 2017 at 11:57:21PM -0700, Stephane Eranian escreveu: > This patch significantly improves the execution time of > perf_event__synthesize_mmap_events() when running perf record > on systems where processes have lots of threads. It just happens > that cat /proc/pid/maps support uses a

Re: [PATCH] perf/record: make perf_event__synthesize_mmap_events() scale

2017-03-15 Thread Jiri Olsa
On Tue, Mar 14, 2017 at 11:57:21PM -0700, Stephane Eranian wrote: > This patch significantly improves the execution time of > perf_event__synthesize_mmap_events() when running perf record > on systems where processes have lots of threads. It just happens > that cat /proc/pid/maps support uses a O(N

[PATCH] perf/record: make perf_event__synthesize_mmap_events() scale

2017-03-14 Thread Stephane Eranian
This patch significantly improves the execution time of perf_event__synthesize_mmap_events() when running perf record on systems where processes have lots of threads. It just happens that cat /proc/pid/maps support uses a O(N^2) algorithm to generate each map line in the maps file. If you have 100