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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200625171300.GK2719003@krava>
Date:   Thu, 25 Jun 2020 19:13:00 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Alexey Budankov <alexey.budankov@...ux.intel.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 04/13] perf stat: factor out body of event handling
 loop for system wide

On Thu, Jun 25, 2020 at 07:01:08PM +0300, Alexey Budankov wrote:

SNIP

> >>
> >> Well, ok.
> >>
> >> I will rename process_interval() to __process_interval() and
> >> then print_interval() to process_interval().
> >>
> >> Regarding timeout let's have it like this:
> >>
> >> static bool process_timeout(int timeout)
> >> {
> >> 	return timeout ? true : false;
> >> }
> > 
> > can't this just stay as value check after finished poll?
> > 
> > 	if (timeout)
> > 		break;
> > 
> > and then separate call to process_interval(interval, times)?
> 
> Like this? Still makes sense to have it in a single function.
> 
> static bool process_timing_settings(int timeout, unsigned int interval, int *times)
> {
> 	bool res = timeout ? true : false;
>         if (!res)
>  		res = process_interval(interval, times);
>  	return res;
> }

I don't see the connection between timeout and interval
IMO this just complicates things, is there a problem to
keep it separated as it is now?

jirka

> 
> ~Alexey
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