linux.core: add help for Context Switch analysis
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 13 Jul 2016 14:55:06 +0000 (10:55 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 14 Jul 2016 15:26:53 +0000 (11:26 -0400)
This can be seen by right clicking on the analysis and selecting "help".

Change-Id: Ief8e3046405b9cb850f0441888423959f2aaa6c2
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/77253
Reviewed-by: Hudson CI
Reviewed-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Tested-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
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/internal/analysis/os/linux/core/Messages.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/messages.properties

index 7dc6b2ceaf4d4d8e9f0af1f659c6e06bc37ede17..d1876e700c9fb6747eec56a7c97fd4e27ce68b92 100644 (file)
@@ -29,6 +29,7 @@ import org.eclipse.tracecompass.analysis.os.linux.core.trace.DefaultEventLayout;
 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;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.Messages;
 import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.Attributes;
 import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
@@ -58,6 +59,17 @@ public class KernelContextSwitchAnalysis extends TmfStateSystemAnalysisModule {
     /** Integer used to identify 'total' entries in the returned maps */
     public static final Integer TOTAL = -1;
 
+    @Override
+    public @NonNull String getHelpText() {
+        String msg = Messages.KernelContextSwitchAnalysis_Description;
+        return msg != null ? msg : super.getHelpText();
+    }
+
+    @Override
+    public @NonNull String getHelpText(@NonNull ITmfTrace trace) {
+        return getHelpText();
+    }
+
     @Override
     protected ITmfStateProvider createStateProvider() {
         ITmfTrace trace = checkNotNull(getTrace());
index c002a6a8d362d629c98f73207f69b2e2bdee0f49..2fb0994702e5cdf0b890fe40be83826046bbbeed 100644 (file)
@@ -18,6 +18,11 @@ import org.eclipse.osgi.util.NLS;
 public class Messages extends NLS {
     private static final String BUNDLE_NAME = "org.eclipse.tracecompass.internal.analysis.os.linux.core.messages"; //$NON-NLS-1$
 
+    /**
+     * Description of the context swith analysis module for the help
+     */
+    public static @Nullable String KernelContextSwitchAnalysis_Description;
+
     /**
      * Description of the TID analysis module for the help
      */
index c866d4002ef924445f61664eab9532efecac1b02..23268d12d7cff759dbde02b6bd2d42a2df7d514f 100644 (file)
@@ -7,4 +7,5 @@
 # http://www.eclipse.org/legal/epl-v10.html
 ###############################################################################
 
+KernelContextSwitchAnalysis_Description=Store the amount of times a thread was scheduled in or out. This helps show thread thrashing.
 TidAnalysisModule_Description=This analysis runs to accelerate all other analyses. It is used by the events table to fill the TID column.
This page took 0.025879 seconds and 5 git commands to generate.