lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/2] perf stat: Add support to print counts after a period of time
Em Thu, Feb 15, 2018 at 10:39:21AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Jan 29, 2018 at 10:25:23AM +0100, ufo19890607 escreveu:
> > From: yuzhoujian <yuzhoujian@didichuxing.com>
> >
> > Introduce a new option to print counts after N milliseconds
>
> This doesn't just print counts after N ms, it _stops_ the workload after
> that time _and_ prints the counts, right?
>
> Can you please send a followup patch fixing the description and
> documentation?
>
> I've applied this already, but clarifying what this option does is in
> demand.

So, this fails to build on centos:5 and centos:6 and similar systems
where the use of 'time' for a variable name breaks the build:

CC /tmp/build/perf/builtin-stat.o
cc1: warnings being treated as errors
builtin-stat.c: In function '__run_perf_stat':
builtin-stat.c:576: warning: declaration of 'time' shadows a global declaration
/usr/include/time.h:187: warning: shadowed declaration is here
builtin-stat.c: In function 'cmd_stat':
builtin-stat.c:2710: warning: declaration of 'time' shadows a global declaration
/usr/include/time.h:187: warning: shadowed declaration is here
mv: cannot stat `/tmp/build/perf/.builtin-stat.o.tmp': No such file or directory
make[3]: *** [/tmp/build/perf/builtin-stat.o] Error 1
make[3]: *** Waiting for unfinished jobs....
MKDIR /tmp/build/perf/util/
CC /tmp/build/perf/util/evsel_fprintf.o
make[2]: *** [/tmp/build/perf/perf-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....

So since I had to rename that I replaced it with 'timeout', so that it
gets clear that when you specify this option you are setting a timeout
period that if hit will stop the 'perf stat' session and then print the
specified counters.

Please let us know if you have any strong objection to this,

- Arnaldo

\
 
 \ /
  Last update: 2018-02-16 14:19    [W:0.063 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site