perf evlist: Rename __group method to __set_leader
Just like was done for parse_events__set_leader. Also we need to have the list_entry set_leader method in evlist.c so that we don't grow another dep in the python binding: # ~acme/git/linux/tools/perf/python/twatch.py Traceback (most recent call last): File "/home/acme/git/linux/tools/perf/python/twatch.py", line 16, in <module> import perf ImportError: /home/acme/git/build/perf/python/perf.so: undefined symbol: parse_events__set_leader And also remove a pr_debug from evsel.c so that we avoid this one too: # ~acme/git/linux/tools/perf/python/twatch.py Traceback (most recent call last): File "/home/acme/git/linux/tools/perf/python/twatch.py", line 16, in <module> import perf ImportError: /home/acme/git/build/perf/python/perf.so: undefined symbol: eprintf Acked-by: Jiri Olsa <jolsa@redhat.com> Acked-by: Namhyung Kim <namhyung@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-0hk9dazg9pora9jylkqngovm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -108,10 +108,23 @@ void perf_evlist__splice_list_tail(struct perf_evlist *evlist,
|
||||
evlist->nr_entries += nr_entries;
|
||||
}
|
||||
|
||||
void perf_evlist__group(struct perf_evlist *evlist)
|
||||
void __perf_evlist__set_leader(struct list_head *list)
|
||||
{
|
||||
struct perf_evsel *evsel, *leader;
|
||||
|
||||
leader = list_entry(list->next, struct perf_evsel, node);
|
||||
leader->leader = NULL;
|
||||
|
||||
list_for_each_entry(evsel, list, node) {
|
||||
if (evsel != leader)
|
||||
evsel->leader = leader;
|
||||
}
|
||||
}
|
||||
|
||||
void perf_evlist__set_leader(struct perf_evlist *evlist)
|
||||
{
|
||||
if (evlist->nr_entries)
|
||||
parse_events__set_leader(&evlist->entries);
|
||||
__perf_evlist__set_leader(&evlist->entries);
|
||||
}
|
||||
|
||||
int perf_evlist__add_default(struct perf_evlist *evlist)
|
||||
|
Reference in New Issue
Block a user