[PATCH 11/12] perf top: Display slow reader warning for when droping samples

From: Jiri Olsa
Date: Mon Nov 19 2018 - 07:20:51 EST


Currently we display the "Too slow to read ring buffer.." helpline
only for slow reader thread. This patch triggers it also when the
processing thread drops samples, because it has the same reason,
which is too many data on input.

Link: http://lkml.kernel.org/n/tip-2lj87zz8tq9ye1ntax3ulw0n@xxxxxxxxxxxxxx
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
tools/perf/builtin-top.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 7c60bd4419be..5d6e30f69d85 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -571,7 +571,7 @@ static void perf_top__sort_new_samples(void *arg)
hists__collapse_resort(hists, NULL);
perf_evsel__output_resort(evsel, NULL);

- if (t->lost)
+ if (t->lost || t->drop)
ui_helpline__fpush("Too slow to read ring buffer (change period (-c/-F) or limit CPUs (-C)\n");

perf_top__reset_sample_counters(t);
--
2.17.2