Re: [PATCH 10/13] perf kvm: add live mode

2013-05-10 Thread Ingo Molnar
* David Ahern wrote: > >2) > > > >Another suggestion: it would be nice to allow a "--repeat " option as > >well, for a limited number of iterations - similar to what the 'top' tool > >allows: > > > > top -b -d -n > > > >--repeat 0 means infinite repeats, --repeat 1 means a single step. > >

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread David Ahern
On 5/9/13 6:28 PM, Namhyung Kim wrote: Hi David, On Thu, 09 May 2013 07:54:26 -0600, David Ahern wrote: On 5/9/13 2:51 AM, Ingo Molnar wrote: 2) Another suggestion: it would be nice to allow a "--repeat " option as well, for a limited number of iterations - similar to what the 'top' tool allo

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread Namhyung Kim
Hi David, On Thu, 09 May 2013 07:54:26 -0600, David Ahern wrote: > On 5/9/13 2:51 AM, Ingo Molnar wrote: >> 2) >> >> Another suggestion: it would be nice to allow a "--repeat " option as >> well, for a limited number of iterations - similar to what the 'top' tool >> allows: >> >>top -b -d -n

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread David Ahern
On 5/9/13 2:45 AM, Namhyung Kim wrote: On Wed, 8 May 2013 22:31:46 -0600, David Ahern wrote: [SNIP] +static int perf_kvm__timerfd_create(struct perf_kvm_stat *kvm) +{ + struct itimerspec new_value; + struct timespec now; + int rc = -1; + + kvm->timerfd = timerfd_create(C

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread David Ahern
On 5/9/13 2:51 AM, Ingo Molnar wrote: 1) Regarding the basic syntax - is the 'perf stat kvm' command already used up? If not then it might make sense to alias 'perf kvm stat live' to 'perf kvm stat', making it really easy to use: perf kvm stat perf kvm stat -p etc. I'd expect most 'perf

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread David Ahern
On 5/9/13 6:32 AM, Runzhen wrote: Hi, David, Xiao Guangrong forward your patch to me two month ago, it is originally at https://github.com/dsahern/linux.git. However, those patches were based on an old linux tree, they can't be applied to current linux tree, so I try to fix the conflicts on the

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread Runzhen
Hi, David, Xiao Guangrong forward your patch to me two month ago, it is originally at https://github.com/dsahern/linux.git. However, those patches were based on an old linux tree, they can't be applied to current linux tree, so I try to fix the conflicts on the latest Arnaldo Carvalho de Mel

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread Ingo Molnar
* David Ahern wrote: > perf kvm stat currently requires back to back record and report > commands to see stats. e.g,. > > perf kvm stat record -p $pid -- sleep 1 > perf kvm stat report > > This is inconvenvient for on box monitoring of a VM. This patch > introduces a 'live' mode that in ef

Re: [PATCH 10/13] perf kvm: add live mode

2013-05-09 Thread Namhyung Kim
On Wed, 8 May 2013 22:31:46 -0600, David Ahern wrote: [SNIP] > +static int perf_kvm__timerfd_create(struct perf_kvm_stat *kvm) > +{ > + struct itimerspec new_value; > + struct timespec now; > + int rc = -1; > + > + kvm->timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); > +

[PATCH 10/13] perf kvm: add live mode

2013-05-08 Thread David Ahern
perf kvm stat currently requires back to back record and report commands to see stats. e.g,. perf kvm stat record -p $pid -- sleep 1 perf kvm stat report This is inconvenvient for on box monitoring of a VM. This patch introduces a 'live' mode that in effect combines the record plus report int