Skip to content

Commit b048a24

Browse files
Christian Borntraegeracmel
authored andcommitted
perf kvm stat: Properly show submicrosecond times
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. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: David Ahern <dsahern@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org Link: http://lkml.kernel.org/r/1406805231-10675-2-git-send-email-borntraeger@de.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 972f393 commit b048a24

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tools/perf/builtin-kvm.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,8 @@ static void print_result(struct perf_kvm_stat *kvm)
592592
pr_info("%9s ", "Samples%");
593593

594594
pr_info("%9s ", "Time%");
595-
pr_info("%10s ", "Min Time");
596-
pr_info("%10s ", "Max Time");
595+
pr_info("%11s ", "Min Time");
596+
pr_info("%11s ", "Max Time");
597597
pr_info("%16s ", "Avg time");
598598
pr_info("\n\n");
599599

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

0 commit comments

Comments
 (0)