Re: [PATCH 2/7] perf inject: copy events when reordering events in pipe mode

2017-04-11 Thread David Carrillo-Cisneros
free_dup_event is called in two places 1) ordered_events__free 2) ordered_events__delete without this patch, calling 1) after 2) would cause a double de-allocation, but that's exactly what happens in __perf_session__process_pipe_events. It wasn't triggered before because events where not copie

Re: [PATCH 2/7] perf inject: copy events when reordering events in pipe mode

2017-04-11 Thread Jiri Olsa
On Mon, Apr 10, 2017 at 01:14:27PM -0700, David Carrillo-Cisneros wrote: > __perf_session__process_pipe_events reuses the same memory buffer to > process all events in the pipe. > > When reordering is needed (e.g. -b option), events are not immediately > flushed, but kept around until reordering i