diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-14 15:35:48 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-15 09:13:56 -0400 |
commit | 63dab225f334e0e21f7106aed8d888b500b53ce6 (patch) | |
tree | 305a1367d47de19b21573aaee536a1656ad1e296 /tools/perf/util/parse-events.c | |
parent | 905f5ee2f769c85eb6f0b6ee38f803829efd68a3 (diff) |
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>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index f6453cd414ae..4393a6b65c51 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -611,31 +611,18 @@ int parse_events_add_pmu(struct list_head **list, int *idx, | |||
611 | pmu_event_name(head_config)); | 611 | pmu_event_name(head_config)); |
612 | } | 612 | } |
613 | 613 | ||
614 | struct perf_evsel *parse_events__set_leader(struct list_head *list) | ||
615 | { | ||
616 | struct perf_evsel *evsel, *leader; | ||
617 | |||
618 | leader = list_entry(list->next, struct perf_evsel, node); | ||
619 | leader->leader = NULL; | ||
620 | |||
621 | list_for_each_entry(evsel, list, node) | ||
622 | if (evsel != leader) | ||
623 | evsel->leader = leader; | ||
624 | |||
625 | return leader; | ||
626 | } | ||
627 | |||
628 | int parse_events__modifier_group(struct list_head *list, | 614 | int parse_events__modifier_group(struct list_head *list, |
629 | char *event_mod) | 615 | char *event_mod) |
630 | { | 616 | { |
631 | return parse_events__modifier_event(list, event_mod, true); | 617 | return parse_events__modifier_event(list, event_mod, true); |
632 | } | 618 | } |
633 | 619 | ||
634 | void parse_events__group(char *name, struct list_head *list) | 620 | void parse_events__set_leader(char *name, struct list_head *list) |
635 | { | 621 | { |
636 | struct perf_evsel *leader; | 622 | struct perf_evsel *leader; |
637 | 623 | ||
638 | leader = parse_events__set_leader(list); | 624 | __perf_evlist__set_leader(list); |
625 | leader = list_entry(list->next, struct perf_evsel, node); | ||
639 | leader->group_name = name ? strdup(name) : NULL; | 626 | leader->group_name = name ? strdup(name) : NULL; |
640 | } | 627 | } |
641 | 628 | ||