提交 8aa5c8ed 编写于 作者: J Jiri Olsa 提交者: Arnaldo Carvalho de Melo

perf top: Move perf_top__reset_sample_counters() to after counts display

Move the perf_top__reset_sample_counters() call to right after we
display the counters so we can see the updated numbers for longer.
Signed-off-by: NJiri Olsa <jolsa@kernel.org>
Acked-by: NDavid S. Miller <davem@davemloft.net>
Acked-by: NNamhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/n/tip-o72pyiwt05f3p2juprwmz2jo@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 d8590430
......@@ -273,8 +273,6 @@ static void perf_top__print_sym_table(struct perf_top *top)
perf_top__header_snprintf(top, bf, sizeof(bf));
printf("%s\n", bf);
perf_top__reset_sample_counters(top);
printf("%-*.*s\n", win_width, win_width, graph_dotted_line);
if (!top->record_opts.overwrite &&
......@@ -573,8 +571,6 @@ static void perf_top__sort_new_samples(void *arg)
if (t->lost || t->drop)
pr_warning("Too slow to read ring buffer (change period (-c/-F) or limit CPUs (-C)\n");
perf_top__reset_sample_counters(t);
}
static void stop_top(void)
......
......@@ -2229,8 +2229,11 @@ static int hists_browser__scnprintf_title(struct hist_browser *browser, char *bf
if (top->zero)
printed += scnprintf(bf + printed, size - printed, " [z]");
perf_top__reset_sample_counters(top);
}
return printed;
}
......
......@@ -107,6 +107,7 @@ size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size)
top->evlist->cpus->nr > 1 ? "s" : "");
}
perf_top__reset_sample_counters(top);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册