Received: by 10.223.176.46 with SMTP id f43csp34162wra; Thu, 18 Jan 2018 13:30:58 -0800 (PST) X-Google-Smtp-Source: ACJfBos6wr+w5WeZuX85vqdgT8qbCgAGhIZifJYSMJu04jReu+x3N5aXlwaAImM4mtw1q6eWvhZM X-Received: by 10.98.69.82 with SMTP id s79mr27449178pfa.214.1516311058768; Thu, 18 Jan 2018 13:30:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516311058; cv=none; d=google.com; s=arc-20160816; b=Lng0GgKrsHLMpBAdyrWrF6CUyQ3yLxHl00+WS7wch/EcmJXbkg+tBYf1VeXozWCoSU I9LbvcRa17xESpdBGXS2rylP37gNn2AV4d1bodFHVfaXMOmwsLr+zqytP0IXpuhe0+QP 1c6H9jVGhLK6rdDO+Kfo9+7KWSz/tUu5Vjh1VJiOsaarc6KTFjEh6fKm35HGTiVipKhz HbvDjw5xVQZeMgM6hencyNKH7p7M3Gbw+2+54yL++swVX49UAc6t7DEh1XPb88UKf2NV s64ck7VG0OkbCNBveI511Es7oaW7ZmmWHqwuv3G2oYCJEaabXeikSvvsuEw8QP98Bs6h nfpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=U8C5m/N7hzDerBx6Kd/BVxrFpL9dMYrZ7TYU0S6nEMg=; b=e38BtVJHDa4Y6TwSVYc3d6/ga8MtuE0x1Qmfhi/cUeOPP+M8cPcqDNJcZZ9LsSWg18 5FGL3EnXxOHRDCqwHaJaN0LwipGG2z8FbxWiD31JEXKruvrlD8PvC3vwnB3cRBd4reWx Njhoqx/E+r/ppGjlAScZ6MlnXktFvJqbWodtHmvSOSQYWK6LmnLNM9iyOHgMwVXnmpgc hkoCp+zT64QrQ8kqCpsRYDk8qRbWkM+4GzgCnd3MKISGnFZQr+sh1/How3xyKYffbPv6 JtRkTo/cKRYV2m9UUliSn86GPJQnhypw0/YxQNzy+3Cczb7Flq/UlyLlVTPMN0NjQVjT VAdQ== 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 h26si6935615pgv.636.2018.01.18.13.30.44; Thu, 18 Jan 2018 13:30:58 -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 S1754732AbeARVaF (ORCPT + 99 others); Thu, 18 Jan 2018 16:30:05 -0500 Received: from mga04.intel.com ([192.55.52.120]:47427 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754518AbeARV1k (ORCPT ); Thu, 18 Jan 2018 16:27:40 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2018 13:27:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,378,1511856000"; d="scan'208";a="11477294" Received: from otc-knm-01.jf.intel.com ([10.54.39.34]) by fmsmga008.fm.intel.com with ESMTP; 18 Jan 2018 13:27:37 -0800 From: kan.liang@intel.com To: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: wangnan0@huawei.com, jolsa@kernel.org, namhyung@kernel.org, ak@linux.intel.com, yao.jin@linux.intel.com, Kan Liang Subject: [PATCH V5 15/17] perf top: remove lost events checking Date: Thu, 18 Jan 2018 13:26:30 -0800 Message-Id: <1516310792-208685-16-git-send-email-kan.liang@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1516310792-208685-1-git-send-email-kan.liang@intel.com> References: <1516310792-208685-1-git-send-email-kan.liang@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kan Liang 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 tolerant for perf top. The lost events checking is removed. Signed-off-by: Kan Liang --- 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 c559107..1dd3b63 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.5.5