Re: [PATCH v2 3/9] perf tools: ensure config and str in terms are unique

2019-10-23 Thread Jiri Olsa
On Tue, Oct 22, 2019 at 05:53:31PM -0700, Ian Rogers wrote: SNIP > return -1; > + } > list_add_tail(>list, head); > > if (!parse_events_add_pmu(parse_state, list, >

[PATCH v2 3/9] perf tools: ensure config and str in terms are unique

2019-10-22 Thread Ian Rogers
Make it easier to release memory associated with parse event terms by duplicating the string for the config name and ensuring the val string is a duplicate. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 33 - tools/perf/util/parse-events.y | 4