Skip to content

Commit 111d0bd

Browse files
Stefan Rasplbonzini
authored andcommitted
tools/kvm_stat: Exempt time-based counters
The new counters halt_poll_success_ns and halt_poll_fail_ns do not count events. Instead they provide a time, and mess up our statistics. Therefore, we should exclude them. Removal is currently implemented with an exempt list. If more counters like these appear, we can think about a more general rule like excluding all fields name "*_ns", in case that's a standing convention. Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Tested-and-reported-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20201208210829.101324-1-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 34c0f6f commit 111d0bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/kvm/kvm_stat/kvm_stat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,11 @@ class DebugfsProvider(Provider):
742742
The fields are all available KVM debugfs files
743743
744744
"""
745-
return self.walkdir(PATH_DEBUGFS_KVM)[2]
745+
exempt_list = ['halt_poll_fail_ns', 'halt_poll_success_ns']
746+
fields = [field for field in self.walkdir(PATH_DEBUGFS_KVM)[2]
747+
if field not in exempt_list]
748+
749+
return fields
746750

747751
def update_fields(self, fields_filter):
748752
"""Refresh fields, applying fields_filter"""

0 commit comments

Comments
 (0)