Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-14 Thread David Ahern
On 9/13/12 8:56 PM, Xiao Guangrong wrote: We'd better keep the record/report function, sometimes, we can only get perf.data from the customers whose machine can not be reached for us. Especially, other tracepoints are also interesting for us when the customers encounter the performance issue,

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-13 Thread Arnaldo Carvalho de Melo
Em Wed, Sep 12, 2012 at 10:56:44PM -0600, David Ahern escreveu: static const char * const kvm_usage[] = { +perf kvm [options] {top|record|report|diff|buildid-list|stat}, The usage for the report/record sub commands of stat is never shown. e.g., $ perf kvm stat -- shows help for

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-13 Thread David Ahern
On 9/13/12 7:45 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Sep 12, 2012 at 10:56:44PM -0600, David Ahern escreveu: static const char * const kvm_usage[] = { +perf kvm [options] {top|record|report|diff|buildid-list|stat}, The usage for the report/record sub commands of stat is never

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-13 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 13, 2012 at 08:14:37AM -0600, David Ahern escreveu: On 9/13/12 7:45 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Sep 12, 2012 at 10:56:44PM -0600, David Ahern escreveu: So, I spent a fair amount of time today implementing a live mode. And after a lot of swearing at the tracepoint

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-13 Thread Xiao Guangrong
On 09/13/2012 12:56 PM, David Ahern wrote: That suggests what is really needed is a 'live' mode - a continual updating of the output like perf top, not a record and analyze later mode. Which does come back to why I responded to this email -- the syntax is klunky and awkward. So, I

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-12 Thread David Ahern
static const char * const kvm_usage[] = { -perf kvm [options] {top|record|report|diff|buildid-list}, +perf kvm [options] {top|record|report|diff|buildid-list|stat}, NULL }; The usage for the report/record sub commands of stat is never shown. e.g., $ perf kvm stat -- shows

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-03 Thread don
于 2012年08月31日 02:29, David Ahern 写道: In addition to Andrew's comment about making the stats struct and functions generic... Yes. :-) On 8/27/12 3:51 AM, Dong Hao wrote: ---8--- +static void exit_event_decode_key(struct event_key *key, char decode[20]) +{ + const char *exit_reason =

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-03 Thread David Ahern
On 9/3/12 2:48 AM, don wrote: 于 2012年08月31日 02:29, David Ahern 写道: In addition to Andrew's comment about making the stats struct and functions generic... Yes. :-) On 8/27/12 3:51 AM, Dong Hao wrote: ---8--- +static void exit_event_decode_key(struct event_key *key, char decode[20]) +{ +

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-02 Thread don
于 2012年08月27日 23:53, Andrew Jones 写道: On Mon, Aug 27, 2012 at 05:51:46PM +0800, Dong Hao wrote: snip +struct event_stats { + u64 count; + u64 time; + + /* used to calculate stddev. */ + double mean; + double M2; +}; How about moving the stats functions from

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-30 Thread David Ahern
In addition to Andrew's comment about making the stats struct and functions generic... On 8/27/12 3:51 AM, Dong Hao wrote: ---8--- +static void exit_event_decode_key(struct event_key *key, char decode[20]) +{ + const char *exit_reason = get_exit_reason(key-key); + +

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-28 Thread Andrew Jones
On Mon, Aug 27, 2012 at 01:34:36PM -0600, David Ahern wrote: On 8/27/12 9:53 AM, Andrew Jones wrote: On Mon, Aug 27, 2012 at 05:51:46PM +0800, Dong Hao wrote: snip +struct event_stats { + u64 count; + u64 time; + + /* used to calculate stddev. */ + double mean; + double M2;

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-28 Thread David Ahern
On 8/28/12 12:35 AM, Andrew Jones wrote: This is the second user. As I said, move the stats code from builtin-stat.c. Or are you suggesting to duplicate the code once, and then refactor the second (really the third) time it's needed? gah, I misunderstood your comment. I see your point now.

[PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Dong Hao
From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Add 'perf kvm stat' support to analyze kvm vmexit/mmio/ioport smartly Usage: - kvm stat run a command and gather performance counter statistics, it is the alias of perf stat - trace kvm events: perf kvm stat record, or, if other

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread Andrew Jones
On Mon, Aug 27, 2012 at 05:51:46PM +0800, Dong Hao wrote: snip +struct event_stats { + u64 count; + u64 time; + + /* used to calculate stddev. */ + double mean; + double M2; +}; How about moving the stats functions from builtin-stat.c to e.g. util/stats.c, and then

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread David Ahern
On 8/27/12 9:53 AM, Andrew Jones wrote: On Mon, Aug 27, 2012 at 05:51:46PM +0800, Dong Hao wrote: snip +struct event_stats { + u64 count; + u64 time; + + /* used to calculate stddev. */ + double mean; + double M2; +}; How about moving the stats functions from

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-24 Thread David Ahern
This one does not apply to Arnaldo's current perf/core branch. Please rebase. David On 8/23/12 7:15 PM, Dong Hao wrote: From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Add 'perf kvm stat' support to analyze kvm vmexit/mmio/ioport smartly Usage: - kvm stat run a command and gather

[PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-23 Thread Dong Hao
From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Add 'perf kvm stat' support to analyze kvm vmexit/mmio/ioport smartly Usage: - kvm stat run a command and gather performance counter statistics, it is the alias of perf stat - trace kvm events: perf kvm stat record, or, if other