Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934348AbeAKO0R (ORCPT + 1 other); Thu, 11 Jan 2018 09:26:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933486AbeAKO0O (ORCPT ); Thu, 11 Jan 2018 09:26:14 -0500 Date: Thu, 11 Jan 2018 15:26:08 +0100 From: Jiri Olsa To: kan.liang@intel.com Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, wangnan0@huawei.com, jolsa@kernel.org, namhyung@kernel.org, ak@linux.intel.com, yao.jin@linux.intel.com Subject: Re: [PATCH V3 11/12] perf top: switch default mode to overwrite mode Message-ID: <20180111142608.GF16655@krava> References: <1513879734-237492-1-git-send-email-kan.liang@intel.com> <1513879734-237492-12-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513879734-237492-12-git-send-email-kan.liang@intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 11 Jan 2018 14:26:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Dec 21, 2017 at 10:08:53AM -0800, kan.liang@intel.com wrote: SNIP > .max_stack = sysctl_perf_event_max_stack, > .sym_pcnt_filter = 5, > diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c > index 68146f4..56023e4 100644 > --- a/tools/perf/ui/browsers/hists.c > +++ b/tools/perf/ui/browsers/hists.c > @@ -638,8 +638,13 @@ int hist_browser__run(struct hist_browser *browser, const char *help) > nr_entries = hist_browser__nr_entries(browser); > ui_browser__update_nr_entries(&browser->b, nr_entries); > > - if (browser->hists->stats.nr_lost_warned != > - browser->hists->stats.nr_events[PERF_RECORD_LOST]) { > + /* > + * Don't print lost events warning for perf top, > + * because it is overwrite mode. > + * Perf top is the only tool which has hbt timer. > + */ I hate that warning, but still should it be ommited only for overwrite case? also please separate this change from the rest of the patch jirka > + if ((browser->hists->stats.nr_lost_warned != > + browser->hists->stats.nr_events[PERF_RECORD_LOST]) && !hbt) { > browser->hists->stats.nr_lost_warned = > browser->hists->stats.nr_events[PERF_RECORD_LOST]; > ui_browser__warn_lost_events(&browser->b); > @@ -3203,7 +3208,8 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu, > case K_TIMER: > hbt->timer(hbt->arg); > > - if (!menu->lost_events_warned && menu->lost_events) { > + if (!menu->lost_events_warned && > + menu->lost_events && !hbt) { > ui_browser__warn_lost_events(&menu->b); > menu->lost_events_warned = true; > } > -- > 2.5.5 >