[PATCH 4/6] kvm_stat: Fix tracepoint filter definition for s390

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Although we have the exit_reasons defined for s390, as far as I can tell
they never take effect. That is because there is no 'kvm_exit'
tracepoint defined for s390.

What is defined, for all platforms, is 'kvm_userspace_exit'. That
tracepoint uses the generic_exit_reason, but the filter parameter is
'reason'.

So invert the way we setup filters, define it by default for the generic
tracepoint 'kvm_userspace_exit', and let x86 override it. Doing it this
way will also work for powerpc when we add it.

Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
---
 scripts/kvm/kvm_stat | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index 98c81a8..2468a22 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -175,18 +175,22 @@ x86_exit_reasons = {
 }
 
 sc_perf_evt_open = None
-exit_reasons = None
+
+filters = {
+    'kvm_userspace_exit': ('reason', generic_exit_reasons)
+}
 
 def x86_init(flag):
     globals().update({
         'sc_perf_evt_open' : 298,
-        'exit_reasons' : x86_exit_reasons[flag],
+        'filters' : {
+            'kvm_exit': ('exit_reason', x86_exit_reasons[flag])
+        },
     })
 
 def s390_init():
     globals().update({
         'sc_perf_evt_open' : 331,
-        'exit_reasons' : generic_exit_reasons,
     })
 
 def detect_platform():
@@ -204,10 +208,6 @@ def detect_platform():
 
 detect_platform()
 
-filters = {
-    'kvm_exit': ('exit_reason', exit_reasons)
-}
-
 def invert(d):
     return dict((x[1], x[0]) for x in d.iteritems())
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux