lttng: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / analysis / os / linux / core / cpuusage / KernelCpuUsageAnalysis.java
index e41517741a5e4c8081606bfd87b80fad1963827e..7d713e68e474b118a57e4e2bd4fbb38ba9deeba2 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2014, 2015 École Polytechnique de Montréal
+ * Copyright (c) 2014, 2015 École Polytechnique de Montréal and others.
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -22,7 +22,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 
 import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysis;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.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;
@@ -88,8 +88,8 @@ public class KernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
          * This analysis depends on the LTTng kernel analysis, so it's added to
          * dependent modules.
          */
-        Iterable<KernelAnalysis> kernelModules = TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysis.class);
-        for (KernelAnalysis kernelModule : kernelModules) {
+        Iterable<KernelAnalysisModule> kernelModules = TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class);
+        for (KernelAnalysisModule kernelModule : kernelModules) {
             /* Only add the first one we find, if there is one */
             modules.add(kernelModule);
             break;
@@ -115,7 +115,7 @@ public class KernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
         if (trace == null || cpuSs == null) {
             return map;
         }
-        ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysis.ID);
+        ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
         if (kernelSs == null) {
             return map;
         }
@@ -164,9 +164,6 @@ public class KernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
 
                 for (int tidNode : tidNodes) {
                     String curTidName = cpuSs.getAttributeName(tidNode);
-                    if (curTidName == null) {
-                        continue;
-                    }
                     int tid = Integer.parseInt(curTidName);
 
                     countAtEnd = endState.get(tidNode).getStateValue().unboxLong();
This page took 0.024906 seconds and 5 git commands to generate.