Received: by 10.223.185.116 with SMTP id b49csp3562957wrg; Tue, 13 Feb 2018 04:21:46 -0800 (PST) X-Google-Smtp-Source: AH8x226xeEjVW3ca8ofYlayH1duOCPBkYJyJWAu7LnGheH4uzIyELNOJ7Sup+TNxYchVm6MMmyze X-Received: by 10.99.148.17 with SMTP id m17mr850060pge.367.1518524505934; Tue, 13 Feb 2018 04:21:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518524505; cv=none; d=google.com; s=arc-20160816; b=zv1aDdjfIY5K64CfYJgKk99lqiC56aEZa7H5BbZpgsR8a0os/Lzs8pW2dk8HyoAo0P IYfk4hPIM12aP6AyfwF6TMpJLse2jByIz9RPq+g0AzQB5qJyFDrVMqNaBzUbUZOine3D 3KRlXtfgR1VH9yFWOKQa3XeL+u/r44ui4iVN1+B6ZqF+xFLKxPNnQ6fYCk8SBUdmT2eU qLAg2BoF5n3o+O4Pkx4dvTX0ti9U8kcXgaKYQiLpQVIrh82rLwnqvg/438PZurVxmvaV QWCIGuVNpb5ANqA6oR4lwAz9SzTSi5DuTghvK1AtpJD5Hem60Qrm+L4i15WUeLXWAk6i 80WA== 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=Oc2VVy1QgIvtOhF11zUNhE+kgqAAf2V8pOZOMEv4owk=; b=wwTtOgE1qC+DmqazbifEApgdlRHkxH+71LNkxD0RbCqTuYNHNSZgPw7GYYJ9qlui0w qegZIfbLE8CNrFIGjngeezzVfiNCnYxbk/i2mLhCBvuQYkkOYhfk//0/ajLv/A04BVQZ 6bW8gjzMSHfWxgAUSgzuEeh1hxbuJME1dQPua0wJTxxm4gBl79ilnTO1Ici4efvCWY0X HwzaNWRJD2mhbzlou7w9u+5IXQWqg1Ohl4GUnOGiPJpp2kT54Tejn39IKUmLgu3c2B5x ggAZfo8E4RnNZyTq9iiII/6GluxhHv97TBlGD0KXOVoMQUKpj05bl2XZ1lspiZiQrykO epsg== 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 u136si1656493pgc.481.2018.02.13.04.21.31; Tue, 13 Feb 2018 04:21:45 -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 S935063AbeBMMUz (ORCPT + 99 others); Tue, 13 Feb 2018 07:20:55 -0500 Received: from terminus.zytor.com ([198.137.202.136]:60427 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934827AbeBMMUy (ORCPT ); Tue, 13 Feb 2018 07:20:54 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w1DCAT3Y029476; Tue, 13 Feb 2018 04:10:29 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w1DCASIR029473; Tue, 13 Feb 2018 04:10:28 -0800 Date: Tue, 13 Feb 2018 04:10:28 -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: peterz@infradead.org, hpa@zytor.com, jolsa@kernel.org, yao.jin@linux.intel.com, acme@redhat.com, tglx@linutronix.de, kan.liang@intel.com, wangnan0@huawei.com, ak@linux.intel.com, mingo@kernel.org, linux-kernel@vger.kernel.org, namhyung@kernel.org Reply-To: hpa@zytor.com, jolsa@kernel.org, peterz@infradead.org, kan.liang@intel.com, acme@redhat.com, tglx@linutronix.de, yao.jin@linux.intel.com, ak@linux.intel.com, wangnan0@huawei.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org 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: c14dec366b440fe46f35f99215434f3f9277e19b 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: c14dec366b440fe46f35f99215434f3f9277e19b Gitweb: https://git.kernel.org/tip/c14dec366b440fe46f35f99215434f3f9277e19b Author: Kan Liang AuthorDate: Thu, 18 Jan 2018 13:26:30 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 6 Feb 2018 10:11:51 -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;