]> Git Repo - linux.git/commitdiff
tools/kvm_stat: Exempt time-based counters
authorStefan Raspl <[email protected]>
Tue, 8 Dec 2020 21:08:29 +0000 (22:08 +0100)
committerPaolo Bonzini <[email protected]>
Sat, 12 Dec 2020 00:18:51 +0000 (19:18 -0500)
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 <[email protected]>
Tested-and-reported-by: Christian Borntraeger <[email protected]>
Message-Id: <20201208210829[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
tools/kvm/kvm_stat/kvm_stat

index d199a3694be8a2426deef253da0c34bb642d9b95..b0bf56c5f12021c9e994f03aad9390e43484778a 100755 (executable)
@@ -742,7 +742,11 @@ class DebugfsProvider(Provider):
         The fields are all available KVM debugfs files
 
         """
         The fields are all available KVM debugfs files
 
         """
-        return self.walkdir(PATH_DEBUGFS_KVM)[2]
+        exempt_list = ['halt_poll_fail_ns', 'halt_poll_success_ns']
+        fields = [field for field in self.walkdir(PATH_DEBUGFS_KVM)[2]
+                  if field not in exempt_list]
+
+        return fields
 
     def update_fields(self, fields_filter):
         """Refresh fields, applying fields_filter"""
 
     def update_fields(self, fields_filter):
         """Refresh fields, applying fields_filter"""
This page took 0.051021 seconds and 4 git commands to generate.