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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> >>+};
> >
> >How about moving the stats functions from builtin-stat.c to e.g.
> >util/stats.c, and then reusing them? Then this struct (which I would
> >rename to kvm_event_stats) would look like this
> >
> >struct kvm_event_stats {
> >         u64 time;
> >         struct stats stats;
> >};
> >
> >of course the get_event_ accessor generators would need tweaking
> 
> Given the history of the command (first submitted back in February)
> code refactoring can wait until there is a second user for the stats
> code.

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?

Drew
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux