Re: [PATCH/RFC] KVM: perf/stat: Properly show submicrosecond times

2014-07-31 Thread David Ahern

On 7/31/14, 5:13 AM, Christian Borntraeger wrote:

For lots of exits the min time (and sometimes max) is 0 or 1. Lets
increase the accurancy similar to what the average field alread does.


Seems reasonable to me.

Acked-by: David Ahern dsah...@gmail.com




Cc: Paolo Bonzini pbonz...@redhat.com
Cc: Jiri Olsa jo...@kernel.org
Cc: David Ahern dsah...@gmail.com
Cc: Arnaldo Carvalho de Melo a...@kernel.org

Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com
---
  tools/perf/builtin-kvm.c | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 43367eb..fe92dfd 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -592,8 +592,8 @@ static void print_result(struct perf_kvm_stat *kvm)
pr_info(%9s , Samples%);

pr_info(%9s , Time%);
-   pr_info(%10s , Min Time);
-   pr_info(%10s , Max Time);
+   pr_info(%11s , Min Time);
+   pr_info(%11s , Max Time);
pr_info(%16s , Avg time);
pr_info(\n\n);

@@ -610,8 +610,8 @@ static void print_result(struct perf_kvm_stat *kvm)
pr_info(%10llu , (unsigned long long)ecount);
pr_info(%8.2f%% , (double)ecount / kvm-total_count * 100);
pr_info(%8.2f%% , (double)etime / kvm-total_time * 100);
-   pr_info(%8 PRIu64 us , min / 1000);
-   pr_info(%8 PRIu64 us , max / 1000);
+   pr_info(%9.2fus , (double)min / 1e3);
+   pr_info(%9.2fus , (double)max / 1e3);
pr_info(%9.2fus ( +-%7.2f%% ), (double)etime / ecount/1e3,
kvm_event_rel_stddev(vcpu, event));
pr_info(\n);



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


Re: [PATCH/RFC] KVM: perf/stat: Properly show submicrosecond times

2014-07-31 Thread Arnaldo Carvalho de Melo
Em Thu, Jul 31, 2014 at 08:24:03AM -0600, David Ahern escreveu:
 On 7/31/14, 5:13 AM, Christian Borntraeger wrote:
 For lots of exits the min time (and sometimes max) is 0 or 1. Lets
 increase the accurancy similar to what the average field alread does.
 
 Seems reasonable to me.
 
 Acked-by: David Ahern dsah...@gmail.com

Thanks, applied.

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