os.linux: Rename the "kernelanalysis" package to just "kernel"
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Tue, 15 Mar 2016 21:09:55 +0000 (17:09 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Sun, 20 Mar 2016 04:20:11 +0000 (00:20 -0400)
Long due change that was previously withheld to not break the API.
This aligns the naming with the other internal packages, which
were already renamed.

Change-Id: I9a0b3354e7018fa67f5baf7eb8a8522e1553f881
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/68559
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
74 files changed:
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.xml
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/contextswitch/ContextSwitchProviderTest.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/CpuUsageStateProviderTest.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelStateProviderTest.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelThreadInformationProviderTest.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelTidAspectTest.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/stubs/org/eclipse/tracecompass/analysis/os/linux/core/tests/stubs/trace/TmfXmlKernelTraceStub.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/META-INF/MANIFEST.MF
analysis/org.eclipse.tracecompass.analysis.os.linux.core/plugin.xml
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/contextswitch/KernelContextSwitchAnalysis.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/contextswitch/KernelContextSwitchStateProvider.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageStateProvider.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/Attributes.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelAnalysisModule.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelThreadInformationProvider.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelTidAspect.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/LinuxValues.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/Messages.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/StateValues.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/ThreadPriorityAspect.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/messages.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/LinuxValues.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java [deleted file]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/latency/SystemCallLatencyAnalysis.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/IrqEntryHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/KernelEventHandlerUtils.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/PiSetprioHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/ProcessForkHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SchedSwitchHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SchedWakeupHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SoftIrqEntryHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SoftIrqExitHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SoftIrqRaiseHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/StateDumpHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SysEntryHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/SysExitHandler.java
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowCheckActiveProvider.java
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageComposite.java
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesPresentationProvider.java
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/perf/org/eclipse/tracecompass/lttng2/kernel/core/tests/perf/analysis/kernel/KernelAnalysisBenchmark.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/perf/org/eclipse/tracecompass/lttng2/kernel/core/tests/perf/analysis/kernel/KernelAnalysisModuleNullBeStub.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/kernel/LttngKernelAnalysisTest.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/kernel/statesystem/GenerateTestValues.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/kernel/statesystem/PartialStateSystemTest.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/kernel/statesystem/StateSystemFullHistoryTest.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/kernel/statesystem/StateSystemInMemoryTest.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/kernel/statesystem/StateSystemTest.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/vm/VirtualMachineAnalysisTest.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/analysis/graph/handlers/TraceEventHandlerExecutionGraph.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/analysis/graph/handlers/TraceEventHandlerSched.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/analysis/graph/model/LttngWorker.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/analysis/vm/model/qemukvm/QemuKvmVmModel.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/analysis/vm/module/VirtualMachineCpuAnalysis.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/analysis/vm/module/VirtualMachineStateProvider.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/lttng2/kernel/core/trace/LttngKernelTrace.java
lttng/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/views/vm/vcpuview/VirtualMachinePresentationProvider.java
lttng/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/views/vm/vcpuview/VirtualMachineView.java

index a0fc7a1378b9b1dbe2b91ee695a66bd4a8039f32..11d77441b036eac965e89e1bbc8022eca5706e82 100644 (file)
@@ -14,7 +14,7 @@
          </tracetype>
       </module>
       <module
-            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule"
+            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule"
             automatic="false"
             id="org.eclipse.tracecompass.analysis.os.linux.kernel"
             name="Linux Kernel Test Analysis">
index e9870dbbf856b0f7316cec815e111724835f9591..07c4514020db46dbd61544d7437299899c718502 100644 (file)
@@ -24,7 +24,7 @@ import java.util.Map;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.tracecompass.analysis.os.linux.core.contextswitch.KernelContextSwitchAnalysis;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
 import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
 import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.trace.TmfXmlKernelTraceStub;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
index 875cc12fcbd5c4292f895ad339e22183de6ebf88..3290053a1fc3dd1d9b6c2c594c6af26cb1834a7d 100644 (file)
@@ -29,8 +29,8 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
 import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.trace.TmfXmlKernelTraceStub;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelStateProviderTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelStateProviderTest.java
new file mode 100644 (file)
index 0000000..aae65eb
--- /dev/null
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
+ * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernel;
+
+import static org.junit.Assert.assertEquals;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.LinuxTestCase;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.kernel.KernelAnalysisTestFactory;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.KernelStateProvider;
+import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests for the {@link KernelStateProvider}
+ *
+ * @author Alexandre Montplaisir
+ */
+public class KernelStateProviderTest {
+
+    private static final @NonNull LinuxTestCase KERNEL_TEST_CASE = KernelAnalysisTestFactory.KERNEL_SCHED;
+
+    private IKernelTrace fTrace;
+    private ITmfStateProvider fInput;
+
+    /**
+     * Set-up.
+     */
+    @Before
+    public void initialize() {
+        IKernelTrace thetrace = KERNEL_TEST_CASE.getKernelTrace();
+        fTrace = thetrace;
+        fInput = new KernelStateProvider(thetrace, thetrace.getKernelEventLayout());
+    }
+
+    /**
+     * Class teardown
+     */
+    @After
+    public void classTeardown() {
+        if (fTrace != null) {
+            fTrace.dispose();
+        }
+    }
+
+    /**
+     * Test loading the state provider.
+     */
+    @Test
+    public void testOpening() {
+        long testStartTime;
+        testStartTime = fInput.getStartTime();
+        /* Expected start time of the trace */
+        assertEquals(testStartTime, 1L);
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelThreadInformationProviderTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelThreadInformationProviderTest.java
new file mode 100644 (file)
index 0000000..2722a5f
--- /dev/null
@@ -0,0 +1,298 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernel;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelThreadInformationProvider;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.LinuxTestCase;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.kernel.KernelAnalysisTestFactory;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
+import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Test analysis-specific methods for the {@link KernelAnalysisModule} class.
+ *
+ * @author Geneviève Bastien
+ */
+public class KernelThreadInformationProviderTest {
+
+    private static final @NonNull LinuxTestCase KERNEL_TEST_CASE = KernelAnalysisTestFactory.KERNEL_SCHED;
+
+    private ITmfTrace fTrace;
+    private KernelAnalysisModule fModule;
+
+    private static void deleteSuppFiles(ITmfTrace trace) {
+        /* Remove supplementary files */
+        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
+        for (File file : suppDir.listFiles()) {
+            file.delete();
+        }
+    }
+
+    /**
+     * Setup the trace for the tests
+     */
+    @Before
+    public void setUp() {
+        ITmfTrace trace = KERNEL_TEST_CASE.getKernelTrace();
+        deleteSuppFiles(trace);
+        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
+        IAnalysisModule module = null;
+        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
+            module = mod;
+        }
+        assertNotNull(module);
+        module.schedule();
+        module.waitForCompletion();
+        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID);
+        fTrace = trace;
+    }
+
+    /**
+     * Clean up
+     */
+    @After
+    public void tearDown() {
+        deleteSuppFiles(fTrace);
+        fTrace.dispose();
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getThreadIds(KernelAnalysisModule)}
+     * method
+     */
+    @Test
+    public void testGetThreadQuarks() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+        Collection<Integer> threadIds = KernelThreadInformationProvider.getThreadIds(module);
+        assertEquals(ImmutableSet.<Integer>of(10,11,20,21,30,100), threadIds);
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getThreadOnCpu(KernelAnalysisModule, long, long)}
+     * method
+     */
+    @Test
+    public void testGetThreadOnCpu() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        /* Check with invalid timestamps */
+        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, -1);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 80);
+        assertNull(tid);
+
+        /* Check with invalid cpus */
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 2, 20);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, -1, 20);
+        assertNull(tid);
+
+        /* Check valid values */
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 4);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 15);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 15);
+        assertEquals(Integer.valueOf(11), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 29);
+        assertEquals(Integer.valueOf(20), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 30);
+        assertEquals(Integer.valueOf(21), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 59);
+        assertEquals(Integer.valueOf(11), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 59);
+        assertEquals(Integer.valueOf(30), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 60);
+        assertEquals(Integer.valueOf(11), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 60);
+        assertEquals(Integer.valueOf(21), tid);
+
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getParentPid(KernelAnalysisModule, Integer, long)}
+     * method
+     */
+    @Test
+    public void testGetPpid() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        /* Check with invalid timestamps */
+        Integer ppid = KernelThreadInformationProvider.getParentPid(module, 11, -1);
+        assertNull(ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 80);
+        assertNull(ppid);
+
+        /* Check with invalid cpus */
+        ppid = KernelThreadInformationProvider.getParentPid(module, -4, 20);
+        assertNull(ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 12, 20);
+        assertNull(ppid);
+
+        /* Check values with no parent */
+        ppid = KernelThreadInformationProvider.getParentPid(module, 10, 20);
+        assertEquals(Integer.valueOf(0), ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 30, 60);
+        assertEquals(Integer.valueOf(0), ppid);
+
+        /* Check parent determined at statedump */
+        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 4);
+        assertNull(ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 5);
+        assertEquals(Integer.valueOf(10), ppid);
+
+        /* Check parent after process fork */
+        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 25);
+        assertEquals(Integer.valueOf(20), ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 70);
+        assertEquals(Integer.valueOf(20), ppid);
+
+    }
+
+    /**
+     * Test the {@link KernelThreadInformationProvider#getExecutableName(KernelAnalysisModule, Integer)} method
+     */
+    @Test
+    public void testGetExecutableName() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        /* Check with invalid threads */
+        String execName = KernelThreadInformationProvider.getExecutableName(module, 101);
+        assertNull(execName);
+
+        execName = KernelThreadInformationProvider.getExecutableName(module, -2);
+        assertNull(execName);
+
+        /* Check valid value */
+        execName = KernelThreadInformationProvider.getExecutableName(module, 20);
+        assertEquals("proc20", execName);
+
+        /* Check valid value with process name change in history */
+        execName = KernelThreadInformationProvider.getExecutableName(module, 21);
+        assertEquals("proc21", execName);
+
+    }
+
+    private static void testIntervals(String info, List<ITmfStateInterval> intervals, ITmfStateValue[] values) {
+        assertEquals(info + " interval count", values.length, intervals.size());
+        for (int i = 0; i < values.length; i++) {
+            assertEquals(info + " interval " + i, values[i], intervals.get(i).getStateValue());
+        }
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getStatusIntervalsForThread(KernelAnalysisModule, Integer, long, long, long, IProgressMonitor)}
+     * method
+     */
+    @Test
+    public void testGetStatusIntervalsForThread() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        IProgressMonitor monitor = new NullProgressMonitor();
+        Integer process21 = 21;
+        Integer process20 = 20;
+
+        /* Check invalid time ranges */
+        List<ITmfStateInterval> intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, -15, -5, 3, monitor);
+        assertTrue(intervals.isEmpty());
+
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 80, 1500000000L, 50, monitor);
+        assertTrue(intervals.isEmpty());
+
+        /* Check invalid quarks */
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, -1, 0, 70L, 3, monitor);
+        assertTrue(intervals.isEmpty());
+
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, 0, 0, 70L, 3, monitor);
+        assertTrue(intervals.isEmpty());
+
+        /* Check different time ranges and resolutions */
+        ITmfStateValue[] values = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
+                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
+                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 0, 70L, 3, monitor);
+        testIntervals("tid 21 [0,70,3]", intervals, values);
+
+        ITmfStateValue[] values2 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE,
+                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 1, 70L, 30, monitor);
+        testIntervals("tid 21 [0,70,30]", intervals, values2);
+
+        ITmfStateValue[] values3 = { StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
+                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 25, 50L, 3, monitor);
+        testIntervals("tid 21 [25,50,3]", intervals, values3);
+
+        ITmfStateValue[] values4 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE,
+                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 0, 70L, 3, monitor);
+        testIntervals("tid 20 [0,70,3]", intervals, values4);
+
+        ITmfStateValue[] values5 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 1, 70L, 30, monitor);
+        testIntervals("tid 20 [0,70,30]", intervals, values5);
+
+        ITmfStateValue[] values6 = { StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE,
+                StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 25, 50L, 3, monitor);
+        testIntervals("tid 20 [25,50,3]", intervals, values6);
+
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelTidAspectTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernel/KernelTidAspectTest.java
new file mode 100644 (file)
index 0000000..41b95e0
--- /dev/null
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernel;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.io.File;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelTidAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.LinuxTestCase;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.kernel.KernelAnalysisTestFactory;
+import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test the {@link KernelTidAspect} class
+ *
+ * @author Geneviève Bastien
+ */
+public class KernelTidAspectTest {
+
+    private static final @NonNull LinuxTestCase KERNEL_TEST_CASE = KernelAnalysisTestFactory.KERNEL_SCHED;
+
+    // ------------------------------------------------------------------------
+    // Test trace class definition
+    // ------------------------------------------------------------------------
+
+    private ITmfTrace fTrace;
+
+    private static void deleteSuppFiles(ITmfTrace trace) {
+        /* Remove supplementary files */
+        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
+        for (File file : suppDir.listFiles()) {
+            file.delete();
+        }
+    }
+
+    /**
+     * Test setup
+     */
+    @Before
+    public void setUp() {
+        ITmfTrace trace = KERNEL_TEST_CASE.getKernelTrace();
+        deleteSuppFiles(trace);
+        /* Make sure the Kernel analysis has run */
+        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
+        IAnalysisModule module = null;
+        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
+            module = mod;
+        }
+        assertNotNull(module);
+        module.schedule();
+        module.waitForCompletion();
+        fTrace = trace;
+    }
+
+    /**
+     * Test clean up
+     */
+    @After
+    public void tearDown() {
+        fTrace.dispose();
+    }
+
+    private void resolveNextEvent(ITmfContext context, Integer tid) {
+        ITmfTrace trace = fTrace;
+        ITmfEvent event = trace.getNext(context);
+        assertNotNull(event);
+
+        Object tidObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(trace, KernelTidAspect.class, event);
+        if (tid == null) {
+            assertNull(tidObj);
+        } else {
+            assertNotNull(tidObj);
+            assertEquals(tid, tidObj);
+        }
+    }
+
+    /**
+     * Test the {@link KernelTidAspect#resolve(ITmfEvent)} method method
+     */
+    @Test
+    public void testResolveTidAspect() {
+
+        ITmfContext context = fTrace.seekEvent(0L);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, 11);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, 20);
+        resolveNextEvent(context, 20);
+        resolveNextEvent(context, 21);
+        resolveNextEvent(context, 11);
+        resolveNextEvent(context, 30);
+        resolveNextEvent(context, 21);
+        resolveNextEvent(context, 20);
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java
deleted file mode 100644 (file)
index abce66b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
-
-import static org.junit.Assert.assertEquals;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.LinuxTestCase;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.kernel.KernelAnalysisTestFactory;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.KernelStateProvider;
-import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests for the {@link KernelStateProvider}
- *
- * @author Alexandre Montplaisir
- */
-public class KernelStateProviderTest {
-
-    private static final @NonNull LinuxTestCase KERNEL_TEST_CASE = KernelAnalysisTestFactory.KERNEL_SCHED;
-
-    private IKernelTrace fTrace;
-    private ITmfStateProvider fInput;
-
-    /**
-     * Set-up.
-     */
-    @Before
-    public void initialize() {
-        IKernelTrace thetrace = KERNEL_TEST_CASE.getKernelTrace();
-        fTrace = thetrace;
-        fInput = new KernelStateProvider(thetrace, thetrace.getKernelEventLayout());
-    }
-
-    /**
-     * Class teardown
-     */
-    @After
-    public void classTeardown() {
-        if (fTrace != null) {
-            fTrace.dispose();
-        }
-    }
-
-    /**
-     * Test loading the state provider.
-     */
-    @Test
-    public void testOpening() {
-        long testStartTime;
-        testStartTime = fInput.getStartTime();
-        /* Expected start time of the trace */
-        assertEquals(testStartTime, 1L);
-    }
-
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java
deleted file mode 100644 (file)
index 64a95d5..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.LinuxTestCase;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.kernel.KernelAnalysisTestFactory;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
-import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Test analysis-specific methods for the {@link KernelAnalysisModule} class.
- *
- * @author Geneviève Bastien
- */
-public class KernelThreadInformationProviderTest {
-
-    private static final @NonNull LinuxTestCase KERNEL_TEST_CASE = KernelAnalysisTestFactory.KERNEL_SCHED;
-
-    private ITmfTrace fTrace;
-    private KernelAnalysisModule fModule;
-
-    private static void deleteSuppFiles(ITmfTrace trace) {
-        /* Remove supplementary files */
-        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
-        for (File file : suppDir.listFiles()) {
-            file.delete();
-        }
-    }
-
-    /**
-     * Setup the trace for the tests
-     */
-    @Before
-    public void setUp() {
-        ITmfTrace trace = KERNEL_TEST_CASE.getKernelTrace();
-        deleteSuppFiles(trace);
-        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
-        IAnalysisModule module = null;
-        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
-            module = mod;
-        }
-        assertNotNull(module);
-        module.schedule();
-        module.waitForCompletion();
-        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID);
-        fTrace = trace;
-    }
-
-    /**
-     * Clean up
-     */
-    @After
-    public void tearDown() {
-        deleteSuppFiles(fTrace);
-        fTrace.dispose();
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getThreadIds(KernelAnalysisModule)}
-     * method
-     */
-    @Test
-    public void testGetThreadQuarks() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-        Collection<Integer> threadIds = KernelThreadInformationProvider.getThreadIds(module);
-        assertEquals(ImmutableSet.<Integer>of(10,11,20,21,30,100), threadIds);
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getThreadOnCpu(KernelAnalysisModule, long, long)}
-     * method
-     */
-    @Test
-    public void testGetThreadOnCpu() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        /* Check with invalid timestamps */
-        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, -1);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 80);
-        assertNull(tid);
-
-        /* Check with invalid cpus */
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 2, 20);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, -1, 20);
-        assertNull(tid);
-
-        /* Check valid values */
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 4);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 15);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 15);
-        assertEquals(Integer.valueOf(11), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 29);
-        assertEquals(Integer.valueOf(20), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 30);
-        assertEquals(Integer.valueOf(21), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 59);
-        assertEquals(Integer.valueOf(11), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 59);
-        assertEquals(Integer.valueOf(30), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 60);
-        assertEquals(Integer.valueOf(11), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 60);
-        assertEquals(Integer.valueOf(21), tid);
-
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getParentPid(KernelAnalysisModule, Integer, long)}
-     * method
-     */
-    @Test
-    public void testGetPpid() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        /* Check with invalid timestamps */
-        Integer ppid = KernelThreadInformationProvider.getParentPid(module, 11, -1);
-        assertNull(ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 80);
-        assertNull(ppid);
-
-        /* Check with invalid cpus */
-        ppid = KernelThreadInformationProvider.getParentPid(module, -4, 20);
-        assertNull(ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 12, 20);
-        assertNull(ppid);
-
-        /* Check values with no parent */
-        ppid = KernelThreadInformationProvider.getParentPid(module, 10, 20);
-        assertEquals(Integer.valueOf(0), ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 30, 60);
-        assertEquals(Integer.valueOf(0), ppid);
-
-        /* Check parent determined at statedump */
-        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 4);
-        assertNull(ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 5);
-        assertEquals(Integer.valueOf(10), ppid);
-
-        /* Check parent after process fork */
-        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 25);
-        assertEquals(Integer.valueOf(20), ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 70);
-        assertEquals(Integer.valueOf(20), ppid);
-
-    }
-
-    /**
-     * Test the {@link KernelThreadInformationProvider#getExecutableName(KernelAnalysisModule, Integer)} method
-     */
-    @Test
-    public void testGetExecutableName() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        /* Check with invalid threads */
-        String execName = KernelThreadInformationProvider.getExecutableName(module, 101);
-        assertNull(execName);
-
-        execName = KernelThreadInformationProvider.getExecutableName(module, -2);
-        assertNull(execName);
-
-        /* Check valid value */
-        execName = KernelThreadInformationProvider.getExecutableName(module, 20);
-        assertEquals("proc20", execName);
-
-        /* Check valid value with process name change in history */
-        execName = KernelThreadInformationProvider.getExecutableName(module, 21);
-        assertEquals("proc21", execName);
-
-    }
-
-    private static void testIntervals(String info, List<ITmfStateInterval> intervals, ITmfStateValue[] values) {
-        assertEquals(info + " interval count", values.length, intervals.size());
-        for (int i = 0; i < values.length; i++) {
-            assertEquals(info + " interval " + i, values[i], intervals.get(i).getStateValue());
-        }
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getStatusIntervalsForThread(KernelAnalysisModule, Integer, long, long, long, IProgressMonitor)}
-     * method
-     */
-    @Test
-    public void testGetStatusIntervalsForThread() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        IProgressMonitor monitor = new NullProgressMonitor();
-        Integer process21 = 21;
-        Integer process20 = 20;
-
-        /* Check invalid time ranges */
-        List<ITmfStateInterval> intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, -15, -5, 3, monitor);
-        assertTrue(intervals.isEmpty());
-
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 80, 1500000000L, 50, monitor);
-        assertTrue(intervals.isEmpty());
-
-        /* Check invalid quarks */
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, -1, 0, 70L, 3, monitor);
-        assertTrue(intervals.isEmpty());
-
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, 0, 0, 70L, 3, monitor);
-        assertTrue(intervals.isEmpty());
-
-        /* Check different time ranges and resolutions */
-        ITmfStateValue[] values = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
-                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
-                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 0, 70L, 3, monitor);
-        testIntervals("tid 21 [0,70,3]", intervals, values);
-
-        ITmfStateValue[] values2 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE,
-                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 1, 70L, 30, monitor);
-        testIntervals("tid 21 [0,70,30]", intervals, values2);
-
-        ITmfStateValue[] values3 = { StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
-                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 25, 50L, 3, monitor);
-        testIntervals("tid 21 [25,50,3]", intervals, values3);
-
-        ITmfStateValue[] values4 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE,
-                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 0, 70L, 3, monitor);
-        testIntervals("tid 20 [0,70,3]", intervals, values4);
-
-        ITmfStateValue[] values5 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 1, 70L, 30, monitor);
-        testIntervals("tid 20 [0,70,30]", intervals, values5);
-
-        ITmfStateValue[] values6 = { StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE,
-                StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 25, 50L, 3, monitor);
-        testIntervals("tid 20 [25,50,3]", intervals, values6);
-
-    }
-
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java
deleted file mode 100644 (file)
index 613fc16..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.io.File;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelTidAspect;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.LinuxTestCase;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.kernel.KernelAnalysisTestFactory;
-import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Test the {@link KernelTidAspect} class
- *
- * @author Geneviève Bastien
- */
-public class KernelTidAspectTest {
-
-    private static final @NonNull LinuxTestCase KERNEL_TEST_CASE = KernelAnalysisTestFactory.KERNEL_SCHED;
-
-    // ------------------------------------------------------------------------
-    // Test trace class definition
-    // ------------------------------------------------------------------------
-
-    private ITmfTrace fTrace;
-
-    private static void deleteSuppFiles(ITmfTrace trace) {
-        /* Remove supplementary files */
-        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
-        for (File file : suppDir.listFiles()) {
-            file.delete();
-        }
-    }
-
-    /**
-     * Test setup
-     */
-    @Before
-    public void setUp() {
-        ITmfTrace trace = KERNEL_TEST_CASE.getKernelTrace();
-        deleteSuppFiles(trace);
-        /* Make sure the Kernel analysis has run */
-        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
-        IAnalysisModule module = null;
-        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
-            module = mod;
-        }
-        assertNotNull(module);
-        module.schedule();
-        module.waitForCompletion();
-        fTrace = trace;
-    }
-
-    /**
-     * Test clean up
-     */
-    @After
-    public void tearDown() {
-        fTrace.dispose();
-    }
-
-    private void resolveNextEvent(ITmfContext context, Integer tid) {
-        ITmfTrace trace = fTrace;
-        ITmfEvent event = trace.getNext(context);
-        assertNotNull(event);
-
-        Object tidObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(trace, KernelTidAspect.class, event);
-        if (tid == null) {
-            assertNull(tidObj);
-        } else {
-            assertNotNull(tidObj);
-            assertEquals(tid, tidObj);
-        }
-    }
-
-    /**
-     * Test the {@link KernelTidAspect#resolve(ITmfEvent)} method method
-     */
-    @Test
-    public void testResolveTidAspect() {
-
-        ITmfContext context = fTrace.seekEvent(0L);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, 11);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, 20);
-        resolveNextEvent(context, 20);
-        resolveNextEvent(context, 21);
-        resolveNextEvent(context, 11);
-        resolveNextEvent(context, 30);
-        resolveNextEvent(context, 21);
-        resolveNextEvent(context, 20);
-    }
-
-}
index cc43ccfe620acdd29983e24966dffbdb94ab0ff5..6594d03fbe3b82c455f5d0b18ddfb07a7495f5fb 100644 (file)
@@ -10,8 +10,8 @@
 package org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.trace;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelTidAspect;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.ThreadPriorityAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelTidAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.ThreadPriorityAspect;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
 import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
