scripts/kvm/kvm_stat: Cleanup and pre-init perf_event_attr
commit00842aaca5265a57b0a1f0248bde2f77f986e352
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Mon, 11 Jan 2016 15:17:59 +0000 (11 16:17 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Jan 2016 14:58:13 +0000 (26 15:58 +0100)
tree3699152d52b64c7b13dd1bb63201f2868c05f617
parentc887d9a25e877afe135e94fe582d5c58a2fd4ee2
scripts/kvm/kvm_stat: Cleanup and pre-init perf_event_attr

All initializations of the ctypes struct that don't need additional
information were moved to its init method. The unneeded
initializations for sample_type and sample_period were removed as they
do not affect the counters that are read.

This improves readability of the setup_event_attribute by halfing its
LOC.

Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Message-Id: <1452525484-32309-30-git-send-email-frankja@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/kvm/kvm_stat