aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/hist.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 3f437236f193..da2899e8c6f8 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -591,6 +591,7 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size,
591{ 591{
592 struct sort_entry *se; 592 struct sort_entry *se;
593 u64 period, total, period_sys, period_us, period_guest_sys, period_guest_us; 593 u64 period, total, period_sys, period_us, period_guest_sys, period_guest_us;
594 u64 nr_events;
594 const char *sep = symbol_conf.field_sep; 595 const char *sep = symbol_conf.field_sep;
595 int ret; 596 int ret;
596 597
@@ -599,6 +600,7 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size,
599 600
600 if (pair_hists) { 601 if (pair_hists) {
601 period = self->pair ? self->pair->period : 0; 602 period = self->pair ? self->pair->period : 0;
603 nr_events = self->pair ? self->pair->nr_events : 0;
602 total = pair_hists->stats.total_period; 604 total = pair_hists->stats.total_period;
603 period_sys = self->pair ? self->pair->period_sys : 0; 605 period_sys = self->pair ? self->pair->period_sys : 0;
604 period_us = self->pair ? self->pair->period_us : 0; 606 period_us = self->pair ? self->pair->period_us : 0;
@@ -606,6 +608,7 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size,
606 period_guest_us = self->pair ? self->pair->period_guest_us : 0; 608 period_guest_us = self->pair ? self->pair->period_guest_us : 0;
607 } else { 609 } else {
608 period = self->period; 610 period = self->period;
611 nr_events = self->nr_events;
609 total = session_total; 612 total = session_total;
610 period_sys = self->period_sys; 613 period_sys = self->period_sys;
611 period_us = self->period_us; 614 period_us = self->period_us;
@@ -646,9 +649,9 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size,
646 649
647 if (symbol_conf.show_nr_samples) { 650 if (symbol_conf.show_nr_samples) {
648 if (sep) 651 if (sep)
649 ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); 652 ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events);
650 else 653 else
651 ret += snprintf(s + ret, size - ret, "%11" PRIu64, period); 654 ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events);
652 } 655 }
653 656
654 if (pair_hists) { 657 if (pair_hists) {