Re: [PATCH][v5] tools/power turbostat: if --iterations, print for specific count of iterations
From: Yu Chen
Date: Wed Apr 25 2018 - 20:03:55 EST
On Mon, Apr 23, 2018 at 10:48:39AM +0200, Rafael J. Wysocki wrote:
> On Saturday, April 14, 2018 6:10:55 AM CEST Yu Chen wrote:
> > From: Chen Yu <yu.c.chen@xxxxxxxxx>
> > There's a use case during test to only print specific round of iterations
> > if --iterations is specified, for example, with this patch applied:
> > turbostat -i 5 -r 4
> > will capture 4 samples with 5 seconds interval.
> > Cc: Len Brown <lenb@xxxxxxxxxx>
> > Cc: Rafael J Wysocki <rjw@xxxxxxxxxxxxx>
> > Cc: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxx>
> > Cc: Doug Smythies <dsmythies@xxxxxxxxx>
> > Cc: linux-pm@xxxxxxxxxxxxxxx
> > Cc: linux-kernel@xxxxxxxxxxxxxxx
> > Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
> > + if (iterations && (++done_iters >= iterations))
> The inner parens are not needed here (and similarly below).
> If you fix this little one, please feel free to add
> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> to the patch (FWIW).
OK, will do, thanks!