lkml.org 
[lkml]   [2020]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
>

\
 
 \ /
  Last update: 2020-06-25 19:14    [W:0.086 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site