From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Kan Liang <kan.liang@intel.com>, Andi Kleen <ak@linux.intel.com>,
Jin Yao <yao.jin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Wang Nan <wangnan0@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 16/21] perf top: Remove lost events checking
Date: Tue, 6 Feb 2018 13:53:45 -0300 [thread overview]
Message-ID: <20180206165350.2570-17-acme@kernel.org> (raw)
In-Reply-To: <20180206165350.2570-1-acme@kernel.org>
From: Kan Liang <kan.liang@intel.com>
There would be some records lost in overwrite mode because of pausing
the ringbuffer. It has little impact for the accuracy of the snapshot
and could be tolerated by 'perf top'.
Remove the lost events checking.
Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1516310792-208685-16-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-top.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 7def861a9ec4..59653062bb48 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -283,8 +283,9 @@ static void perf_top__print_sym_table(struct perf_top *top)
printf("%-*.*s\n", win_width, win_width, graph_dotted_line);
- if (hists->stats.nr_lost_warned !=
- hists->stats.nr_events[PERF_RECORD_LOST]) {
+ if (!top->record_opts.overwrite &&
+ (hists->stats.nr_lost_warned !=
+ hists->stats.nr_events[PERF_RECORD_LOST])) {
hists->stats.nr_lost_warned =
hists->stats.nr_events[PERF_RECORD_LOST];
color_fprintf(stdout, PERF_COLOR_RED,
@@ -611,7 +612,8 @@ static void *display_thread_tui(void *arg)
perf_evlist__tui_browse_hists(top->evlist, help, &hbt,
top->min_percent,
- &top->session->header.env, true);
+ &top->session->header.env,
+ !top->record_opts.overwrite);
done = 1;
return NULL;
--
2.14.3
next prev parent reply other threads:[~2018-02-06 16:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 16:53 [GIT PULL 00/21] perf/core improvements and fixes Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 01/21] perf vendor events aarch64: Add JSON metrics for ARM Cortex-A53 Processor Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 02/21] perf evlist: Remove stale mmap read for backward Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 03/21] perf mmap: Recalculate size for overwrite mode Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 04/21] perf mmap: Cleanup perf_mmap__push() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 05/21] perf mmap: Introduce perf_mmap__read_init() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 06/21] perf mmap: Add new return value logic for perf_mmap__read_init() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 07/21] perf mmap: Discard 'prev' in perf_mmap__read() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 08/21] perf mmap: Introduce perf_mmap__read_done() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 09/21] perf mmap: Introduce perf_mmap__read_event() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 10/21] perf test: Update mmap read functions for backward-ring-buffer test Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 11/21] perf mmap: Discard legacy interface for mmap read Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 12/21] perf top: Check per-event overwrite term Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 13/21] perf evsel: Expose the perf_missing_features struct Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 14/21] perf top: Add overwrite fall back Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 15/21] perf hists browser: Add parameter to disable lost event warning Arnaldo Carvalho de Melo
2018-02-06 16:53 ` Arnaldo Carvalho de Melo [this message]
2018-02-06 16:53 ` [PATCH 17/21] perf top: Switch default mode to overwrite mode Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 18/21] perf top: Check the latency of perf_top__mmap_read() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 19/21] perf tools: Substitute yet another strtoull() Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 20/21] perf data: Document missing --force option Arnaldo Carvalho de Melo
2018-02-06 16:53 ` [PATCH 21/21] perf test: Fix test trace+probe_libc_inet_pton.sh for s390x Arnaldo Carvalho de Melo
2018-02-13 11:59 ` [PATCH] tools/headers: Synchronize kernel ABI headers, v4.16-rc1 Ingo Molnar
2018-02-14 13:41 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180206165350.2570-17-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
--cc=yao.jin@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).