Re: [PATCH 1/5] perf tests: Add tip/pid mmap automated tests

2014-03-17 Thread Jiri Olsa
On Mon, Mar 17, 2014 at 01:50:12PM +0900, Namhyung Kim wrote: > Hi Jiri, > > On Fri, 14 Mar 2014 15:00:02 +0100, Jiri Olsa wrote: > > +static int thread_init(struct thread_data *td) > > +{ > > + void *map; > > + > > + map = mmap(NULL, page_size, PROT_READ|PROT_WRITE, > > + MAP_SHA

Re: [PATCH 1/5] perf tests: Add tip/pid mmap automated tests

2014-03-16 Thread Jiri Olsa
On Fri, Mar 14, 2014 at 05:24:21PM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Mar 14, 2014 at 03:00:02PM +0100, Jiri Olsa escreveu: > > Adding automated test for memory maps lookup within > > multiple machines threads. > > CC /tmp/build/perf/arch/x86/util/tsc.o > tests/mmap-events.c:

Re: [PATCH 1/5] perf tests: Add tip/pid mmap automated tests

2014-03-16 Thread Namhyung Kim
Hi Jiri, On Fri, 14 Mar 2014 15:00:02 +0100, Jiri Olsa wrote: > +static int thread_init(struct thread_data *td) > +{ > + void *map; > + > + map = mmap(NULL, page_size, PROT_READ|PROT_WRITE, > +MAP_SHARED|MAP_ANONYMOUS, -1, 0); Shouldn't it be an executable mapping to be fo

Re: [PATCH 1/5] perf tests: Add tip/pid mmap automated tests

2014-03-14 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 14, 2014 at 03:00:02PM +0100, Jiri Olsa escreveu: > Adding automated test for memory maps lookup within > multiple machines threads. CC /tmp/build/perf/arch/x86/util/tsc.o tests/mmap-events.c: In function ‘mmap_events’: tests/mmap-events.c:157:18: error: declaration of ‘thread’

[PATCH 1/5] perf tests: Add tip/pid mmap automated tests

2014-03-14 Thread Jiri Olsa
Adding automated test for memory maps lookup within multiple machines threads. The test creates 4 threads and separated memory maps. It checks that we could use thread__find_addr_map function with thread object based on TID to find memory maps. Signed-off-by: Jiri Olsa Cc: Don Zickus Cc: Corey