lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07753801591@SHSMSX103.ccr.corp.intel.com>
Date:   Wed, 17 Jan 2018 14:39:39 +0000
From:   "Liang, Kan" <kan.liang@...el.com>
To:     Namhyung Kim <namhyung@...nel.org>
CC:     "acme@...nel.org" <acme@...nel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "wangnan0@...wei.com" <wangnan0@...wei.com>,
        "jolsa@...nel.org" <jolsa@...nel.org>,
        "ak@...ux.intel.com" <ak@...ux.intel.com>,
        "yao.jin@...ux.intel.com" <yao.jin@...ux.intel.com>,
        "kernel-team@....com" <kernel-team@....com>
Subject: RE: [PATCH V4 12/15] perf hists browser: add parameter to disable
 lost event warning

> Hi,
> 
> On Mon, Jan 15, 2018 at 12:20:48PM -0800, kan.liang@...el.com wrote:
> > From: Kan Liang <kan.liang@...el.com>
> >
> > For overwrite mode, the ringbuffer will be paused. The event lost is
> > expected. It needs a way to notify the browser not print the warning.
> >
> > It will be used later for perf top to disable lost event warning in
> > overwrite mode. There is no behavior change for now.
> >
> > Signed-off-by: Kan Liang <kan.liang@...el.com>
> > ---
> 
> [SNIP]
> > diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> > index 68146f4..e458920 100644
> > --- a/tools/perf/ui/browsers/hists.c
> > +++ b/tools/perf/ui/browsers/hists.c
> > @@ -608,7 +608,8 @@ static int hist_browser__title(struct hist_browser
> *browser, char *bf, size_t si
> >  	return browser->title ? browser->title(browser, bf, size) : 0;
> >  }
> >
> > -int hist_browser__run(struct hist_browser *browser, const char *help)
> > +int hist_browser__run(struct hist_browser *browser, const char *help,
> > +		      bool no_lost_event_warning)
> >  {
> >  	int key;
> >  	char title[160];
> > @@ -638,8 +639,9 @@ 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]) {
> > +			if (!no_lost_event_warning &&
> 
> Double negation is always confusing (at least for me), why not making
> it "warn_lost_event"?
> 

OK. I will change it in V5.

Thanks,
Kan

> Thanks,
> Namhyung
> 
> 
> > +			    (browser->hists->stats.nr_lost_warned !=
> > +			    browser->hists-
> >stats.nr_events[PERF_RECORD_LOST])) {
> >  				browser->hists->stats.nr_lost_warned =
> >  					browser->hists-
> >stats.nr_events[PERF_RECORD_LOST];
> >  				ui_browser__warn_lost_events(&browser-
> >b);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