Messages in this thread | | | Date | Thu, 26 Apr 2018 08:08:48 +0800 | From | Yu Chen <> | Subject | Re: [PATCH][v5] tools/power turbostat: if --iterations, print for specific count of iterations |
| |
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@intel.com> > > > > 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@kernel.org> > > Cc: Rafael J Wysocki <rjw@rjwysocki.net> > > Cc: Artem Bityutskiy <artem.bityutskiy@intel.com> > > Cc: Doug Smythies <dsmythies@telus.net> > > Cc: linux-pm@vger.kernel.org > > Cc: linux-kernel@vger.kernel.org > > Signed-off-by: Chen Yu <yu.c.chen@intel.com> [cut]... > > + 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@intel.com> > > to the patch (FWIW). > OK, will do, thanks! Yu
| |