Received: by 10.223.185.116 with SMTP id b49csp1020615wrg; Fri, 16 Feb 2018 10:57:51 -0800 (PST) X-Google-Smtp-Source: AH8x226151Fhjeku0wzd3Fbp9mLebgNH7rKJtqCjPZjThIKm68hSQNK6zWgVu8qdrw8SR/st0GJF X-Received: by 10.99.115.67 with SMTP id d3mr5988326pgn.223.1518807471025; Fri, 16 Feb 2018 10:57:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518807470; cv=none; d=google.com; s=arc-20160816; b=TDWL4K9pEz/FaRdBQTCZb7h1w/5U01kMpIzgYfERqLvDZzQ+Z3MESw0LDcIeWVNus5 93+DvtIHiwQyFlDuxbOi/NaoZJjoGRENNqKGATIKoJpf+Ihho9NRoaFfiy4VxqfU0Bbh n04lbiQtwXUbBePqaS7YdjruiJL6Egsho5b/tW5mcie0vVhrZUUsmjNK8CsvVumOd53o t5ErUYhLYnYtCeywh0/DUwIYITDZ+ygGc5YNmPcgMYwY3O3o7wUSrReaZ0GLq6ym9VR0 21ZOLi7B77l531eg41WFO3hFJuyv7ctAoRsVomXXHrXhn0+U85zG1sAYMtP8OzV9ezIR igMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=M2/9GauktoZO5EdrnfNecAoeKn7SkFiwQEwtq3tdvBU=; b=bLlk46QiGmlHPWnQgxDyZVMLq3C0eJX9ZiVncSVq0ZRTkbC6m+DxDCupoQ8/VB35Ll tAXX6ok6FO2VbiLMdMWuMMggEx5gDcnEzaFNNti4b6J1yVm2TtEyFRB8NDK5ebgukivZ NHDN/DCzF0ytKDXGIBIzTd1J+TogIoJ6JudAVRDu+6aKc4B6ZvTAeU7xV78iFkaT8hxC hSlwZNFxI9w0OAtmh7eOo9GgSOk2KtOfjHF7fOB83LfTlSrzCIAgMwLaufMgYJoo3iq4 vBGGVCijOP59h5LFI1AUcKZs7qv5nkqaQ8wUf7h57GK+aPXHswuxp7s1fas82wUUo+Al 7FVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 126si2370648pfd.48.2018.02.16.10.57.36; Fri, 16 Feb 2018 10:57:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932933AbeBPJwg (ORCPT + 99 others); Fri, 16 Feb 2018 04:52:36 -0500 Received: from terminus.zytor.com ([198.137.202.136]:39171 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932851AbeBPJwa (ORCPT ); Fri, 16 Feb 2018 04:52:30 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w1G9f9IM022566; Fri, 16 Feb 2018 01:41:09 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w1G9f9ch022563; Fri, 16 Feb 2018 01:41:09 -0800 Date: Fri, 16 Feb 2018 01:41:09 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Kan Liang Message-ID: Cc: yao.jin@linux.intel.com, acme@redhat.com, tglx@linutronix.de, ak@linux.intel.com, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, wangnan0@huawei.com, namhyung@kernel.org, kan.liang@intel.com, jolsa@kernel.org, peterz@infradead.org Reply-To: ak@linux.intel.com, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, yao.jin@linux.intel.com, acme@redhat.com, jolsa@kernel.org, peterz@infradead.org, wangnan0@huawei.com, namhyung@kernel.org, kan.liang@intel.com In-Reply-To: <1516310792-208685-16-git-send-email-kan.liang@intel.com> References: <1516310792-208685-16-git-send-email-kan.liang@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf top: Remove lost events checking Git-Commit-ID: a1ff5b05e988ca3620027148cd61013408ea4194 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a1ff5b05e988ca3620027148cd61013408ea4194 Gitweb: https://git.kernel.org/tip/a1ff5b05e988ca3620027148cd61013408ea4194 Author: Kan Liang AuthorDate: Thu, 18 Jan 2018 13:26:30 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 15 Feb 2018 09:56:43 -0300 perf top: Remove lost events checking 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 Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1516310792-208685-16-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- 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 7def861..5965306 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;