提交 67c162b0 编写于 作者: S Stefan Raspl 提交者: Paolo Bonzini

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: NStefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 faa06650
......@@ -549,8 +549,8 @@ class TracepointProvider(Provider):
def update_fields(self, fields_filter):
"""Refresh fields, applying fields_filter"""
self._fields = [field for field in self.get_available_fields()
if self.is_field_wanted(fields_filter, field)]
self.fields = [field for field in self.get_available_fields()
if self.is_field_wanted(fields_filter, field)]
@staticmethod
def get_online_cpus():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册