aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-03-05 14:53:26 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-03-15 13:06:05 -0300
commit759ff497e0e6749437b6723f8d26de0b1833c199 (patch)
treee8105fb758da21ac4a796ee669d21efa12b1aabf /tools/perf/util/annotate.c
parentperf annotate: Add basic support to event group view (diff)
downloadlinux-dev-759ff497e0e6749437b6723f8d26de0b1833c199.tar.xz
linux-dev-759ff497e0e6749437b6723f8d26de0b1833c199.zip
perf evsel: Introduce perf_evsel__is_group_event() helper
The perf_evsel__is_group_event function is for checking whether given evsel needs event group view support or not. Please note that it's different to the existing perf_evsel__is_group_leader() which checks only the given evsel is a leader or a standalone (i.e. non-group) event regardless of event group feature. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1362462812-30885-7-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 0955cff5b0ef..f080cc40f00b 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -649,9 +649,7 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
next = disasm__get_next_ip_line(&notes->src->source, dl);
- if (symbol_conf.event_group &&
- perf_evsel__is_group_leader(evsel) &&
- evsel->nr_members > 1) {
+ if (perf_evsel__is_group_event(evsel)) {
nr_percent = evsel->nr_members;
ppercents = calloc(nr_percent, sizeof(double));
if (ppercents == NULL)
@@ -721,8 +719,7 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
if (queue)
return -1;
- if (symbol_conf.event_group &&
- perf_evsel__is_group_leader(evsel))
+ if (perf_evsel__is_group_event(evsel))
width *= evsel->nr_members;
if (!*dl->line)
@@ -1126,7 +1123,7 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
len = symbol__size(sym);
namelen = strlen(d_filename);
- if (symbol_conf.event_group && perf_evsel__is_group_leader(evsel))
+ if (perf_evsel__is_group_event(evsel))
width *= evsel->nr_members;
printf(" %-*.*s| Source code & Disassembly of %s\n",