aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/annotate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index fffe16af9797..fbad8dfbb186 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -2600,7 +2600,7 @@ int __annotation__scnprintf_samples_period(struct annotation *notes,
2600 bool show_freq) 2600 bool show_freq)
2601{ 2601{
2602 const char *ev_name = perf_evsel__name(evsel); 2602 const char *ev_name = perf_evsel__name(evsel);
2603 char ref[30] = " show reference callgraph, "; 2603 char buf[1024], ref[30] = " show reference callgraph, ";
2604 char sample_freq_str[64] = ""; 2604 char sample_freq_str[64] = "";
2605 unsigned long nr_samples = 0; 2605 unsigned long nr_samples = 0;
2606 int nr_members = 1; 2606 int nr_members = 1;
@@ -2609,8 +2609,11 @@ int __annotation__scnprintf_samples_period(struct annotation *notes,
2609 char unit; 2609 char unit;
2610 int i; 2610 int i;
2611 2611
2612 if (perf_evsel__is_group_event(evsel)) 2612 if (perf_evsel__is_group_event(evsel)) {
2613 perf_evsel__group_desc(evsel, buf, sizeof(buf));
2614 ev_name = buf;
2613 nr_members = evsel->nr_members; 2615 nr_members = evsel->nr_members;
2616 }
2614 2617
2615 for (i = 0; i < nr_members; i++) { 2618 for (i = 0; i < nr_members; i++) {
2616 struct sym_hist *ah = annotation__histogram(notes, evsel->idx + i); 2619 struct sym_hist *ah = annotation__histogram(notes, evsel->idx + i);