index 07f2012f1eca59c1c2bb9cf3a9ea09db5c791c06..a0831cecb08208839e242b987f5029838700e1c6 100644 (file)
@@ -20,7 +20,7 @@ Import-Package: com.google.common.base,
 Export-Package: org.eclipse.tracecompass.analysis.os.linux.core.contextswitch,
  org.eclipse.tracecompass.analysis.os.linux.core.cpuusage,
  org.eclipse.tracecompass.analysis.os.linux.core.event.aspect,
- org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis,
+ org.eclipse.tracecompass.analysis.os.linux.core.kernel,
  org.eclipse.tracecompass.analysis.os.linux.core.latency,
  org.eclipse.tracecompass.analysis.os.linux.core.model,
  org.eclipse.tracecompass.analysis.os.linux.core.signals,
index bb2d3c599958623834e08dd98b33edcf4a6aab5c..bd74cfccf115251832afd6bf02bbfc79342b7696 100644 (file)
@@ -4,7 +4,7 @@
    <extension
          point="org.eclipse.linuxtools.tmf.core.analysis">
       <module
-            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule"
+            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule"
             automatic="true"
             id="org.eclipse.tracecompass.analysis.os.linux.kernel"
             name="%analysis.linuxkernel">
index 52de044c08201f14f02c4803c552922acea55292..d38cc423a72fd18ec16411bff00959b161467d78 100644 (file)
@@ -24,8 +24,8 @@ import java.util.Set;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
 import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
index ea811a9a0273fcb47bb90bc678ed690763f3b604..559ff04f32b4fb4dab650f21d5b3372cf9e88c0b 100644 (file)
@@ -14,7 +14,7 @@ package org.eclipse.tracecompass.analysis.os.linux.core.contextswitch;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.common.core.NonNullUtils;
 import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
index 045d634a88d036df3540ef02ed43f0ca37f538f3..60be32d9c8f9677e5a290d279c08be8609f20c6e 100644 (file)
@@ -22,8 +22,8 @@ import java.util.Map.Entry;
 import java.util.Set;
 
 import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
 import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
index ca08607bd3b41632511f7e5d543a1023d306bbb6..03013893a63606a0188fb735ab2487972ca9690e 100644 (file)
@@ -19,7 +19,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/Attributes.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/Attributes.java
new file mode 100644 (file)
index 0000000..a4ddcfe
--- /dev/null
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ ******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+/**
+ * This file defines all the attribute names used in the handler. Both the
+ * construction and query steps should use them.
+ *
+ * These should not be externalized! The values here are used as-is in the
+ * history file on disk, so they should be kept the same to keep the file format
+ * compatible. If a view shows attribute names directly, the localization should
+ * be done on the viewer side.
+ *
+ * @author Alexandre Montplaisir
+ * @since 2.0
+ */
+@SuppressWarnings({"nls", "javadoc"})
+public interface Attributes {
+
+    /* First-level attributes */
+    String CPUS = "CPUs";
+    String THREADS = "Threads";
+
+    /* Sub-attributes of the CPU nodes */
+    String CURRENT_THREAD = "Current_thread";
+    String STATUS = "Status";
+    String SOFT_IRQS = "Soft_IRQs";
+    String IRQS = "IRQs";
+
+    /* Sub-attributes of the Thread nodes */
+    String PPID = "PPID";
+    //static final String STATUS = "Status"
+    String EXEC_NAME = "Exec_name";
+
+    /** @since 1.0 */
+    String PRIO = "Prio";
+    String SYSTEM_CALL = "System_call";
+
+    /* Misc stuff */
+    String UNKNOWN = "Unknown";
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelAnalysisModule.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelAnalysisModule.java
new file mode 100644 (file)
index 0000000..c8a32ee
--- /dev/null
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2013, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *   Mathieu Rail - Provide the requirements of the analysis
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.KernelStateProvider;
+import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement;
+import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+
+/**
+ * State System Module for lttng kernel traces
+ *
+ * @author Geneviève Bastien
+ * @since 2.0
+ */
+public class KernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+    /**
+     * The file name of the History Tree
+     */
+    public static final String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
+
+    /** The ID of this analysis module */
+    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.kernel"; //$NON-NLS-1$
+
+    /*
+     * TODO: Decide which events should be mandatory for the analysis, once the
+     * appropriate error messages and session setup are in place.
+     */
+//    private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of();
+//
+//    private static final ImmutableSet<String> OPTIONAL_EVENTS = ImmutableSet.of(
+            // FIXME These cannot be declared statically anymore, they depend on
+            // the OriginTracer of the kernel trace.
+            // LttngStrings.EXIT_SYSCALL,
+            // LttngStrings.IRQ_HANDLER_ENTRY,
+            // LttngStrings.IRQ_HANDLER_EXIT,
+            // LttngStrings.SOFTIRQ_ENTRY,
+            // LttngStrings.SOFTIRQ_EXIT,
+            // LttngStrings.SOFTIRQ_RAISE,
+            // LttngStrings.SCHED_PROCESS_FORK,
+            // LttngStrings.SCHED_PROCESS_EXIT,
+            // LttngStrings.SCHED_PROCESS_FREE,
+            // LttngStrings.SCHED_SWITCH,
+            // LttngStrings.STATEDUMP_PROCESS_STATE,
+            // LttngStrings.SCHED_WAKEUP,
+            // LttngStrings.SCHED_WAKEUP_NEW,
+            //
+            // /* FIXME Add the prefix for syscalls */
+            // LttngStrings.SYSCALL_PREFIX
+            // );
+
+    /** The requirements as an immutable set */
+    private static final Set<TmfAnalysisRequirement> REQUIREMENTS;
+
+    static {
+//        /* initialize the requirement: domain and events */
+//        TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
+//        domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY);
+//
+//        TmfAnalysisRequirement eventReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
+//        eventReq.addValues(OPTIONAL_EVENTS, ValuePriorityLevel.OPTIONAL);
+//
+//        REQUIREMENTS = checkNotNull(ImmutableSet.of(domainReq, eventReq));
+        REQUIREMENTS = Collections.EMPTY_SET;
+    }
+
+    @Override
+    protected @NonNull ITmfStateProvider createStateProvider() {
+        ITmfTrace trace = checkNotNull(getTrace());
+        IKernelAnalysisEventLayout layout;
+
+        if (trace instanceof IKernelTrace) {
+            layout = ((IKernelTrace) trace).getKernelEventLayout();
+        } else {
+            /* Fall-back to the base LttngEventLayout */
+            layout = IKernelAnalysisEventLayout.DEFAULT_LAYOUT;
+        }
+
+        return new KernelStateProvider(trace, layout);
+    }
+
+    @Override
+    @NonNull
+    protected String getSsFileName() {
+        return HISTORY_TREE_FILE_NAME;
+    }
+
+    @Override
+    protected String getFullHelpText() {
+        return NonNullUtils.nullToEmptyString(Messages.LttngKernelAnalysisModule_Help);
+    }
+
+    @Override
+    public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
+        return REQUIREMENTS;
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelThreadInformationProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelThreadInformationProvider.java
new file mode 100644 (file)
index 0000000..a75686f
--- /dev/null
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
+
+/**
+ * Information provider utility class that retrieves thread-related information
+ * from a Linux Kernel Analysis
+ *
+ * @author Geneviève Bastien
+ * @since 2.0
+ */
+public final class KernelThreadInformationProvider {
+
+    private KernelThreadInformationProvider() {
+    }
+
+    /**
+     * Get the ID of the thread running on the CPU at time ts
+     *
+     * TODO: This method may later be replaced by an aspect, when the aspect can
+     * resolve to something that is not an event
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param cpuId
+     *            The CPU number the process is running on
+     * @param ts
+     *            The timestamp at which we want the running process
+     * @return The TID of the thread running on CPU cpuId at time ts or
+     *         {@code null} if either no thread is running or we do not know.
+     */
+    public static @Nullable Integer getThreadOnCpu(KernelAnalysisModule module, long cpuId, long ts) {
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return null;
+        }
+        try {
+            int cpuQuark = ss.getQuarkAbsolute(Attributes.CPUS, Long.toString(cpuId), Attributes.CURRENT_THREAD);
+            ITmfStateInterval interval = ss.querySingleState(ts, cpuQuark);
+            ITmfStateValue val = interval.getStateValue();
+            switch (val.getType()) {
+            case INTEGER:
+                return val.unboxInt();
+            case LONG:
+            case DOUBLE:
+            case NULL:
+            case STRING:
+            default:
+                break;
+            }
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return null;
+    }
+
+    /**
+     * Get the TIDs of the threads from an analysis
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @return The set of TIDs corresponding to the threads
+     */
+    public static Collection<Integer> getThreadIds(KernelAnalysisModule module) {
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return Collections.EMPTY_SET;
+        }
+        int threadQuark;
+        try {
+            threadQuark = ss.getQuarkAbsolute(Attributes.THREADS);
+            Set<@NonNull Integer> tids = new TreeSet<>();
+            for (Integer quark : ss.getSubAttributes(threadQuark, false)) {
+                tids.add(Integer.parseInt(ss.getAttributeName(quark)));
+            }
+            return tids;
+        } catch (AttributeNotFoundException e) {
+        }
+        return Collections.EMPTY_SET;
+    }
+
+    /**
+     * Get the parent process ID of a thread
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param threadId
+     *            The thread ID of the process for which to get the parent
+     * @param ts
+     *            The timestamp at which to get the parent
+     * @return The parent PID or {@code null} if the PPID is not found.
+     */
+    public static @Nullable Integer getParentPid(KernelAnalysisModule module, Integer threadId, long ts) {
+        Integer ppid = null;
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return ppid;
+        }
+        Integer ppidNode;
+        try {
+            ppidNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PPID);
+            ITmfStateInterval ppidInterval = ss.querySingleState(ts, ppidNode);
+            ITmfStateValue ppidValue = ppidInterval.getStateValue();
+
+            switch (ppidValue.getType()) {
+            case INTEGER:
+                ppid = NonNullUtils.checkNotNull(Integer.valueOf(ppidValue.unboxInt()));
+                break;
+            case DOUBLE:
+            case LONG:
+            case NULL:
+            case STRING:
+            default:
+                break;
+            }
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return ppid;
+    }
+
+    /**
+     * Get the executable name of the thread ID. If the thread ID was used
+     * multiple time or the name changed in between, it will return the last
+     * name the thread has taken, or {@code null} if no name is found
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param threadId
+     *            The thread ID of the process for which to get the name
+     * @return The last executable name of this process, or {@code null} if not
+     *         found
+     */
+    public static @Nullable String getExecutableName(KernelAnalysisModule module, Integer threadId) {
+        String execName = null;
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return execName;
+        }
+        Integer execNameNode;
+        try {
+            execNameNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.EXEC_NAME);
+            List<ITmfStateInterval> execNameIntervals = StateSystemUtils.queryHistoryRange(ss, execNameNode, ss.getStartTime(), ss.getCurrentEndTime());
+
+            ITmfStateValue execNameValue;
+            for (ITmfStateInterval interval : execNameIntervals) {
+                execNameValue = interval.getStateValue();
+                switch (execNameValue.getType()) {
+                case STRING:
+                    execName = execNameValue.unboxStr();
+                    break;
+                case DOUBLE:
+                case LONG:
+                case NULL:
+                case INTEGER:
+                default:
+                    break;
+                }
+            }
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return execName;
+    }
+
+    /**
+     * Get the priority of a thread running at a time ts.
+     *
+     * @param module
+     *            The kernel analysis instance to run this method on
+     * @param threadId
+     *            The thread ID of the target thread
+     * @param ts
+     *            The timestamp at which to get the priority
+     * @return The priority of this thread, or {@code null} if not found
+     */
+    public static @Nullable Integer getThreadPrio(KernelAnalysisModule module, Integer threadId, long ts) {
+        Integer execPrio = null;
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return execPrio;
+        }
+        try {
+            int execPrioQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PRIO);
+            ITmfStateInterval interval = ss.querySingleState(ts, execPrioQuark);
+            ITmfStateValue prioValue = interval.getStateValue();
+            /* We know the prio must be an Integer */
+            execPrio = prioValue.unboxInt();
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return execPrio;
+    }
+
+    /**
+     * Get the status intervals for a given thread with a resolution
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param threadId
+     *            The ID of the thread to get the intervals for
+     * @param start
+     *            The start time of the requested range
+     * @param end
+     *            The end time of the requested range
+     * @param resolution
+     *            The resolution or the minimal time between the requested
+     *            intervals. If interval times are smaller than resolution, only
+     *            the first interval is returned, the others are ignored.
+     * @param monitor
+     *            A progress monitor for this task
+     * @return The list of status intervals for this thread, an empty list is
+     *         returned if either the state system is {@code null} or the quark
+     *         is not found
+     */
+    public static List<ITmfStateInterval> getStatusIntervalsForThread(KernelAnalysisModule module, Integer threadId, long start, long end, long resolution, IProgressMonitor monitor) {
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return Collections.EMPTY_LIST;
+        }
+
+        try {
+            int threadQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString());
+            int statusQuark = ss.getQuarkRelative(threadQuark, Attributes.STATUS);
+            List<ITmfStateInterval> statusIntervals = StateSystemUtils.queryHistoryRange(ss, statusQuark, Math.max(start, ss.getStartTime()), Math.min(end - 1, ss.getCurrentEndTime()), resolution, monitor);
+            return statusIntervals;
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return Collections.EMPTY_LIST;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelTidAspect.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelTidAspect.java
new file mode 100644 (file)
index 0000000..6696abb
--- /dev/null
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.analysis.os.linux.core.event.aspect.LinuxTidAspect;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+
+/**
+ * This aspect finds the ID of the thread running from this event using the
+ * {@link KernelAnalysisModule}.
+ *
+ * @author Geneviève Bastien
+ * @since 2.0
+ */
+public final class KernelTidAspect extends LinuxTidAspect {
+
+    /** The singleton instance */
+    public static final KernelTidAspect INSTANCE = new KernelTidAspect();
+
+    private KernelTidAspect() {
+    }
+
+    @Override
+    public @Nullable Integer resolve(ITmfEvent event) {
+        /* Find the CPU this event is run on */
+        Integer cpu = TmfTraceUtils.resolveIntEventAspectOfClassForEvent(event.getTrace(),
+                TmfCpuAspect.class, event);
+        if (cpu == null) {
+            return null;
+        }
+
+        /* Find the analysis module for the trace */
+        KernelAnalysisModule analysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(),
+                KernelAnalysisModule.class, KernelAnalysisModule.ID);
+        if (analysis == null) {
+            return null;
+        }
+        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(
+                analysis, cpu, event.getTimestamp().getValue());
+        if (tid != null) {
+            return tid;
+        }
+        return null;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/LinuxValues.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/LinuxValues.java
new file mode 100644 (file)
index 0000000..91b6cac
--- /dev/null
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+/**
+ * Definitions of values used in the Linux kernel code.
+ *
+ * Instead of using "magic numbers" in state providers, the definitions should
+ * be added here first.
+ *
+ * @author Alexandre Montplaisir
+ * @since 2.0
+ */
+public interface LinuxValues {
+
+    /**
+     * Process states found in scheduler events.
+     *
+     * From include/linux/sched.h
+     *
+     * <pre>
+     * #define TASK_RUNNING 0
+     * #define TASK_INTERRUPTIBLE 1
+     * #define TASK_UNINTERRUPTIBLE 2
+     * #define __TASK_STOPPED 4
+     * #define __TASK_TRACED 8
+     * #define EXIT_DEAD 16
+     * #define EXIT_ZOMBIE 32
+     * #define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD)
+     * #define TASK_DEAD 64
+     * #define TASK_WAKEKILL 128
+     * #define TASK_WAKING 256
+     * #define TASK_PARKED 512
+     * #define TASK_STATE_MAX 1024
+     * </pre>
+     */
+    /**
+     * The task is running normally, can be interrupted, in a syscall or user
+     * mode.
+     */
+    int TASK_STATE_RUNNING = 0;
+
+    /**
+     * The process is in an interruptible sleep, (waiting for an event to
+     * complete)
+     */
+    int TASK_INTERRUPTIBLE = 1;
+
+    /**
+     * The process is in an uninteruptible sleep, (usually waiting on IO)
+     */
+    int TASK_UNINTERRUPTIBLE = 2;
+
+    /**
+     * The process is stopped, it is waiting for a SIGCONT
+     */
+    int TASK_STOPPED__ = 4;
+
+    /**
+     * The process is being monitored by other processes like a debugger
+     */
+    int TASK_TRACED__ = 8;
+
+    /**
+     * The task is terminated. It is lingering waiting for a parent to reap it.
+     */
+    int EXIT_ZOMBIE = 16;
+
+    /**
+     * The final state, the process reaches this state when being reaped. This
+     * state should not be seen.
+     */
+    int EXIT_DEAD = 32;
+
+    /**
+     * The task is dead, that means the PID can be re-used.
+     */
+    int TASK_DEAD = 64;
+
+    /**
+     * The task will wake up only on kill signals
+     */
+    int TASK_WAKEKILL = 128;
+
+    /**
+     * A task is being woken up, should not appear in sched switch, but if we
+     * poll.
+     */
+    int TASK_WAKING = 256;
+
+    /**
+     * A very deep sleep that can only be woken by an unpark wakeup
+     */
+    int TASK_PARK = 512;
+
+    /**
+     * This is the maximum value + 1 that the task state can be. TASK_STATE_MAX
+     * - 1 is useful to mask the task state.
+     */
+    int TASK_STATE_MAX = 1024;
+
+    /**
+     * Process statuses, used in LTTng statedump events.
+     *
+     * This is LTTng-specific, but the statedump are handled at this level, so
+     * it makes sense to add those definitions here.
+     *
+     * Taken from lttng-module's lttng-statedump-impl.c:
+     *
+     * <pre>
+     * enum lttng_process_status {
+     *     LTTNG_UNNAMED = 0,
+     *     LTTNG_WAIT_FORK = 1,
+     *     LTTNG_WAIT_CPU = 2,
+     *     LTTNG_EXIT = 3,
+     *     LTTNG_ZOMBIE = 4,
+     *     LTTNG_WAIT = 5,
+     *     LTTNG_RUN = 6,
+     *     LTTNG_DEAD = 7,
+     * };
+     * </pre>
+     */
+
+    /** Task is initially preempted */
+    int STATEDUMP_PROCESS_STATUS_WAIT_CPU = 2;
+
+    /** Task is initially blocked */
+    int STATEDUMP_PROCESS_STATUS_WAIT = 5;
+
+    /**
+     * SoftIRQ definitions
+     *
+     * From linux/interrupt.h
+     *
+     * <pre>
+     * enum
+     * {
+     *     HI_SOFTIRQ=0,
+     *     TIMER_SOFTIRQ,
+     *     NET_TX_SOFTIRQ,
+     *     NET_RX_SOFTIRQ,
+     *     BLOCK_SOFTIRQ,
+     *     BLOCK_IOPOLL_SOFTIRQ,
+     *     TASKLET_SOFTIRQ,
+     *     SCHED_SOFTIRQ,
+     *     HRTIMER_SOFTIRQ,
+     *     RCU_SOFTIRQ,
+     *     NR_SOFTIRQS // not used as this is the NUMBER of softirqs
+     * };
+     * </pre>
+     */
+
+    /** High-priority tasklet */
+    int SOFTIRQ_HI = 0;
+
+    /** Interrupted because of timer */
+    int SOFTIRQ_TIMER = 1;
+
+    /** Interrupted because of network transmission */
+    int SOFTIRQ_NET_TX = 2;
+
+    /** Interrupted because of network reception */
+    int SOFTIRQ_NET_RX = 3;
+
+    /** Interrupted because of block operation */
+    int SOFTIRQ_BLOCK = 4;
+
+    /** Interrupted because of block IO */
+    int SOFTIRQ_BLOCK_IOPOLL = 5;
+
+    /** Tasklet (differed device interrupt) */
+    int SOFTIRQ_TASKLET = 6;
+
+    /** Interrupted because of the scheduler */
+    int SOFTIRQ_SCHED = 7;
+
+    /** Interrupted because of HR timer */
+    int SOFTIRQ_HRTIMER = 8;
+
+    /** Interrupted because of RCU */
+    int SOFTIRQ_RCU = 9;
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/Messages.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/Messages.java
new file mode 100644 (file)
index 0000000..64aafdd
--- /dev/null
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Externalized message strings from the LTTng Kernel Analysis
+ *
+ * @author Geneviève Bastien
+ * @since 2.0
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.core.kernel.messages"; //$NON-NLS-1$
+
+    public static @Nullable String AspectName_Prio;
+
+    public static @Nullable String AspectHelpText_Prio;
+
+    public static @Nullable String LttngKernelAnalysisModule_Help;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/StateValues.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/StateValues.java
new file mode 100644 (file)
index 0000000..9a7a37d
--- /dev/null
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
+
+/**
+ * State values that are used in the kernel event handler. It's much better to
+ * use integer values whenever possible, since those take much less space in the
+ * history file.
+ *
+ * @author Alexandre Montplaisir
+ * @since 2.0
+ */
+@SuppressWarnings("javadoc")
+public interface StateValues {
+
+    /* Process status */
+    int PROCESS_STATUS_UNKNOWN = 0;
+    int PROCESS_STATUS_WAIT_BLOCKED = 1;
+    int PROCESS_STATUS_RUN_USERMODE = 2;
+    int PROCESS_STATUS_RUN_SYSCALL = 3;
+    int PROCESS_STATUS_INTERRUPTED = 4;
+    int PROCESS_STATUS_WAIT_FOR_CPU = 5;
+    int PROCESS_STATUS_WAIT_UNKNOWN = 6;
+
+    ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
+    ITmfStateValue PROCESS_STATUS_WAIT_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_UNKNOWN);
+    ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
+    ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
+    ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
+    ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
+    ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
+
+    /* CPU Status */
+    int CPU_STATUS_IDLE = 0;
+    /**
+     * Soft IRQ raised, could happen in the CPU attribute but should not since
+     * this means that the CPU went idle when a softirq was raised.
+     */
+    int CPU_STATUS_SOFT_IRQ_RAISED = (1 << 0);
+    int CPU_STATUS_RUN_USERMODE = (1 << 1);
+    int CPU_STATUS_RUN_SYSCALL = (1 << 2);
+    int CPU_STATUS_SOFTIRQ = (1 << 3);
+    int CPU_STATUS_IRQ = (1 << 4);
+
+    ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
+    ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
+    ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
+    ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
+    ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
+
+    /** Soft IRQ is raised, CPU is in user mode */
+    ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED);
+
+    /** If the softirq is running and another is raised at the same time. */
+    ITmfStateValue SOFT_IRQ_RAISED_RUNNING_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED | CPU_STATUS_SOFTIRQ);
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/ThreadPriorityAspect.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/ThreadPriorityAspect.java
new file mode 100644 (file)
index 0000000..6827f35
--- /dev/null
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Keba AG
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Christian Mansky - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+
+/**
+ * This aspect finds the priority of the thread running from this event using
+ * the {@link KernelAnalysisModule}.
+ *
+ * @author Christian Mansky
+ * @since 2.0
+ */
+public final class ThreadPriorityAspect implements ITmfEventAspect {
+
+    /** The singleton instance */
+    public static final ThreadPriorityAspect INSTANCE = new ThreadPriorityAspect();
+
+    private ThreadPriorityAspect() {
+    }
+
+    @Override
+    public final String getName() {
+        return NonNullUtils.nullToEmptyString(Messages.AspectName_Prio);
+    }
+
+    @Override
+    public final String getHelpText() {
+        return NonNullUtils.nullToEmptyString(Messages.AspectHelpText_Prio);
+    }
+
+    @Override
+    public @Nullable Integer resolve(ITmfEvent event) {
+        KernelAnalysisModule kernelAnalysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(), KernelAnalysisModule.class, KernelAnalysisModule.ID);
+        if (kernelAnalysis == null) {
+            return null;
+        }
+
+        Integer tid = KernelTidAspect.INSTANCE.resolve(event);
+        if (tid == null) {
+            return null;
+        }
+
+        Integer prio = KernelThreadInformationProvider.getThreadPrio(kernelAnalysis, tid, event.getTimestamp().getValue());
+        return prio;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/messages.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/messages.properties
new file mode 100644 (file)
index 0000000..a666ee1
--- /dev/null
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Geneviève Bastien - Initial API and implementation
+###############################################################################
+
+AspectName_Prio=Prio
+AspectHelpText_Prio=The priority of the thread this event belongs to
+LttngKernelAnalysisModule_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/package-info.java
new file mode 100644 (file)
index 0000000..c751a6f
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ericsson - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java
deleted file mode 100644 (file)
index 3324ea9..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-/**
- * This file defines all the attribute names used in the handler. Both the
- * construction and query steps should use them.
- *
- * These should not be externalized! The values here are used as-is in the
- * history file on disk, so they should be kept the same to keep the file format
- * compatible. If a view shows attribute names directly, the localization should
- * be done on the viewer side.
- *
- * @author alexmont
- *
- */
-@SuppressWarnings({"nls", "javadoc"})
-public interface Attributes {
-
-    /* First-level attributes */
-    String CPUS = "CPUs";
-    String THREADS = "Threads";
-
-    /* Sub-attributes of the CPU nodes */
-    String CURRENT_THREAD = "Current_thread";
-    String STATUS = "Status";
-    String SOFT_IRQS = "Soft_IRQs";
-    String IRQS = "IRQs";
-
-    /* Sub-attributes of the Thread nodes */
-    String PPID = "PPID";
-    //static final String STATUS = "Status"
-    String EXEC_NAME = "Exec_name";
-
-    /** @since 1.0 */
-    String PRIO = "Prio";
-    String SYSTEM_CALL = "System_call";
-
-    /* Misc stuff */
-    String UNKNOWN = "Unknown";
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java
deleted file mode 100644 (file)
index aeee16c..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *   Mathieu Rail - Provide the requirements of the analysis
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.KernelStateProvider;
-import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement;
-import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-
-/**
- * State System Module for lttng kernel traces
- *
- * @author Geneviève Bastien
- * @since 1.0
- */
-public class KernelAnalysisModule extends TmfStateSystemAnalysisModule {
-
-    /**
-     * The file name of the History Tree
-     */
-    public static final String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
-
-    /** The ID of this analysis module */
-    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.kernel"; //$NON-NLS-1$
-
-    /*
-     * TODO: Decide which events should be mandatory for the analysis, once the
-     * appropriate error messages and session setup are in place.
-     */
-//    private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of();
-//
-//    private static final ImmutableSet<String> OPTIONAL_EVENTS = ImmutableSet.of(
-            // FIXME These cannot be declared statically anymore, they depend on
-            // the OriginTracer of the kernel trace.
-            // LttngStrings.EXIT_SYSCALL,
-            // LttngStrings.IRQ_HANDLER_ENTRY,
-            // LttngStrings.IRQ_HANDLER_EXIT,
-            // LttngStrings.SOFTIRQ_ENTRY,
-            // LttngStrings.SOFTIRQ_EXIT,
-            // LttngStrings.SOFTIRQ_RAISE,
-            // LttngStrings.SCHED_PROCESS_FORK,
-            // LttngStrings.SCHED_PROCESS_EXIT,
-            // LttngStrings.SCHED_PROCESS_FREE,
-            // LttngStrings.SCHED_SWITCH,
-            // LttngStrings.STATEDUMP_PROCESS_STATE,
-            // LttngStrings.SCHED_WAKEUP,
-            // LttngStrings.SCHED_WAKEUP_NEW,
-            //
-            // /* FIXME Add the prefix for syscalls */
-            // LttngStrings.SYSCALL_PREFIX
-            // );
-
-    /** The requirements as an immutable set */
-    private static final Set<TmfAnalysisRequirement> REQUIREMENTS;
-
-    static {
-//        /* initialize the requirement: domain and events */
-//        TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
-//        domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY);
-//
-//        TmfAnalysisRequirement eventReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
-//        eventReq.addValues(OPTIONAL_EVENTS, ValuePriorityLevel.OPTIONAL);
-//
-//        REQUIREMENTS = checkNotNull(ImmutableSet.of(domainReq, eventReq));
-        REQUIREMENTS = Collections.EMPTY_SET;
-    }
-
-    @Override
-    protected @NonNull ITmfStateProvider createStateProvider() {
-        ITmfTrace trace = checkNotNull(getTrace());
-        IKernelAnalysisEventLayout layout;
-
-        if (trace instanceof IKernelTrace) {
-            layout = ((IKernelTrace) trace).getKernelEventLayout();
-        } else {
-            /* Fall-back to the base LttngEventLayout */
-            layout = IKernelAnalysisEventLayout.DEFAULT_LAYOUT;
-        }
-
-        return new KernelStateProvider(trace, layout);
-    }
-
-    @Override
-    @NonNull
-    protected String getSsFileName() {
-        return HISTORY_TREE_FILE_NAME;
-    }
-
-    @Override
-    protected String getFullHelpText() {
-        return NonNullUtils.nullToEmptyString(Messages.LttngKernelAnalysisModule_Help);
-    }
-
-    @Override
-    public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
-        return REQUIREMENTS;
-    }
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java
deleted file mode 100644 (file)
index 88d13b5..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-
-/**
- * Information provider utility class that retrieves thread-related information
- * from a Linux Kernel Analysis
- *
- * @author Geneviève Bastien
- */
-public final class KernelThreadInformationProvider {
-
-    private KernelThreadInformationProvider() {
-    }
-
-    /**
-     * Get the ID of the thread running on the CPU at time ts
-     *
-     * TODO: This method may later be replaced by an aspect, when the aspect can
-     * resolve to something that is not an event
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param cpuId
-     *            The CPU number the process is running on
-     * @param ts
-     *            The timestamp at which we want the running process
-     * @return The TID of the thread running on CPU cpuId at time ts or
-     *         {@code null} if either no thread is running or we do not know.
-     * @since 1.0
-     */
-    public static @Nullable Integer getThreadOnCpu(KernelAnalysisModule module, long cpuId, long ts) {
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return null;
-        }
-        try {
-            int cpuQuark = ss.getQuarkAbsolute(Attributes.CPUS, Long.toString(cpuId), Attributes.CURRENT_THREAD);
-            ITmfStateInterval interval = ss.querySingleState(ts, cpuQuark);
-            ITmfStateValue val = interval.getStateValue();
-            switch (val.getType()) {
-            case INTEGER:
-                return val.unboxInt();
-            case LONG:
-            case DOUBLE:
-            case NULL:
-            case STRING:
-            default:
-                break;
-            }
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return null;
-    }
-
-    /**
-     * Get the TIDs of the threads from an analysis
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @return The set of TIDs corresponding to the threads
-     * @since 1.0
-     */
-    public static Collection<Integer> getThreadIds(KernelAnalysisModule module) {
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return Collections.EMPTY_SET;
-        }
-        int threadQuark;
-        try {
-            threadQuark = ss.getQuarkAbsolute(Attributes.THREADS);
-            Set<@NonNull Integer> tids = new TreeSet<>();
-            for (Integer quark : ss.getSubAttributes(threadQuark, false)) {
-                tids.add(Integer.parseInt(ss.getAttributeName(quark)));
-            }
-            return tids;
-        } catch (AttributeNotFoundException e) {
-        }
-        return Collections.EMPTY_SET;
-    }
-
-    /**
-     * Get the parent process ID of a thread
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param threadId
-     *            The thread ID of the process for which to get the parent
-     * @param ts
-     *            The timestamp at which to get the parent
-     * @return The parent PID or {@code null} if the PPID is not found.
-     * @since 1.0
-     */
-    public static @Nullable Integer getParentPid(KernelAnalysisModule module, Integer threadId, long ts) {
-        Integer ppid = null;
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return ppid;
-        }
-        Integer ppidNode;
-        try {
-            ppidNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PPID);
-            ITmfStateInterval ppidInterval = ss.querySingleState(ts, ppidNode);
-            ITmfStateValue ppidValue = ppidInterval.getStateValue();
-
-            switch (ppidValue.getType()) {
-            case INTEGER:
-                ppid = NonNullUtils.checkNotNull(Integer.valueOf(ppidValue.unboxInt()));
-                break;
-            case DOUBLE:
-            case LONG:
-            case NULL:
-            case STRING:
-            default:
-                break;
-            }
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return ppid;
-    }
-
-    /**
-     * Get the executable name of the thread ID. If the thread ID was used
-     * multiple time or the name changed in between, it will return the last
-     * name the thread has taken, or {@code null} if no name is found
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param threadId
-     *            The thread ID of the process for which to get the name
-     * @return The last executable name of this process, or {@code null} if not
-     *         found
-     * @since 1.0
-     */
-    public static @Nullable String getExecutableName(KernelAnalysisModule module, Integer threadId) {
-        String execName = null;
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return execName;
-        }
-        Integer execNameNode;
-        try {
-            execNameNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.EXEC_NAME);
-            List<ITmfStateInterval> execNameIntervals = StateSystemUtils.queryHistoryRange(ss, execNameNode, ss.getStartTime(), ss.getCurrentEndTime());
-
-            ITmfStateValue execNameValue;
-            for (ITmfStateInterval interval : execNameIntervals) {
-                execNameValue = interval.getStateValue();
-                switch (execNameValue.getType()) {
-                case STRING:
-                    execName = execNameValue.unboxStr();
-                    break;
-                case DOUBLE:
-                case LONG:
-                case NULL:
-                case INTEGER:
-                default:
-                    break;
-                }
-            }
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return execName;
-    }
-
-    /**
-     * Get the priority of a thread running at a time ts.
-     *
-     * @param module
-     *            The kernel analysis instance to run this method on
-     * @param threadId
-     *            The thread ID of the target thread
-     * @param ts
-     *            The timestamp at which to get the priority
-     * @return The priority of this thread, or {@code null} if not found
-     * @since 1.0
-     */
-    public static @Nullable Integer getThreadPrio(KernelAnalysisModule module, Integer threadId, long ts) {
-        Integer execPrio = null;
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return execPrio;
-        }
-        try {
-            int execPrioQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PRIO);
-            ITmfStateInterval interval = ss.querySingleState(ts, execPrioQuark);
-            ITmfStateValue prioValue = interval.getStateValue();
-            /* We know the prio must be an Integer */
-            execPrio = prioValue.unboxInt();
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return execPrio;
-    }
-
-    /**
-     * Get the status intervals for a given thread with a resolution
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param threadId
-     *            The ID of the thread to get the intervals for
-     * @param start
-     *            The start time of the requested range
-     * @param end
-     *            The end time of the requested range
-     * @param resolution
-     *            The resolution or the minimal time between the requested
-     *            intervals. If interval times are smaller than resolution, only
-     *            the first interval is returned, the others are ignored.
-     * @param monitor
-     *            A progress monitor for this task
-     * @return The list of status intervals for this thread, an empty list is
-     *         returned if either the state system is {@code null} or the quark
-     *         is not found
-     * @since 1.0
-     */
-    public static List<ITmfStateInterval> getStatusIntervalsForThread(KernelAnalysisModule module, Integer threadId, long start, long end, long resolution, IProgressMonitor monitor) {
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return Collections.EMPTY_LIST;
-        }
-
-        try {
-            int threadQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString());
-            int statusQuark = ss.getQuarkRelative(threadQuark, Attributes.STATUS);
-            List<ITmfStateInterval> statusIntervals = StateSystemUtils.queryHistoryRange(ss, statusQuark, Math.max(start, ss.getStartTime()), Math.min(end - 1, ss.getCurrentEndTime()), resolution, monitor);
-            return statusIntervals;
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return Collections.EMPTY_LIST;
-    }
-
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java
deleted file mode 100644 (file)
index 21f8483..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.event.aspect.LinuxTidAspect;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-
-/**
- * This aspect finds the ID of the thread running from this event using the
- * {@link KernelAnalysisModule}.
- *
- * @author Geneviève Bastien
- * @since 1.0
- */
-public final class KernelTidAspect extends LinuxTidAspect {
-
-    /** The singleton instance */
-    public static final KernelTidAspect INSTANCE = new KernelTidAspect();
-
-    private KernelTidAspect() {
-    }
-
-    @Override
-    public @Nullable Integer resolve(ITmfEvent event) {
-        /* Find the CPU this event is run on */
-        Integer cpu = TmfTraceUtils.resolveIntEventAspectOfClassForEvent(event.getTrace(),
-                TmfCpuAspect.class, event);
-        if (cpu == null) {
-            return null;
-        }
-
-        /* Find the analysis module for the trace */
-        KernelAnalysisModule analysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(),
-                KernelAnalysisModule.class, KernelAnalysisModule.ID);
-        if (analysis == null) {
-            return null;
-        }
-        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(
-                analysis, cpu, event.getTimestamp().getValue());
-        if (tid != null) {
-            return tid;
-        }
-        return null;
-    }
-
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/LinuxValues.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/LinuxValues.java
deleted file mode 100644 (file)
index a43a582..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-/**
- * Definitions of values used in the Linux kernel code.
- *
- * Instead of using "magic numbers" in state providers, the definitions should
- * be added here first.
- *
- * @author Alexandre Montplaisir
- * @since 2.0
- */
-public interface LinuxValues {
-
-    /**
-     * Process states found in scheduler events.
-     *
-     * From include/linux/sched.h
-     *
-     * <pre>
-     * #define TASK_RUNNING 0
-     * #define TASK_INTERRUPTIBLE 1
-     * #define TASK_UNINTERRUPTIBLE 2
-     * #define __TASK_STOPPED 4
-     * #define __TASK_TRACED 8
-     * #define EXIT_DEAD 16
-     * #define EXIT_ZOMBIE 32
-     * #define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD)
-     * #define TASK_DEAD 64
-     * #define TASK_WAKEKILL 128
-     * #define TASK_WAKING 256
-     * #define TASK_PARKED 512
-     * #define TASK_STATE_MAX 1024
-     * </pre>
-     */
-    /**
-     * The task is running normally, can be interrupted, in a syscall or user
-     * mode.
-     */
-    int TASK_STATE_RUNNING = 0;
-
-    /**
-     * The process is in an interruptible sleep, (waiting for an event to
-     * complete)
-     */
-    int TASK_INTERRUPTIBLE = 1;
-
-    /**
-     * The process is in an uninteruptible sleep, (usually waiting on IO)
-     */
-    int TASK_UNINTERRUPTIBLE = 2;
-
-    /**
-     * The process is stopped, it is waiting for a SIGCONT
-     */
-    int TASK_STOPPED__ = 4;
-
-    /**
-     * The process is being monitored by other processes like a debugger
-     */
-    int TASK_TRACED__ = 8;
-
-    /**
-     * The task is terminated. It is lingering waiting for a parent to reap it.
-     */
-    int EXIT_ZOMBIE = 16;
-
-    /**
-     * The final state, the process reaches this state when being reaped. This
-     * state should not be seen.
-     */
-    int EXIT_DEAD = 32;
-
-    /**
-     * The task is dead, that means the PID can be re-used.
-     */
-    int TASK_DEAD = 64;
-
-    /**
-     * The task will wake up only on kill signals
-     */
-    int TASK_WAKEKILL = 128;
-
-    /**
-     * A task is being woken up, should not appear in sched switch, but if we
-     * poll.
-     */
-    int TASK_WAKING = 256;
-
-    /**
-     * A very deep sleep that can only be woken by an unpark wakeup
-     */
-    int TASK_PARK = 512;
-
-    /**
-     * This is the maximum value + 1 that the task state can be. TASK_STATE_MAX
-     * - 1 is useful to mask the task state.
-     */
-    int TASK_STATE_MAX = 1024;
-
-    /**
-     * Process statuses, used in LTTng statedump events.
-     *
-     * This is LTTng-specific, but the statedump are handled at this level, so
-     * it makes sense to add those definitions here.
-     *
-     * Taken from lttng-module's lttng-statedump-impl.c:
-     *
-     * <pre>
-     * enum lttng_process_status {
-     *     LTTNG_UNNAMED = 0,
-     *     LTTNG_WAIT_FORK = 1,
-     *     LTTNG_WAIT_CPU = 2,
-     *     LTTNG_EXIT = 3,
-     *     LTTNG_ZOMBIE = 4,
-     *     LTTNG_WAIT = 5,
-     *     LTTNG_RUN = 6,
-     *     LTTNG_DEAD = 7,
-     * };
-     * </pre>
-     */
-
-    /** Task is initially preempted */
-    int STATEDUMP_PROCESS_STATUS_WAIT_CPU = 2;
-
-    /** Task is initially blocked */
-    int STATEDUMP_PROCESS_STATUS_WAIT = 5;
-
-    /**
-     * SoftIRQ definitions
-     *
-     * From linux/interrupt.h
-     *
-     * <pre>
-     * enum
-     * {
-     *     HI_SOFTIRQ=0,
-     *     TIMER_SOFTIRQ,
-     *     NET_TX_SOFTIRQ,
-     *     NET_RX_SOFTIRQ,
-     *     BLOCK_SOFTIRQ,
-     *     BLOCK_IOPOLL_SOFTIRQ,
-     *     TASKLET_SOFTIRQ,
-     *     SCHED_SOFTIRQ,
-     *     HRTIMER_SOFTIRQ,
-     *     RCU_SOFTIRQ,
-     *     NR_SOFTIRQS // not used as this is the NUMBER of softirqs
-     * };
-     * </pre>
-     */
-
-    /** High-priority tasklet */
-    int SOFTIRQ_HI = 0;
-
-    /** Interrupted because of timer */
-    int SOFTIRQ_TIMER = 1;
-
-    /** Interrupted because of network transmission */
-    int SOFTIRQ_NET_TX = 2;
-
-    /** Interrupted because of network reception */
-    int SOFTIRQ_NET_RX = 3;
-
-    /** Interrupted because of block operation */
-    int SOFTIRQ_BLOCK = 4;
-
-    /** Interrupted because of block IO */
-    int SOFTIRQ_BLOCK_IOPOLL = 5;
-
-    /** Tasklet (differed device interrupt) */
-    int SOFTIRQ_TASKLET = 6;
-
-    /** Interrupted because of the scheduler */
-    int SOFTIRQ_SCHED = 7;
-
-    /** Interrupted because of HR timer */
-    int SOFTIRQ_HRTIMER = 8;
-
-    /** Interrupted because of RCU */
-    int SOFTIRQ_RCU = 9;
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java
deleted file mode 100644 (file)
index d2e8255..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized message strings from the LTTng Kernel Analysis
- *
- * @author Geneviève Bastien
- */
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
-    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.messages"; //$NON-NLS-1$
-
-    /**
-     * @since 1.0
-     */
-    public static @Nullable String AspectName_Prio;
-
-    /**
-     * @since 1.0
-     */
-    public static @Nullable String AspectHelpText_Prio;
-
-    public static @Nullable String LttngKernelAnalysisModule_Help;
-
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java
deleted file mode 100644 (file)
index 26e666e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
-
-/**
- * State values that are used in the kernel event handler. It's much better to
- * use integer values whenever possible, since those take much less space in the
- * history file.
- *
- * @author Alexandre Montplaisir
- */
-@SuppressWarnings("javadoc")
-public interface StateValues {
-
-    /* Process status */
-    int PROCESS_STATUS_UNKNOWN = 0;
-    int PROCESS_STATUS_WAIT_BLOCKED = 1;
-    int PROCESS_STATUS_RUN_USERMODE = 2;
-    int PROCESS_STATUS_RUN_SYSCALL = 3;
-    int PROCESS_STATUS_INTERRUPTED = 4;
-    int PROCESS_STATUS_WAIT_FOR_CPU = 5;
-    /**
-     * @since 1.0
-     */
-    int PROCESS_STATUS_WAIT_UNKNOWN = 6;
-
-    ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
-    /**
-     * @since 1.0
-     */
-    ITmfStateValue PROCESS_STATUS_WAIT_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_UNKNOWN);
-    ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
-    ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
-    ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
-    ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
-    ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
-
-    /* CPU Status */
-    int CPU_STATUS_IDLE = 0;
-    /**
-     * Soft IRQ raised, could happen in the CPU attribute but should not since
-     * this means that the CPU went idle when a softirq was raised.
-     *
-     * @since 2.0
-     */
-    int CPU_STATUS_SOFT_IRQ_RAISED = (1 << 0);
-    int CPU_STATUS_RUN_USERMODE = (1 << 1);
-    int CPU_STATUS_RUN_SYSCALL = (1 << 2);
-    int CPU_STATUS_SOFTIRQ = (1 << 3);
-    int CPU_STATUS_IRQ = (1 << 4);
-
-    ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
-    ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
-    ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
-    ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
-    ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
-
-    /** Soft IRQ is raised, CPU is in user mode */
-    ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED);
-
-    /**
-     * If the softirq is running and another is raised at the same time.
-     *
-     * @since 2.0
-     */
-    ITmfStateValue SOFT_IRQ_RAISED_RUNNING_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED | CPU_STATUS_SOFTIRQ);
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java
deleted file mode 100644 (file)
index 087abb4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Keba AG
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Christian Mansky - Initial implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-
-/**
- * This aspect finds the priority of the thread running from this event using
- * the {@link KernelAnalysisModule}.
- *
- * @author Christian Mansky
- * @since 1.0
- */
-public final class ThreadPriorityAspect implements ITmfEventAspect {
-
-    /** The singleton instance */
-    public static final ThreadPriorityAspect INSTANCE = new ThreadPriorityAspect();
-
-    private ThreadPriorityAspect() {
-    }
-
-    @Override
-    public final String getName() {
-        return NonNullUtils.nullToEmptyString(Messages.AspectName_Prio);
-    }
-
-    @Override
-    public final String getHelpText() {
-        return NonNullUtils.nullToEmptyString(Messages.AspectHelpText_Prio);
-    }
-
-    @Override
-    public @Nullable Integer resolve(ITmfEvent event) {
-        KernelAnalysisModule kernelAnalysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(), KernelAnalysisModule.class, KernelAnalysisModule.ID);
-        if (kernelAnalysis == null) {
-            return null;
-        }
-
-        Integer tid = KernelTidAspect.INSTANCE.resolve(event);
-        if (tid == null) {
-            return null;
-        }
-
-        Integer prio = KernelThreadInformationProvider.getThreadPrio(kernelAnalysis, tid, event.getTimestamp().getValue());
-        return prio;
-    }
-
-}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties
deleted file mode 100644 (file)
index a666ee1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Geneviève Bastien - Initial API and implementation
-###############################################################################
-
-AspectName_Prio=Prio
-AspectHelpText_Prio=The priority of the thread this event belongs to
-LttngKernelAnalysisModule_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java
deleted file mode 100644 (file)
index 872cd80..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
index e4790a39df85dfb9d881c58dfd6ee6f4300c799f..5a4d3934802809663839b2a443d1996ddbfcf8cb 100644 (file)
@@ -22,7 +22,7 @@ import java.util.stream.Collectors;
 
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelTidAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelTidAspect;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
 import org.eclipse.tracecompass.analysis.timing.core.segmentstore.AbstractSegmentStoreAnalysisEventBasedModule;
