Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-29 Thread Arnaldo Carvalho de Melo
Em Mon, Sep 22, 2014 at 09:04:10AM +0200, Jiri Olsa escreveu: > On Thu, Sep 18, 2014 at 09:07:38PM +0400, Alexander Yarygin wrote: > > +++ b/tools/perf/util/session.c > > @@ -542,7 +542,13 @@ int perf_session_queue_event(struct perf_session *s, > > union perf_event *event, > > return

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-29 Thread Arnaldo Carvalho de Melo
Em Mon, Sep 22, 2014 at 09:04:10AM +0200, Jiri Olsa escreveu: On Thu, Sep 18, 2014 at 09:07:38PM +0400, Alexander Yarygin wrote: +++ b/tools/perf/util/session.c @@ -542,7 +542,13 @@ int perf_session_queue_event(struct perf_session *s, union perf_event *event, return -ENOMEM;

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-22 Thread Jiri Olsa
On Fri, Sep 19, 2014 at 12:48:21PM +0400, Alexander Yarygin wrote: > David Ahern writes: > > > On 9/18/14, 2:21 PM, David Ahern wrote: > >> On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: > >>> If nobody objects I'll merge this patch, as it fixes problems, but I > >>> wonder if the best

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-22 Thread Jiri Olsa
On Thu, Sep 18, 2014 at 09:07:38PM +0400, Alexander Yarygin wrote: > From: David Ahern > > When processing events the session code has an ordered samples queue which is > used to time-sort events coming in across multiple mmaps. At a later point in > time samples on the queue are flushed up to

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-22 Thread Jiri Olsa
On Thu, Sep 18, 2014 at 09:07:38PM +0400, Alexander Yarygin wrote: From: David Ahern dsah...@gmail.com When processing events the session code has an ordered samples queue which is used to time-sort events coming in across multiple mmaps. At a later point in time samples on the queue are

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-22 Thread Jiri Olsa
On Fri, Sep 19, 2014 at 12:48:21PM +0400, Alexander Yarygin wrote: David Ahern dsah...@gmail.com writes: On 9/18/14, 2:21 PM, David Ahern wrote: On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: If nobody objects I'll merge this patch, as it fixes problems, but I wonder if the best

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-19 Thread Alexander Yarygin
David Ahern writes: > On 9/19/14, 2:48 AM, Alexander Yarygin wrote: >> It did't work. Turned out that there is at least one event alive after >> finished_round(), usually I get more - ~20. Not sure why, maybe it's >> another problem which should be solved at first? > > hmm

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-19 Thread David Ahern
On 9/19/14, 2:48 AM, Alexander Yarygin wrote: It did't work. Turned out that there is at least one event alive after finished_round(), usually I get more - ~20. Not sure why, maybe it's another problem which should be solved at first? hmm perf_evlist__mmap_consume is not at the event

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-19 Thread Alexander Yarygin
David Ahern writes: > On 9/18/14, 2:21 PM, David Ahern wrote: >> On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: >>> If nobody objects I'll merge this patch, as it fixes problems, but I >>> wonder if the best wouldn't be simply not calling >>> perf_evlist__mmap_consume() till the last

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-19 Thread Alexander Yarygin
David Ahern dsah...@gmail.com writes: On 9/18/14, 2:21 PM, David Ahern wrote: On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: If nobody objects I'll merge this patch, as it fixes problems, but I wonder if the best wouldn't be simply not calling perf_evlist__mmap_consume() till the last

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-19 Thread David Ahern
On 9/19/14, 2:48 AM, Alexander Yarygin wrote: It did't work. Turned out that there is at least one event alive after finished_round(), usually I get more - ~20. Not sure why, maybe it's another problem which should be solved at first? hmm perf_evlist__mmap_consume is not at the event

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-19 Thread Alexander Yarygin
David Ahern dsah...@gmail.com writes: On 9/19/14, 2:48 AM, Alexander Yarygin wrote: It did't work. Turned out that there is at least one event alive after finished_round(), usually I get more - ~20. Not sure why, maybe it's another problem which should be solved at first? hmm

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread David Ahern
On 9/18/14, 2:21 PM, David Ahern wrote: On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: If nobody objects I'll merge this patch, as it fixes problems, but I wonder if the best wouldn't be simply not calling perf_evlist__mmap_consume() till the last event there is in fact consumed... I.e.

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread David Ahern
On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: If nobody objects I'll merge this patch, as it fixes problems, but I wonder if the best wouldn't be simply not calling perf_evlist__mmap_consume() till the last event there is in fact consumed... I.e. as we _really_ consume the events, we

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 18, 2014 at 09:07:38PM +0400, Alexander Yarygin escreveu: > From: David Ahern > When processing events the session code has an ordered samples queue which is > used to time-sort events coming in across multiple mmaps. At a later point in > time samples on the queue are flushed up to

[PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread Alexander Yarygin
From: David Ahern When processing events the session code has an ordered samples queue which is used to time-sort events coming in across multiple mmaps. At a later point in time samples on the queue are flushed up to some timestamp at which point the event is actually processed. When analyzing

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread David Ahern
On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: If nobody objects I'll merge this patch, as it fixes problems, but I wonder if the best wouldn't be simply not calling perf_evlist__mmap_consume() till the last event there is in fact consumed... I.e. as we _really_ consume the events, we

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread David Ahern
On 9/18/14, 2:21 PM, David Ahern wrote: On 9/18/14, 12:53 PM, Arnaldo Carvalho de Melo wrote: If nobody objects I'll merge this patch, as it fixes problems, but I wonder if the best wouldn't be simply not calling perf_evlist__mmap_consume() till the last event there is in fact consumed... I.e.

[PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread Alexander Yarygin
From: David Ahern dsah...@gmail.com When processing events the session code has an ordered samples queue which is used to time-sort events coming in across multiple mmaps. At a later point in time samples on the queue are flushed up to some timestamp at which point the event is actually

Re: [PATCH 1/2] perf session: Add option to copy events when queueing

2014-09-18 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 18, 2014 at 09:07:38PM +0400, Alexander Yarygin escreveu: From: David Ahern dsah...@gmail.com When processing events the session code has an ordered samples queue which is used to time-sort events coming in across multiple mmaps. At a later point in time samples on the queue are