tools/kvm_stat: group child events indented after parent
authorStefan Raspl <stefan.raspl@de.ibm.com>
Thu, 22 Feb 2018 11:16:29 +0000 (12:16 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 24 Feb 2018 00:43:45 +0000 (01:43 +0100)
commitdf72ecfc790fa01de1c41f836ff51d12f9c40318
tree4b0dfa3f80d4eb3c6730e52136015304b4b6cc38
parent18e8f4100ef14f924514fbd91eb67bd5fa5396b7
tools/kvm_stat: group child events indented after parent

We keep the current logic that sorts all events (parent and child), but
re-shuffle the events afterwards, grouping the children after the
respective parent. Note that the percentage column for child events
gives the percentage of the parent's total.
Since we rework the logic anyway, we modify the total average
calculation to use the raw numbers instead of the (rounded) averages.
Note that this can result in differing numbers (between total average
and the sum of the individual averages) due to rounding errors.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/kvm/kvm_stat/kvm_stat