index bcc6fa04598b105679f99f851bf1936b2df11f5f..d2035592f8bf583110f7f6afffd73e42c60bb451 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index fad83ac0c444e00f9825a589346d2c0b7a25e6c2..749cc5feae3034edc1f3bbf56b62b6ec5f19980e 100644 (file)
@@ -10,8 +10,8 @@
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
 import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
index ee095934a458d0692c024d28bd4baa7f5434713c..03235a32e56a902296b787f224189b9e961ddbbb 100644 (file)
@@ -12,7 +12,7 @@
 
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 4e56a452c8bbd1db89ef96493deebb44c844829b..970eaee1c0bf5ddab2cc120e7e97f919deca274a 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 1fb7b0ccd618d98ba4e5e4372909527992a093b8..7aabf0fd9967296d6aa92761cdfa48ca2e72e0c9 100644 (file)
@@ -14,9 +14,9 @@ package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers
 
 import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.LinuxValues;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.LinuxValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 593d69d4933f330a90fcf0b9d66e379d7a4cfa34..73b88cb5b56caf2dbf88d8f9e8b3fb237bf77b15 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index e91d1984a28d0cc036346a4482e501b6f7472d30..7b447c52f742252a1ba91e966c61f551caa07542 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 9a8a7038b69ea318550428c31aab4e0144042085..98817ed99faaf9881612a40d4fd82faa9aef2e83 100644 (file)
