Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933173AbeAKVay convert rfc822-to-8bit (ORCPT + 1 other); Thu, 11 Jan 2018 16:30:54 -0500 Received: from mga07.intel.com ([134.134.136.100]:3673 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932667AbeAKVax (ORCPT ); Thu, 11 Jan 2018 16:30:53 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,346,1511856000"; d="scan'208";a="10558873" From: "Liang, Kan" To: Jiri Olsa 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 Thread-Topic: [PATCH V3 11/12] perf top: switch default mode to overwrite mode Thread-Index: AQHTeohZSK4CQZwlmUG35ffo5uw1VKNuVRAAgAD50fA= Date: Thu, 11 Jan 2018 21:30:49 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077537FFC4F@SHSMSX103.ccr.corp.intel.com> References: <1513879734-237492-1-git-send-email-kan.liang@intel.com> <1513879734-237492-12-git-send-email-kan.liang@intel.com> <20180111142608.GF16655@krava> In-Reply-To: <20180111142608.GF16655@krava> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjgyYzU0NWQtNzI0Mi00NjJhLTliMDEtOTMyOGQyZTAzNGNhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Imd5Um5CM003UVVZNnBKS1wvZlFuWG9VK0dPR0FwMktYdWxBa01jYmVEZFwvRT0ifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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 > OK. Will do it. Thanks, Kan > 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 > >