scripts/kvm/kvm_stat: Encapsulate filters variable
commitdd0b6a4e101e57f0495b71b03be8217c0df1af14
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Mon, 11 Jan 2016 15:17:51 +0000 (11 16:17 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Jan 2016 14:58:13 +0000 (26 15:58 +0100)
tree79be2c4d284cc3b78d5b33b7078a93df5e226174
parent357bc1e74fc8af96530148d52dd9ccc8e626f000
scripts/kvm/kvm_stat: Encapsulate filters variable

The variable was only used in one class but still was defined
globally. Additionaly the detect_platform routine which prepares the
data that goes into the variable was called on each start of the
script, no matter if the class was needed.

To make the variable local to the TracepointProvider class, a new
function that calls detect_platform and returns the filters was
introduced.

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