@@ -15,7 +15,7 @@ package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers
 import java.util.List;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 3e955d8b9e9158da657ae967dbc2623cb07d2591..c2862a811cf830ca48d2772275ab93f2ace0293b 100644 (file)
@@ -13,7 +13,7 @@
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index f033646b6112bb079a313483bc7ad06c0e3bb938..758d5bba254ef9cf37e9f18cacf965ec2e8c430b 100644 (file)
@@ -14,9 +14,9 @@ package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers
 
 import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.LinuxValues;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.LinuxValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 0da19190671c137926293a99c7f2fe2f72706b14..858983b21637a79ba07d86d296ed40965917aeeb 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index c236475039268af439c2f083bbf338d4a0274e36..715639e7921871073b31a9577a02accf20e3729d 100644 (file)
@@ -12,8 +12,8 @@
 
 package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 3f33977ea90a246d388e0901eb409c41c0099faf..cafcd338afa82e2cf4495100ae1124bc1d612855 100644 (file)
             class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
             id="org.eclipse.tracecompass.analysis.os.linux.views.controlflow">
          <analysisModuleClass
-               class="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule">
+               class="org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule">
          </analysisModuleClass>
       </output>
       <output
             class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
             id="org.eclipse.tracecompass.analysis.os.linux.views.resources">
          <analysisModuleClass
