Re: [PATCH 6/6] perf parse events: demystify memory allocations

2013-07-07 Thread Jiri Olsa
On Sun, Jul 07, 2013 at 10:45:13AM -0600, David Ahern wrote: > On 7/7/13 9:26 AM, Jiri Olsa wrote: > >On Tue, Jul 02, 2013 at 01:27:25PM -0600, David Ahern wrote: > >>List heads are currently allocated way down the function chain in > >>__add_event > >>and add_tracepoint and then freed when the

Re: [PATCH 6/6] perf parse events: demystify memory allocations

2013-07-07 Thread David Ahern
On 7/7/13 9:26 AM, Jiri Olsa wrote: On Tue, Jul 02, 2013 at 01:27:25PM -0600, David Ahern wrote: List heads are currently allocated way down the function chain in __add_event and add_tracepoint and then freed when the scanner code calls parse_events_update_lists. Be more explicit with where

Re: [PATCH 6/6] perf parse events: demystify memory allocations

2013-07-07 Thread Jiri Olsa
On Tue, Jul 02, 2013 at 01:27:25PM -0600, David Ahern wrote: > List heads are currently allocated way down the function chain in __add_event > and add_tracepoint and then freed when the scanner code calls > parse_events_update_lists. > > Be more explicit with where memory is allocated and who

Re: [PATCH 6/6] perf parse events: demystify memory allocations

2013-07-07 Thread Jiri Olsa
On Tue, Jul 02, 2013 at 01:27:25PM -0600, David Ahern wrote: List heads are currently allocated way down the function chain in __add_event and add_tracepoint and then freed when the scanner code calls parse_events_update_lists. Be more explicit with where memory is allocated and who should

Re: [PATCH 6/6] perf parse events: demystify memory allocations

2013-07-07 Thread David Ahern
On 7/7/13 9:26 AM, Jiri Olsa wrote: On Tue, Jul 02, 2013 at 01:27:25PM -0600, David Ahern wrote: List heads are currently allocated way down the function chain in __add_event and add_tracepoint and then freed when the scanner code calls parse_events_update_lists. Be more explicit with where

Re: [PATCH 6/6] perf parse events: demystify memory allocations

2013-07-07 Thread Jiri Olsa
On Sun, Jul 07, 2013 at 10:45:13AM -0600, David Ahern wrote: On 7/7/13 9:26 AM, Jiri Olsa wrote: On Tue, Jul 02, 2013 at 01:27:25PM -0600, David Ahern wrote: List heads are currently allocated way down the function chain in __add_event and add_tracepoint and then freed when the scanner code

[PATCH 6/6] perf parse events: demystify memory allocations

2013-07-02 Thread David Ahern
List heads are currently allocated way down the function chain in __add_event and add_tracepoint and then freed when the scanner code calls parse_events_update_lists. Be more explicit with where memory is allocated and who should free it. With this patch the list_head is allocated in the scanner

[PATCH 6/6] perf parse events: demystify memory allocations

2013-07-02 Thread David Ahern
List heads are currently allocated way down the function chain in __add_event and add_tracepoint and then freed when the scanner code calls parse_events_update_lists. Be more explicit with where memory is allocated and who should free it. With this patch the list_head is allocated in the scanner