aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/timing.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/timing.c')
-rw-r--r--arch/powerpc/kvm/timing.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/arch/powerpc/kvm/timing.c b/arch/powerpc/kvm/timing.c
index 18f40fd3e98f..319177df9587 100644
--- a/arch/powerpc/kvm/timing.c
+++ b/arch/powerpc/kvm/timing.c
@@ -151,17 +151,30 @@ static int kvmppc_exit_timing_show(struct seq_file *m, void *private)
151{ 151{
152 struct kvm_vcpu *vcpu = m->private; 152 struct kvm_vcpu *vcpu = m->private;
153 int i; 153 int i;
154 u64 min, max, sum, sum_quad;
154 155
155 seq_printf(m, "%s", "type count min max sum sum_squared\n"); 156 seq_printf(m, "%s", "type count min max sum sum_squared\n");
156 157
158
157 for (i = 0; i < __NUMBER_OF_KVM_EXIT_TYPES; i++) { 159 for (i = 0; i < __NUMBER_OF_KVM_EXIT_TYPES; i++) {
160
161 min = vcpu->arch.timing_min_duration[i];
162 do_div(min, tb_ticks_per_usec);
163 max = vcpu->arch.timing_max_duration[i];
164 do_div(max, tb_ticks_per_usec);
165 sum = vcpu->arch.timing_sum_duration[i];
166 do_div(sum, tb_ticks_per_usec);
167 sum_quad = vcpu->arch.timing_sum_quad_duration[i];
168 do_div(sum_quad, tb_ticks_per_usec);
169
158 seq_printf(m, "%12s %10d %10lld %10lld %20lld %20lld\n", 170 seq_printf(m, "%12s %10d %10lld %10lld %20lld %20lld\n",
159 kvm_exit_names[i], 171 kvm_exit_names[i],
160 vcpu->arch.timing_count_type[i], 172 vcpu->arch.timing_count_type[i],
161 vcpu->arch.timing_min_duration[i], 173 min,
162 vcpu->arch.timing_max_duration[i], 174 max,
163 vcpu->arch.timing_sum_duration[i], 175 sum,
164 vcpu->arch.timing_sum_quad_duration[i]); 176 sum_quad);
177
165 } 178 }
166 return 0; 179 return 0;
167} 180}