-               class="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule">
+               class="org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule">
          </analysisModuleClass>
       </output>
       <output
index 2a9b420eee65e450a4e2b82589c9cc7a94bcce55..63c5907a3748b741fb190442b23eb429766d35b1 100644 (file)
@@ -12,9 +12,9 @@
 
 package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
 import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
index 367532743a9e0bf91edb456198b7bd4b36e3727a..2cae2fe4abd47bf4617b42ea515fedc35c17f4eb 100644 (file)
@@ -21,9 +21,9 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
 import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
index 4394f46052c7a625cf4a65e33aa982ae31ca352e..e806bf9c74c6e32e3aefc72f4929ba2a306227a2 100644 (file)
@@ -35,8 +35,8 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
 import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
 import org.eclipse.tracecompass.internal.analysis.os.linux.ui.actions.FollowThreadAction;
index 162096356d2efb2e360d6baf49a4ff39be12846d..44749ad794866e80f6ce9f6a7efc0bb3bb177dba 100644 (file)
@@ -26,8 +26,8 @@ import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 88994cd2e4f56fa565397af498ba5a31b5ae2472..ade37df23beeda8d43479aba2a1cca57e5663182 100644 (file)
@@ -22,9 +22,9 @@ import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
 import org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesEntry.Type;
