Re: [PATCH v3 2/2] perf stat: add interval printing

2013-01-18 Thread Stephane Eranian
On Fri, Jan 18, 2013 at 7:30 PM, Andi Kleen wrote: >> if (forks) { >> close(go_pipe[1]); >> + if (interval) { >> + while (!waitpid(child_pid, &status, WNOHANG)) { >> + ret = nanosleep(&ts, NULL); >> +

Re: [PATCH v3 2/2] perf stat: add interval printing

2013-01-18 Thread Andi Kleen
> if (forks) { > close(go_pipe[1]); > + if (interval) { > + while (!waitpid(child_pid, &status, WNOHANG)) { > + ret = nanosleep(&ts, NULL); > + if (ret == 0 && interval) > +

[PATCH v3 2/2] perf stat: add interval printing

2013-01-18 Thread Stephane Eranian
This patch adds a new printing mode for perf stat. It allows internval printing. That means perf stat can now print event deltas at regular time interval. This is useful to detect phases in programs. The -I option enables interval printing. It expects an interval duration in milliseconds. Minimum