Adapt new kernel.core plugins to TMF
[deliverable/tracecompass.git] / lttng / org.lttng.scope.lttng.kernel.core / src / org / lttng / scope / lttng / kernel / core / views / kernel / controlflow2 / ControlFlowModelStateProvider.java
index 2d094a6c018941b24ffd235b51855702e36d99ce..f3db861b7918450f2f2d30fea38562a79d9e4b7f 100644 (file)
@@ -18,9 +18,12 @@ import java.util.Map;
 import java.util.function.Function;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.lttng.scope.lttng.kernel.core.analysis.os.Attributes;
-import org.lttng.scope.lttng.kernel.core.analysis.os.KernelAnalysisModule;
-import org.lttng.scope.lttng.kernel.core.analysis.os.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.Attributes;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
 import org.lttng.scope.lttng.kernel.core.views.kernel.KernelAnalysisStateDefinitions;
 import org.lttng.scope.tmf2.views.core.config.ConfigOption;
 import org.lttng.scope.tmf2.views.core.timegraph.model.provider.statesystem.StateSystemModelStateProvider;
@@ -32,10 +35,6 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 
-import ca.polymtl.dorsal.libdelorean.exceptions.AttributeNotFoundException;
-import ca.polymtl.dorsal.libdelorean.exceptions.StateValueTypeException;
-import ca.polymtl.dorsal.libdelorean.statevalue.ITmfStateValue;
-
 public class ControlFlowModelStateProvider extends StateSystemModelStateProvider {
 
     // ------------------------------------------------------------------------
@@ -141,14 +140,16 @@ public class ControlFlowModelStateProvider extends StateSystemModelStateProvider
         /* Include properties for CPU and syscall name. */
         int baseQuark = ssCtx.baseTreeElement.getSourceQuark();
 
-        String cpu;
-        try {
-            int cpuQuark = ssCtx.ss.getQuarkRelative(baseQuark, Attributes.CURRENT_CPU_RQ);
-            ITmfStateValue sv = ssCtx.fullQueryAtIntervalStart.get(cpuQuark).getStateValue();
-            cpu = (sv.isNull() ? requireNonNull(Messages.propertyNotAvailable) : String.valueOf(sv.unboxInt()));
-        } catch (AttributeNotFoundException e) {
-            cpu = requireNonNull(Messages.propertyNotAvailable);
-        }
+        // FIXME The Kernel analysis in TraceCompass does not include the CPUs' run
+        // queues.
+        String cpu = requireNonNull(Messages.propertyNotAvailable);
+//        try {
+//            int cpuQuark = ssCtx.ss.getQuarkRelative(baseQuark, Attributes.CURRENT_CPU_RQ);
+//            ITmfStateValue sv = ssCtx.fullQueryAtIntervalStart.get(cpuQuark).getStateValue();
+//            cpu = (sv.isNull() ? requireNonNull(Messages.propertyNotAvailable) : String.valueOf(sv.unboxInt()));
+//        } catch (AttributeNotFoundException e) {
+//            cpu = requireNonNull(Messages.propertyNotAvailable);
+//        }
 
         String syscall;
         try {
This page took 0.023804 seconds and 5 git commands to generate.