lttng: override kvm events for LTTng27
authorAbder Benbachir <anis.benbachir@gmail.com>
Tue, 26 Jul 2016 20:10:02 +0000 (16:10 -0400)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Mon, 1 Aug 2016 17:06:55 +0000 (13:06 -0400)
kvm event have been changed in the lttng-modules 2.7
due to naming clash.
Those events were hardcoced in the VM Analysis,
now it will be possible for the analysis to use
layout.

Change-Id: I9e23b43111479066a5035a94c03ea53f9740247c
Signed-off-by: Abder Benbachir <anis.benbachir@gmail.com>
Reviewed-on: https://git.eclipse.org/r/77999
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/Lttng27EventLayout.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/LttngEventLayout.java

index b48435f46b0e09ed7a7a343fa5a7d0ac65cfab43..c0b64ed099c1309474b1208333e1a1404391d8c2 100644 (file)
@@ -50,6 +50,11 @@ public class Lttng27EventLayout extends Lttng26EventLayout {
     private static final String X86_IRQ_VECTORS_DEFERRED_ERROR_APIC_EXIT = "x86_irq_vectors_deferred_error_apic_exit";   //$NON-NLS-1$
     private static final String X86_IRQ_VECTORS_THERMAL_APIC_ENTRY = "x86_irq_vectors_thermal_apic_entry";  //$NON-NLS-1$
     private static final String X86_IRQ_VECTORS_THERMAL_APIC_EXIT = "x86_irq_vectors_thermal_apic_exit";  //$NON-NLS-1$
+    /* KVM events */
+    private static final String KVM_X86_ENTRY = "kvm_x86_entry";  //$NON-NLS-1$
+    private static final String KVM_X86_EXIT = "kvm_x86_exit";  //$NON-NLS-1$
+    private static final Collection<String> KVM_ENTRY_EVENTS = ImmutableSet.of(KVM_X86_ENTRY);
+    private static final Collection<String> KVM_EXIT_EVENTS = ImmutableSet.of(KVM_X86_EXIT);
 
     private static final Collection<String> IPI_ENTRY_SET = ImmutableSet.of(
             X86_IRQ_VECTORS_LOCAL_TIMER_ENTRY,
@@ -225,6 +230,16 @@ public class Lttng27EventLayout extends Lttng26EventLayout {
         return X86_IRQ_VECTORS_THERMAL_APIC_EXIT;
     }
 
+    @Override
+    public @NonNull Collection<@NonNull String> eventsKVMEntry() {
+        return KVM_ENTRY_EVENTS;
+    }
+
+    @Override
+    public @NonNull Collection<@NonNull String> eventsKVMExit() {
+        return KVM_EXIT_EVENTS;
+    }
+
     @Override
     public @NonNull Collection<@NonNull String> getIPIIrqVectorsEntries() {
         return IPI_ENTRY_SET;
index 1c23edb5a66d1dee6d13f28c19355ca43da44d7c..770f9908bceace3b2a9bb71d8cfdb838d9d72917 100644 (file)
@@ -19,6 +19,7 @@ import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 
 /**
  * This file defines all the known event and field names for LTTng kernel
@@ -113,6 +114,12 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String[] TCP_ACK_FIELD = { "transport_fields", "thtype_tcp", "ack_seq" };
     private static final String[] TCP_FLAGS_FIELD = { "transport_fields", "thtype_tcp", "flags" };
 
+    /* KVM events */
+    private static final String KVM_ENTRY = "kvm_entry";  //$NON-NLS-1$
+    private static final String KVM_EXIT = "kvm_exit";  //$NON-NLS-1$
+    private static final Collection<String> KVM_ENTRY_EVENTS = ImmutableSet.of(KVM_ENTRY);
+    private static final Collection<String> KVM_EXIT_EVENTS = ImmutableSet.of(KVM_EXIT);
+
     /** All instances are the same. Only provide a static instance getter */
     protected LttngEventLayout() {
     }
@@ -506,4 +513,17 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return TCP_FLAGS_FIELD;
     }
 
+    // ------------------------------------------------------------------------
+    // VirtualMachine events : kvm entry/exit events
+    // ------------------------------------------------------------------------
+
+    @Override
+    public @NonNull Collection<@NonNull String> eventsKVMEntry() {
+        return KVM_ENTRY_EVENTS;
+    }
+
+    @Override
+    public @NonNull Collection<@NonNull String> eventsKVMExit() {
+        return KVM_EXIT_EVENTS;
+    }
 }
This page took 0.027166 seconds and 5 git commands to generate.