summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/newt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/newt.c')
-rw-r--r--tools/perf/util/newt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 010bacf40163..3402453812b3 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -680,16 +680,18 @@ static int hist_browser__populate(struct hist_browser *self, struct hists *hists
struct ui_progress *progress;
struct rb_node *nd;
u64 curr_hist = 0;
- char seq[] = ".";
+ char seq[] = ".", unit;
char str[256];
+ unsigned long nr_events = hists->stats.nr_events[PERF_RECORD_SAMPLE];
if (self->form) {
newtFormDestroy(self->form);
newtPopWindow();
}
- snprintf(str, sizeof(str), "Samples: %Ld ",
- hists->stats.total_period);
+ nr_events = convert_unit(nr_events, &unit);
+ snprintf(str, sizeof(str), "Events: %lu%c ",
+ nr_events, unit);
newtDrawRootText(0, 0, str);
newtGetScreenSize(NULL, &rows);