Commit 67c162b0 authored by Stefan Raspl's avatar Stefan Raspl Committed by Paolo Bonzini
Browse files

tools/kvm_stat: fix missing field update after filter change



When updating the fields filter, tracepoint events of fields previously
not visible were not enabled, as TracepointProvider.update_fields()
updated the member variable directly instead of using the setter, which
triggers the event enable/disable.
To reproduce, run 'kvm_stat -f kvm_exit', press 'c' to remove the
filter, and notice that no add'l fields that do not match the regex
'kvm_exit' will appear.
This issue was introduced by commit c469117d ("tools/kvm_stat:
simplify initializers").

Signed-off-by: default avatarStefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent faa06650
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ class TracepointProvider(Provider):

    def update_fields(self, fields_filter):
        """Refresh fields, applying fields_filter"""
        self._fields = [field for field in self.get_available_fields()
        self.fields = [field for field in self.get_available_fields()
                       if self.is_field_wanted(fields_filter, field)]

    @staticmethod