aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/hist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/ui/hist.c')
-rw-r--r--tools/perf/ui/hist.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index d671e63aa351..4bf91b09d62d 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -16,6 +16,7 @@ static int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he,
16{ 16{
17 int ret; 17 int ret;
18 struct hists *hists = he->hists; 18 struct hists *hists = he->hists;
19 struct perf_evsel *evsel = hists_to_evsel(hists);
19 20
20 if (fmt_percent) { 21 if (fmt_percent) {
21 double percent = 0.0; 22 double percent = 0.0;
@@ -28,15 +29,11 @@ static int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he,
28 } else 29 } else
29 ret = print_fn(hpp->buf, hpp->size, fmt, get_field(he)); 30 ret = print_fn(hpp->buf, hpp->size, fmt, get_field(he));
30 31
31 if (symbol_conf.event_group) { 32 if (perf_evsel__is_group_event(evsel)) {
32 int prev_idx, idx_delta; 33 int prev_idx, idx_delta;
33 struct perf_evsel *evsel = hists_to_evsel(hists);
34 struct hist_entry *pair; 34 struct hist_entry *pair;
35 int nr_members = evsel->nr_members; 35 int nr_members = evsel->nr_members;
36 36
37 if (nr_members <= 1)
38 return ret;
39
40 prev_idx = perf_evsel__group_idx(evsel); 37 prev_idx = perf_evsel__group_idx(evsel);
41 38
42 list_for_each_entry(pair, &he->pairs.head, pairs.node) { 39 list_for_each_entry(pair, &he->pairs.head, pairs.node) {