perf tools: Introduce parse_events_terms__purge()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 12 Feb 2016 19:43:02 +0000 (16:43 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 12 Feb 2016 19:53:19 +0000 (16:53 -0300)
commitfc0a2c1d59beac70b8738f4ce14431b798837374
treebb829db727497c244ca5eb259478a27a4c6a4b0a
parenta8adfceb389a0045e06af22517fa3326797b160a
perf tools: Introduce parse_events_terms__purge()

Purges 'struct parse_event_term' entries from a list_head.

Some users need this because they don't allocate space for the list
head, it maybe on the stack or embedded into some other struct.

Next patch will convert users that need just purging and then the
perf_events__free_terms() routine will free the list head as well,
finally being renamed to perf_events_terms__delete().

Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: He Kuang <hekuang@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/n/tip-4w3zl4ifcl0ed0j4bu3tckqp@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h