index 3c297e92fc31ec1dcb63aeb1e4bf817efbd493c1..f46e6d2d48d4a14a49816b7ccf9cb97c7ee83469 100644 (file)
@@ -25,8 +25,8 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesEntry.Type;
 import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
index 1e2946b02fe2159cf4eccb9b2d8d6c298de312ad..11c3d22be85a9464a19b63d70637b97eda565aea 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.test.performance.Dimension;
 import org.eclipse.test.performance.Performance;
 import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.lttng2.kernel.core.trace.LttngKernelTrace;
 import org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace;
 import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
index 3334828ecd97ce12eedb721551de49192746fc0c..5329d58af1c3cc64ad5a05c58b71b067e7451173 100644 (file)
@@ -10,7 +10,7 @@
 package org.eclipse.tracecompass.lttng2.kernel.core.tests.perf.analysis.kernel;
 
 import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 
 /**
  * This class is an extension of {@link KernelAnalysisModule} that uses a null
index a7aa0cd9885a21362b70d8edc13209eda891602f..11cc8cf930a61adf8f980e530f5e8685c6f19602 100644 (file)
@@ -22,7 +22,7 @@ import static org.junit.Assert.fail;
 import java.util.List;
 import java.util.Set;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.lttng2.control.core.session.SessionConfigStrings;
 import org.eclipse.tracecompass.lttng2.kernel.core.trace.LttngKernelTrace;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
index bd7b1f054b684a67f948abf936a2d74f0ce98b32..390e49d480587900b0312ce1d6e2845f296f4d17 100644 (file)
@@ -18,7 +18,7 @@ import java.io.PrintWriter;
 import java.util.List;
 
 import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
 import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
index 8aaa4cabc736e41395c3eb495eabe8a3be8269ad..5e5b9ef56ccb2a70dd53bd18d07ba49f62d37a0b 100644 (file)
@@ -20,7 +20,7 @@ import java.io.File;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
 import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
index 3b10dd15d8e247fcc4cce2ef9c81ef3434e1864c..431c01cba07fde64249110140d92df3d2cb3dc6b 100644 (file)
@@ -23,7 +23,7 @@ import java.io.File;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
index 287e1017a77c0d4bbda47a9c15d339c929f33339..049c27c3506d9b3102baa7ca3e69cdc51fae30bd 100644 (file)
@@ -16,7 +16,7 @@ package org.eclipse.tracecompass.lttng2.kernel.core.tests.analysis.kernel.states
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
 import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTraceUtils;
index d9e2218c02eeccfcd0801b21e2ff7ba4727ef52c..77aeeec2e5da3ec83ceb910eabd8021caf354934 100644 (file)
@@ -23,7 +23,7 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
index 4b28bea7205d81c398fad312d090390decc4ceec..55d3ac5c92df2e9e6fd7bc789ffcf9fe3f3133c4 100644 (file)
@@ -21,7 +21,7 @@ import java.util.Collection;
 import java.util.List;
 
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.VcpuStateValues;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.VmAttributes;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.module.VirtualMachineCpuAnalysis;
index bdf8b8d802c20c334579b6d36452a98dc6eb08e6..bca62e4a633dc3b782dce25452696d0c84bc7c8a 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.tracecompass.analysis.graph.core.base.TmfEdge.EdgeType;
 import org.eclipse.tracecompass.analysis.graph.core.base.TmfGraph;
 import org.eclipse.tracecompass.analysis.graph.core.base.TmfVertex;
 import org.eclipse.tracecompass.analysis.graph.core.base.TmfVertex.EdgeDirection;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.LinuxValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.LinuxValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.model.HostThread;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.common.core.NonNullUtils;
index d14bf52eee1bfa612f39ef60d03563291c2be462..f913c751935bd76153421c7a3775976868e8f0c3 100644 (file)
@@ -9,7 +9,7 @@
 
 package org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.graph.handlers;
 
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.LinuxValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.LinuxValues;
 import org.eclipse.tracecompass.analysis.os.linux.core.model.HostThread;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.common.core.NonNullUtils;
index 08e0eeaa47bbc2309feb16f44b37993548b6a74d..8922a63c8961b5241f3d3d6a5f5fba8e4beb2c07 100644 (file)
@@ -17,8 +17,8 @@ import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.tracecompass.analysis.graph.core.base.IGraphWorker;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
 import org.eclipse.tracecompass.analysis.os.linux.core.model.HostThread;
 import org.eclipse.tracecompass.common.core.NonNullUtils;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.Activator;
index dad3991fc1b36802723ec891175ebb1b80444508..7926040f899acf5eff124fada4db73ea0781f6d1 100644 (file)
@@ -19,8 +19,8 @@ import java.util.Map.Entry;
 import java.util.Set;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelThreadInformationProvider;
 import org.eclipse.tracecompass.analysis.os.linux.core.model.HostThread;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.model.IVirtualMachineModel;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.model.VirtualCPU;
index 93e31a8b503f7da12e00629067bcf06b8c307716..0350389b77bd9b103ef4700db2c1b9c20884178b 100644 (file)
@@ -19,8 +19,8 @@ import java.util.Set;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelThreadInformationProvider;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.VcpuStateValues;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.VmAttributes;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
index b398f8b588ecdfc51e022b6d3db7d1c35ebc6010..17ba06d52903f9270e29b634e711868a6ac8cb58 100644 (file)
@@ -18,8 +18,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelThreadInformationProvider;
 import org.eclipse.tracecompass.analysis.os.linux.core.model.HostThread;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.Activator;
index f415947023f25a3d718124c33f9463aa59c65a1d..f55f48416ae8cb336726f747c3373ceaf8b5bfeb 100644 (file)
@@ -22,8 +22,8 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelTidAspect;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.ThreadPriorityAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelTidAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.ThreadPriorityAspect;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.Activator;
index b5e641ccc3193426c39af8c3a3788594696fd598..ffda379e39e6f8ca30764ca5da087a27c35a4fe8 100644 (file)
@@ -16,7 +16,7 @@ import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.VcpuStateValues;
 import org.eclipse.tracecompass.internal.lttng2.kernel.ui.views.vm.vcpuview.VirtualMachineCommon.Type;
 import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem;
index 1bb049c4e3bca6bad828d8343a6c95921a6282f6..541aad0beee750129629c5730fb4a84198fbca68 100644 (file)
@@ -20,8 +20,8 @@ import java.util.Map;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelThreadInformationProvider;
 import org.eclipse.tracecompass.common.core.NonNullUtils;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.VmAttributes;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.vm.module.VirtualMachineCpuAnalysis;
This page took 0.084846 seconds and 5 git commands to generate.